Skip to content

Create account

POST
/api/v1/auth/signup

Register a new tenant and owner user, returns a token pair.

Authorizations

Request Body required

Request body for the signup endpoint.

Attributes: email: The new user’s email address. password: The new user’s password (min 8 characters). company_name: The company or tenant name. coupon_code: Optional coupon code granting a plan tier and/or bonus credits. A supplied-but-invalid code fails the signup with a 400 rather than silently provisioning Starter.

object
company_name
required

Company or tenant name

string
>= 1 characters <= 255 characters
coupon_code
Any of:
string
<= 50 characters
email
required

User email address

string format: email
<= 255 characters
password
required

User password (min 8 chars)

string
>= 8 characters

Responses

201

Successful Response

Response body for the signup endpoint.

Attributes: access_token: A short-lived JWT access token. refresh_token: A long-lived JWT refresh token. token_type: Always ‘bearer’. tenant_id: The newly created tenant’s UUID. user_id: The newly created user’s UUID. applied_coupon: Summary of the redeemed coupon, or None when no coupon was supplied. bonus_credits_granted reports what actually landed in the credit store, which can be 0 even for a coupon carrying bonus credits if the credit store was unreachable — the account is still created and on the granted plan, because that is durable in Postgres.

object
access_token
required

Short-lived JWT access token

string
applied_coupon
Any of:

Coupon summary embedded in the signup response.

bonus_credits is the entitlement recorded in the redemption row; bonus_credits_granted is what actually landed in the credit store. They differ when the Redis grant failed after the account was already created — signup still succeeds (the plan is durable in Postgres), and the response reports what happened rather than what was intended.

object
bonus_credits
required
integer
bonus_credits_granted
required
integer
code
required
string
description
Any of:
string
discount_type
required
string
discount_value
required
integer
plan_granted
required
Any of:
string
refresh_token
required

Long-lived JWT refresh token

string
tenant_id
required

Newly created tenant UUID

string
token_type
required

Token scheme, always ‘bearer’

string
user_id
required

Newly created user UUID

string

422

Validation Error

object
detail
Array<object>
object
ctx
object
input
loc
required
Array
msg
required
string
type
required
string