Identity API
Sign-in (Google, Apple, email OTP), sessions, account linking, users, consent, export and deletion.
On this page
Contract version 1.1.0. 23 operations; 22 served, 1 specified only.
Note
"Served" means the endpoint exists in the runtime, not that it is enabled for your app. Provider-backed endpoints return 503 FEATURE_UNAVAILABLE until the matching connection is ready.
| Method | Path | Summary | Auth | Status |
|---|---|---|---|---|
| POST | /v1/auth/browser-exchange | Exchange browser login | None | served |
| POST | /v1/auth/contact-challenges | Request contact challenge | Consumer session | served |
| POST | /v1/auth/contact-challenges/verify | Verify contact challenge | Consumer session | served |
| POST | /v1/auth/logout | Logout | Consumer session | served |
| POST | /v1/auth/logout-all | Logout all | Consumer session | served |
| GET | /v1/auth/me | Get me | Consumer session | served |
| GET | /v1/auth/methods | List methods | Consumer session | served |
| POST | /v1/auth/methods/link | Link method | Consumer session | served |
| DELETE | /v1/auth/methods/{identity_id} | Unlink method | Consumer session | served |
| POST | /v1/auth/oauth/start | Start browser o auth | None | served |
| POST | /v1/auth/otp/request | Request otp | None | served |
| POST | /v1/auth/otp/verify | Verify otp | None | served |
| GET | /v1/auth/sessions | List sessions | Consumer session | served |
| POST | /v1/auth/social | Social login | None | served |
| POST | /v1/auth/social-link-proof | Verify social link | Consumer session | served |
| DELETE | /v1/privacy/account | Delete account | Consumer session | served |
| POST | /v1/privacy/consent | Update consent | Consumer session | served |
| POST | /v1/privacy/export | Request user export | Consumer session | served |
| GET | /v1/users | List users for support | Operator session | served |
| GET | /v1/users/{user_id} | Get user for support | Operator session | served |
| POST | /v1/users/{user_id}/block | Block user | Operator session | served |
| POST | /v1/users/{user_id}/unblock | Unblock user | Operator session | served |
| POST | /webhooks/apple-identity/{connection_ref} | Webhook apple identity | Provider signature | specified only |
POST /v1/auth/browser-exchange
Exchange browser login. Atomically consume short-lived one-use callback handoff code; validate PKCE, scope and installation. Returns set-auth-token header. No tokens in deep link.
| Operation ID | exchangeBrowserLogin |
| Auth | None (public) |
| Status | Served |
Request body (application/json, required): BrowserExchangeRequest
Responses
200Successful operation —AuthResult
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/contact-challenges
Request contact challenge. Link/change contact require current session and recent authentication. Reauthentication challenge can use existing session with approved method. Server binds challenge to current subject and purpose.
| Operation ID | requestContactChallenge |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Request body (application/json, required): ContactChallengeRequest
Responses
200Successful operation —OtpChallenge
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/contact-challenges/verify
Verify contact challenge. Returns short-lived single-use proof bound to current scope/subject/purpose; never changes contact automatically or starts a different session.
| Operation ID | verifyContactChallenge |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Request body (application/json, required): OtpVerify
Responses
200Successful operation —VerificationProof
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/logout
Logout.
| Operation ID | logout |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/logout-all
Logout all. Recent authentication; revoke all app sessions.
| Operation ID | logoutAll |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/auth/me
Get me.
| Operation ID | getMe |
| Auth | Consumer session (app user) |
| Status | Served |
Responses
200Successful operation —User
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/auth/methods
List methods.
| Operation ID | listMethods |
| Auth | Consumer session (app user) |
| Status | Served |
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/methods/link
Link method.
| Operation ID | linkMethod |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Request body (application/json, required): LinkRequest
Responses
200Successful operation —User
Errors: 400 401 403 404 409 422 429 503 as problem details.
DELETE /v1/auth/methods/{identity_id}
Unlink method. Recent authentication and last-method protection.
| Operation ID | unlinkMethod |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Optional — see idempotency |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
identity_id | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Responses
200Successful operation —User
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/oauth/start
Start browser o auth. Start supported Better Auth browser OAuth with server-generated state/nonce. Return target is a registered app link ID, never arbitrary URL. Bind app, installation and PKCE challenge.
| Operation ID | startBrowserOAuth |
| Auth | None (public) |
| Status | Served |
Request body (application/json, required): OAuthStartRequest
Responses
200Successful operation —OAuthStartResult
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/otp/request
Request otp. Sign-in purpose only. Adapter delegates to pinned Better Auth; not a second independent OTP engine. Apply send limits/captcha. challenge_id binds server-side destination and expiry.
| Operation ID | requestOtp |
| Auth | None (public) |
| Status | Served |
Request body (application/json, required): OtpRequest
Responses
200Successful operation —OtpChallenge
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/otp/verify
Verify otp. Returns session credential in set-auth-token header, never query or JSON log. Credential JSON is public SessionContext only. Challenge bound to this app/sign-in purpose.
| Operation ID | verifyOtp |
| Auth | None (public) |
| Status | Served |
Request body (application/json, required): OtpVerify
Responses
200Successful operation —AuthResult
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/auth/sessions
List sessions.
| Operation ID | listSessions |
| Auth | Consumer session (app user) |
| Status | Served |
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/social
Social login.
| Operation ID | socialLogin |
| Auth | None (public) |
| Status | Served |
Request body (application/json, required): SocialLogin
Responses
200Successful operation —AuthResult
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/auth/social-link-proof
Verify social link. Requires recent authentication and nonce. Verifies new provider identity without creating a second user/session.
| Operation ID | verifySocialLink |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Request body (application/json, required): SocialLinkProofRequest
Responses
200Successful operation —VerificationProof
Errors: 400 401 403 404 409 422 429 503 as problem details.
DELETE /v1/privacy/account
Delete account. Recent authentication. Does not cancel external store subscription automatically.
| Operation ID | deleteAccount |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Optional — see idempotency |
Responses
202Accepted for asynchronous processing —Job
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/privacy/consent
Update consent.
| Operation ID | updateConsent |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Request body (application/json, required): ConsentUpdate
Responses
200Successful operation —ConsentRecord
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/privacy/export
Request user export.
| Operation ID | requestUserExport |
| Auth | Consumer session (app user) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Responses
202Accepted for asynchronous processing —Job
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/users
List users for support. Masked, bounded scoped search. Raw contact search input must not enter logs/URL analytics. Sensitive exact lookup uses approved private search operation.
| Operation ID | listUsersForSupport |
| Auth | Operator session (console) |
| Status | Served |
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.
GET /v1/users/{user_id}
Get user for support. Masked contact details, scoped permission and recorded access reason; no OTP/session secret.
| Operation ID | getUserForSupport |
| Auth | Operator session (console) |
| Status | Served |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
user_id | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Responses
200Successful operation —User
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/users/{user_id}/block
Block user.
| Operation ID | blockUser |
| Auth | Operator session (console) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
user_id | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Request body (application/json, required): ReasonRequest
Responses
200Successful operation —User
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /v1/users/{user_id}/unblock
Unblock user.
| Operation ID | unblockUser |
| Auth | Operator session (console) |
| Status | Served |
| Idempotency-Key | Required — see idempotency |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
user_id | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Request body (application/json, required): ReasonRequest
Responses
200Successful operation —User
Errors: 400 401 403 404 409 422 429 503 as problem details.
POST /webhooks/apple-identity/{connection_ref}
Webhook apple identity. Raw body authentication and provider-specific schema. Persist before ACK; app/environment/account verification required. Opaque connection_ref is routing, not authentication.
| Operation ID | webhookAppleIdentity |
| Auth | Provider signature (store / provider webhook) |
| Status | Specified only — not served yet |
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
connection_ref | path | string | yes | min length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$ |
Request body (application/json, required): object
Responses
200Successful operation — Envelope{ request_id, data, next_cursor? }(data shape not yet pinned in the contract)
Errors: 400 401 403 404 409 422 429 503 as problem details.