Auth

Register a new tenant

Create a new tenant account with a company name. This provisions an isolated database, generates an API key, and returns JWT tokens.

post/api/auth/register

Request body

namestring required

Full name of the tenant owner

emailstring required

Email address

passwordstring required

Password (min 8 characters)

companyNamestring required

Company name (used to generate slug)

Example request

{
  "name": "John Doe",
  "email": "john@company.com",
  "password": "securePassword123",
  "companyName": "Acme Corp"
}

Response

Tenant registered successfully.

accessTokenstring required
refreshTokenstring required
apiKeystring required

Example response

{
  "accessToken": "eyJhbGciOiJIUzI1NiIs...",
  "refreshToken": "eyJhbGciOiJIUzI1NiIs...",
  "tenant": {
    "id": "clx1234567890",
    "name": "Acme Corp",
    "slug": "acme-corp",
    "email": "john@company.com",
    "apiKey": "sk_live_abc123...",
    "webhookUrl": "https://example.com/webhooks",
    "isActive": true
  },
  "apiKey": "sk_live_abc123..."
}

Changes

Changed in 1 of the 2 revisions of this API.1

    • added the media type application/json for the response with the status 201

      response-media-type-added