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
codestring requiredLength: 64 to 64 characters. Pattern:^[a-f0-9]{64}$
Example
{
"code": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}Responses
200 Dashboard token and user.
application/json PrivacySocialExchange
createdboolean requiredtokenstring requireduserobject requiredbalance_centsinteger requiredbalance_dollarsnumber requiredcompany_namestring or null requiredcreated_atstring (date-time) or null requiredemailstring (email) requiredemail_verifiedboolean requiredidinteger requiredis_low_balanceboolean requiredlegal_acceptedboolean requirednamestring requiredonboarding_doneboolean requiredorganisation_idinteger or null requiredrolestring requiredOne of:"owner","super-admin","admin","staff","compliance-officer","auditor","billing","support","developer","member"rolesarray of string requiredbalance_microsinteger requiredExact 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
errorobject requiredcodestringkidstringmessagestringrefstringtypestring
errorsobjectOther keys: array of string
messagestring
422 The request failed validation.
application/json PrivacyError
errorobject requiredcodestringkidstringmessagestringrefstringtypestring
errorsobjectOther keys: array of string
messagestring
429 The request rate limit was exceeded.
application/json PrivacyError
errorobject requiredcodestringkidstringmessagestringrefstringtypestring
errorsobjectOther keys: array of string
messagestring
text/html string