Skip to content
API reference

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.

MethodPathSummaryAuthStatus
POST/v1/auth/browser-exchangeExchange browser loginNoneserved
POST/v1/auth/contact-challengesRequest contact challengeConsumer sessionserved
POST/v1/auth/contact-challenges/verifyVerify contact challengeConsumer sessionserved
POST/v1/auth/logoutLogoutConsumer sessionserved
POST/v1/auth/logout-allLogout allConsumer sessionserved
GET/v1/auth/meGet meConsumer sessionserved
GET/v1/auth/methodsList methodsConsumer sessionserved
POST/v1/auth/methods/linkLink methodConsumer sessionserved
DELETE/v1/auth/methods/{identity_id}Unlink methodConsumer sessionserved
POST/v1/auth/oauth/startStart browser o authNoneserved
POST/v1/auth/otp/requestRequest otpNoneserved
POST/v1/auth/otp/verifyVerify otpNoneserved
GET/v1/auth/sessionsList sessionsConsumer sessionserved
POST/v1/auth/socialSocial loginNoneserved
POST/v1/auth/social-link-proofVerify social linkConsumer sessionserved
DELETE/v1/privacy/accountDelete accountConsumer sessionserved
POST/v1/privacy/consentUpdate consentConsumer sessionserved
POST/v1/privacy/exportRequest user exportConsumer sessionserved
GET/v1/usersList users for supportOperator sessionserved
GET/v1/users/{user_id}Get user for supportOperator sessionserved
POST/v1/users/{user_id}/blockBlock userOperator sessionserved
POST/v1/users/{user_id}/unblockUnblock userOperator sessionserved
POST/webhooks/apple-identity/{connection_ref}Webhook apple identityProvider signaturespecified 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 IDexchangeBrowserLogin
AuthNone (public)
StatusServed

Request body (application/json, required): BrowserExchangeRequest

Responses

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 IDrequestContactChallenge
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Request body (application/json, required): ContactChallengeRequest

Responses

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 IDverifyContactChallenge
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Request body (application/json, required): OtpVerify

Responses

Errors: 400 401 403 404 409 422 429 503 as problem details.

POST /v1/auth/logout

Logout.

Operation IDlogout
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Responses

  • 200 Successful 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 IDlogoutAll
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Responses

  • 200 Successful 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 IDgetMe
AuthConsumer session (app user)
StatusServed

Responses

  • 200 Successful operation — User

Errors: 400 401 403 404 409 422 429 503 as problem details.

GET /v1/auth/methods

List methods.

Operation IDlistMethods
AuthConsumer session (app user)
StatusServed

Responses

  • 200 Successful 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 IDlinkMethod
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Request body (application/json, required): LinkRequest

Responses

  • 200 Successful 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 IDunlinkMethod
AuthConsumer session (app user)
StatusServed
Idempotency-KeyOptional — see idempotency

Parameters

NameInTypeRequiredNotes
identity_idpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Responses

  • 200 Successful 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 IDstartBrowserOAuth
AuthNone (public)
StatusServed

Request body (application/json, required): OAuthStartRequest

Responses

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 IDrequestOtp
AuthNone (public)
StatusServed

Request body (application/json, required): OtpRequest

Responses

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 IDverifyOtp
AuthNone (public)
StatusServed

Request body (application/json, required): OtpVerify

Responses

Errors: 400 401 403 404 409 422 429 503 as problem details.

GET /v1/auth/sessions

List sessions.

Operation IDlistSessions
AuthConsumer session (app user)
StatusServed

Responses

  • 200 Successful 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 IDsocialLogin
AuthNone (public)
StatusServed

Request body (application/json, required): SocialLogin

Responses

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 IDverifySocialLink
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Request body (application/json, required): SocialLinkProofRequest

Responses

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 IDdeleteAccount
AuthConsumer session (app user)
StatusServed
Idempotency-KeyOptional — see idempotency

Responses

  • 202 Accepted for asynchronous processing — Job

Errors: 400 401 403 404 409 422 429 503 as problem details.

POST /v1/privacy/consent

Update consent.

Operation IDupdateConsent
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Request body (application/json, required): ConsentUpdate

Responses

Errors: 400 401 403 404 409 422 429 503 as problem details.

POST /v1/privacy/export

Request user export.

Operation IDrequestUserExport
AuthConsumer session (app user)
StatusServed
Idempotency-KeyRequired — see idempotency

Responses

  • 202 Accepted 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 IDlistUsersForSupport
AuthOperator session (console)
StatusServed

Responses

  • 200 Successful 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 IDgetUserForSupport
AuthOperator session (console)
StatusServed

Parameters

NameInTypeRequiredNotes
user_idpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Responses

  • 200 Successful operation — User

Errors: 400 401 403 404 409 422 429 503 as problem details.

POST /v1/users/{user_id}/block

Block user.

Operation IDblockUser
AuthOperator session (console)
StatusServed
Idempotency-KeyRequired — see idempotency

Parameters

NameInTypeRequiredNotes
user_idpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Request body (application/json, required): ReasonRequest

Responses

  • 200 Successful operation — User

Errors: 400 401 403 404 409 422 429 503 as problem details.

POST /v1/users/{user_id}/unblock

Unblock user.

Operation IDunblockUser
AuthOperator session (console)
StatusServed
Idempotency-KeyRequired — see idempotency

Parameters

NameInTypeRequiredNotes
user_idpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Request body (application/json, required): ReasonRequest

Responses

  • 200 Successful 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 IDwebhookAppleIdentity
AuthProvider signature (store / provider webhook)
StatusSpecified only — not served yet

Parameters

NameInTypeRequiredNotes
connection_refpathstringyesmin length 1; max length 128; pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]*$

Request body (application/json, required): object

Responses

  • 200 Successful 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.