Skip to content

auth reference

This reference follows the current server implementation. Use the SDK for customer flows; it manages identity proof and retries. Authentication and errors apply to every endpoint. Types below describe JSON: dates are ISO strings, ? means optional, and null differs from an omitted field. Responses may include additional fields. Schemas also enforce constraints that TypeScript cannot express; download the request JSON Schemas. Named response types are defined in the data model reference.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Use the path parameters above and any query options described below.

JSON response shape
OAuthConfig

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: getOAuthConfig.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Use the path parameters above and any query options described below.

JSON response shape
{ error: string;
message: string;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: authorize.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

No JSON body is required.

JSON response shape
{ state: string;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: generateOAuthState.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ id_token: string;
customerId?: string | undefined;
state?: string | undefined;
oauthState?: string | undefined;
allowSignUp?: boolean | undefined;
}
{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}
JSON response shape
{ error: string;
message: string;
}
JSON response shape
AuthResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: googleAuth.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ id_token: string;
authorization_code?: string | undefined;
nonce?: string | undefined;
user?: { name?: { firstName?: string | undefined;
lastName?: string | undefined;
} | undefined;
email?: string | undefined;
} | undefined;
customerId?: string | undefined;
state?: string | undefined;
oauthState?: string | undefined;
allowSignUp?: boolean | undefined;
}
{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}
JSON response shape
{ error: string;
message: string;
}
JSON response shape
AuthResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: appleAuth.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ email: string;
password: string;
name?: string | undefined;
firstName?: string | undefined;
lastName?: string | undefined;
customerId?: string | undefined;
state?: string | undefined;
}
{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}

Validation schemas: registerRequestSchema in the downloadable schema registry.

JSON response shape
AuthResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: signup.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ email: string;
password: string;
customerId?: string | undefined;
state?: string | undefined;
}
{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}

Validation schemas: signInRequestSchema in the downloadable schema registry.

JSON response shape
AuthResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: signin.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

This route supports an existing legacy migration only. New integrations must use the standard authentication routes.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ email: string;
password: string;
customerId?: string | undefined;
state?: string | undefined;
}
{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}

Validation schemas: signInRequestSchema in the downloadable schema registry.

JSON response shape
AuthResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: maxVaultLegacySignin.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}
{ operationId: string;
state: "cancelled" | "exhausted" | "pending" | "started" | "retrying" | "confirmed" | "no_matching_purchase" | "interrupted";
attempt: number;
observedAt: string;
parentOperationId?: string | null | undefined;
}
{ version: 1;
observedAt: string;
policy: "account" | "app_store";
verification: "unavailable" | "authoritative" | "verified_entitlements" | "cached";
benefits: { identifier: string;
source: "manual" | "apple" | "account" | "support_purchaser" | "preserved_import";
effectiveUntil?: number | null | undefined;
verifiedAt?: string | null | undefined;
}[];
truncated: boolean;
providerEnvironment?: "Production" | "Sandbox" | "Xcode" | null | undefined;
operationId?: string | null | undefined;
attemptId?: string | null | undefined;
requestId?: string | null | undefined;
accessContextExpiresAt?: number | null | undefined;
appleEvidence?: { observedAt: string;
acquisition: "unavailable" | "rejected" | "app_transaction" | "receipt";
purchaserComparison: "unavailable" | "first_observation" | "same" | "changed";
collectionComplete: boolean;
priorTransactionCount: number;
submittedTransactionCount: number;
retainedTransactionCount: number;
missingProductIdentifiers: string[];
previousPurchaserHash?: string | null | undefined;
currentPurchaserHash?: string | null | undefined;
acquisitionFailureStage?: string | null | undefined;
} | null | undefined;
}
{ occurrenceId: string;
phase: "startup" | "runtime";
operation: string;
domain: string;
code: string;
message: string;
underlyingErrors: { domain: string;
code: string;
message: string;
}[];
appVersion: string;
buildNumber: string;
truncated: boolean;
stage?: string | undefined;
migrationIdentifier?: string | undefined;
relatedCrashReportId?: string | undefined;
}
JSON response shape
{ success: true;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: signOut.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ email: string;
redirectUrl?: string | undefined;
}

Validation schemas: forgotPasswordRequestSchema in the downloadable schema registry.

JSON response shape
{ token?: string | undefined;
success: true;
message: string;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: forgotPassword.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ token: string;
password: string;
}

Validation schemas: resetPasswordRequestSchema in the downloadable schema registry.

JSON response shape
{ success: true;
message: string;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: resetPassword.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ email: string;
redirectUrl: string;
customerId?: string | undefined;
}

Validation schemas: requestMagicLinkSchema in the downloadable schema registry.

JSON response shape
MagicLinkRequestResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: requestMagicLink.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ token: string;
customerId?: string | undefined;
}

Validation schemas: exchangeMagicLinkSchema in the downloadable schema registry.

JSON response shape
AuthResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: exchangeMagicLink.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ method: "password";
password: string;
} | { method: "apple";
idToken: string;
authorizationCode: string;
nonce: string;
} | { method: "google";
idToken: string;
} | { method: "magic_link";
token: string;
}

Validation schemas: reauthenticateRequestSchema in the downloadable schema registry.

JSON response shape
{ session: AuthSession;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: reauthenticate.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ newEmail: string;
}

Validation schemas: requestEmailChangeSchema in the downloadable schema registry.

JSON response shape
{ success: true;
expiresAt: number;
emailUnreachable: boolean;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: requestEmailChange.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ newEmail: string;
currentPassword: string;
}
JSON response shape
AuthResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: changeEmailWithPassword.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ token: string;
}

Validation schemas: confirmEmailChangeSchema in the downloadable schema registry.

JSON response shape
AuthResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: confirmEmailChange.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ challengeToken: string;
newPassword: string;
}
{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}

Validation schemas: completePasswordChangeSchema in the downloadable schema registry.

JSON response shape
AuthResponse

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: completePasswordChange.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ refreshToken: string;
}

Validation schemas: refreshTokenRequestSchema in the downloadable schema registry.

JSON response shape
{ session: { token: string;
refreshToken: string;
expiresAt: number;
refreshExpiresAt: number | null;
familyId: string;
generation: number;
authenticatedAt: number;
};
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: refreshSession.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Use the path parameters above and any query options described below.

JSON response shape
{ user: { id: string;
email: string;
firstName: string | null;
lastName: string | null;
name: string;
emailVerified: boolean;
emailUnreachable: boolean;
image: string | null;
connectedAccounts: never[];
preferences: UserPreferences;
};
customer: { customerId: string;
isAnonymous: false;
};
}
JSON response shape
{ error: string;
message: string;
}
JSON response shape
{ user: CustomerAuthUser;
customer: { customerId: string;
isAnonymous: false;
};
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: getCurrentUser.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ firstName?: string | undefined;
lastName?: string | undefined;
name?: string | undefined;
imageUrl?: string | null | undefined;
image?: string | null | undefined;
}
JSON response shape
{ error: string;
message: string;
}
JSON response shape
{ user: { id: string;
email: string;
firstName: string | null;
lastName: string | null;
name: string;
emailVerified: boolean;
emailUnreachable: boolean;
image: string | null;
connectedAccounts: never[];
preferences: UserPreferences;
};
}
JSON response shape
{ user: CustomerAuthUser;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: updateUser.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Use the path parameters above and any query options described below.

JSON response shape
{ accounts: ConnectedAccount[];
}
JSON response shape
{ error: string;
message: string;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: getAccounts.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Path parameters: id (string). Every target must belong to the authenticated app or workspace.

Use the path parameters above and any query options described below.

Handler inputs: path.id. Authentication values belong in headers; route IDs belong in the path.

JSON response shape
{ error: string;
message: string;
}
JSON response shape
{ success: true;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: deleteAccount.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ newPassword: string;
oldPassword?: string | undefined;
}
{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}
JSON response shape
{ error: string;
message: string;
}
JSON response shape
{ success: true;
}
JSON response shape
{ session?: { token: string;
refreshToken: string;
expiresAt: number;
refreshExpiresAt: number | null;
familyId: string;
generation: number;
authenticatedAt: number;
} | undefined;
success: true;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: updatePassword.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Use the path parameters above and any query options described below.

JSON response shape
{ hasPassword: boolean;
}
JSON response shape
{ error: string;
message: string;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: hasPassword.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Use the path parameters above and any query options described below.

JSON response shape
{ preferences: UserPreferences;
}
JSON response shape
{ error: string;
message: string;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: getPreferences.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ [x: string]: unknown;
}
JSON response shape
{ error: string;
message: string;
}
JSON response shape
{ preferences: UserPreferences;
}
JSON response shape
{ preferences: Record<string, unknown>;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: updatePreferences.

Authentication: Secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ fromCustomerId: string;
toCustomerId: string;
}

Validation schemas: aliasCustomerSchema in the downloadable schema registry.

JSON response shape
{ error: string;
message: string;
}
JSON response shape
{ success: true;
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: aliasCustomer.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Use the path parameters above and any query options described below.

JSON response shape
{ canDelete: false;
checks: { message: string;
code: string;
type: string;
}[];
}
JSON response shape
{ error: string;
message: string;
}
JSON response shape
{ canDelete: boolean;
checks: AccountPreflightCheck[];
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: deleteUserAccountPreflight.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ password?: string | undefined;
}
{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}
JSON response shape
{ error: string;
message: string;
}
JSON response shape
{ success: true;
mode: string;
customerPreserved: boolean;
customerId: string | null;
workspaceCustomerDetached: boolean;
credentialAccountsDeleted: number;
sharedIdentityPreserved: boolean;
authIdentityDeleted: boolean;
manualProviderRevocationRequired: never[];
}
JSON response shape
{ success: true;
scope: string;
deletedAppIds: string[];
authIdentityDeleted: boolean;
manualProviderRevocationRequired: string[];
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: deleteUserAccount.

Authentication: Public or secret app API key; customer/session proof is still required wherever the operation acts on an identity.

Send JSON with Content-Type: application/json. Where multiple shapes are shown, the handler selects the applicable operation or validates nested input.

{ password?: string | undefined;
}
{ key: string;
revision: number;
occurrenceId: string;
properties: Record<string, string>;
attemptId?: string | undefined;
sequence?: number | undefined;
}
JSON response shape
{ error: string;
message: string;
}
JSON response shape
{ success: true;
mode: string;
customerPreserved: boolean;
customerId: string | null;
workspaceCustomerDetached: boolean;
credentialAccountsDeleted: number;
sharedIdentityPreserved: boolean;
authIdentityDeleted: boolean;
manualProviderRevocationRequired: never[];
}
JSON response shape
{ success: true;
scope: string;
deletedAppIds: string[];
authIdentityDeleted: boolean;
manualProviderRevocationRequired: string[];
}

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: deleteUserAccount.

Authentication: Provider OAuth callback. Use the SDK-generated authorization flow and validated state; do not call this as a standalone app endpoint.

Required query parameters: code and state from the provider authorization flow.

A redirect completes the provider flow. Errors use the common error envelope.

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: inline route handler.

Authentication: Provider OAuth callback. Use the SDK-generated authorization flow and validated state; do not call this as a standalone app endpoint.

Apple sends application/x-www-form-urlencoded form fields: required state, plus id_token, code, and user when supplied by Apple. This is the provider form-post callback, not a JSON app request.

A redirect completes the provider flow. Errors use the common error envelope.

Errors: validation/authentication failures use the common error envelope. A missing or inaccessible target returns an error; never interpret it as an empty successful result.

Implementation · Handler: inline route handler.