Skip to content
Sign in Create account

Exchange a social sign-in code

POST /api/v1/auth/social/exchange

Exchanges a single-use code for a dashboard token and user resource.

This operation needs no authentication.

Request body

application/json object

  • code string required
    Length: 64 to 64 characters. Pattern: ^[a-f0-9]{64}$

Example

{
  "code": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}

Responses

200 Dashboard token and user.

application/json PrivacySocialExchange

  • created boolean required
  • token string required
  • user object required
    • balance_cents integer required
    • balance_dollars number required
    • company_name string or null required
    • created_at string (date-time) or null required
    • email string (email) required
    • email_verified boolean required
    • id integer required
    • is_low_balance boolean required
    • legal_accepted boolean required
    • name string required
    • onboarding_done boolean required
    • organisation_id integer or null required
    • role string required
      One of: "owner", "super-admin", "admin", "staff", "compliance-officer", "auditor", "billing", "support", "developer", "member"
    • roles array of string required
    • balance_micros integer required

      Exact wallet balance in USD micro-dollars.

Generated sample

{
  "created": true,
  "token": "string",
  "user": {
    "balance_cents": 0,
    "balance_dollars": 0,
    "company_name": "string",
    "created_at": "2026-01-01T00:00:00Z",
    "email": "user@example.com",
    "email_verified": true,
    "id": 0,
    "is_low_balance": true,
    "legal_accepted": true,
    "name": "string",
    "onboarding_done": true,
    "organisation_id": 0,
    "role": "owner",
    "roles": [
      "owner"
    ],
    "balance_micros": 0
  }
}
400 The exchange code is invalid, expired, or already used.

application/json PrivacyError

  • error object required
    • code string
    • kid string
    • message string
    • ref string
    • type string
  • errors object

    Other keys: array of string

  • message string
422 The request failed validation.

application/json PrivacyError

  • error object required
    • code string
    • kid string
    • message string
    • ref string
    • type string
  • errors object

    Other keys: array of string

  • message string
429 The request rate limit was exceeded.

application/json PrivacyError

  • error object required
    • code string
    • kid string
    • message string
    • ref string
    • type string
  • errors object

    Other keys: array of string

  • message string

text/html string