API reference / Authentication
Sign in an end user
POST/v1/auth/login
API key requiredSandbox key onlySupports Idempotency-Key
Checks one proof among those you enabled and opens a session. Call it from your server with your API key. proof.method is password (field password), sms_code (field code, request it first with POST /v1/auth/challenge; 123456 in sandbox) or totp (field code, from the authenticator app of the user). Every failure is 401 invalid_credentials: an unknown identifier, a wrong proof and a method the user has not set up are indistinguishable. After 5 consecutive failures the identifier is locked for 15 minutes (429 with Retry-After, doubled at each new lock, 24 h at most). A suspended user gets 409 user_suspended once the proof is valid.
Authentication#
Send a secret API key as Authorization: Bearer <key>. This route only accepts sandbox keys (tp_test_…); a live key gets 403 sandbox_only.
Parameters#
Headers
| Name | Type | Description |
|---|---|---|
Idempotency-Key | string | Idempotency key (1 to 255 characters, UUID v4 recommended). Responses are replayed for 24 h. |
See Idempotency.
Request body#
end_user_ipstringNetwork address of your user, as seen by your server. Attempt limits are counted per address: without it, they are counted per project (a looser cap), because the API only sees your server.
max length: 45
Example
"203.0.113.7"identifierobjectrequiredHow the user identifies themselves.
typestringrequiredKind of identifier (must be accepted by your project).
One of
tagnamephoneemailExample
"email"valuestringrequired
proofobjectrequiredThe proof given by the user.
methodstringrequiredKind of proof (must be enabled for your project).
One of
passwordsms_codetotpExample
"password"passwordstringWith
method: password.min length: 1 · max length: 128
codestringWith
sms_codeortotp.pattern: ^\d{4,10}$
Example
"123456"
{
"identifier": {
"type": "email",
"value": "[email protected]"
},
"proof": {
"method": "password",
"password": "correct horse battery"
}
}Responses#
200Session opened.
Headers
X-Request-IdRequest identifier.X-RateLimit-LimitQuota of the current window.X-RateLimit-RemainingRequests remaining in the window.X-RateLimit-ResetSeconds before the quota renews.
Body
objectstringrequiredalways "session"
Example
"session"token_typestringrequiredalways "Bearer"
Example
"Bearer"access_tokenstringrequiredAccess token, to send as
Authorization: Bearer.Example
"tpu_at_ZmFrZQ"access_token_expires_atstringrequiredWhen the access token expires (15 minutes).
format: date-time
Example
"2026-10-08T09:30:00.000Z"refresh_tokenstringrequiredRefresh token, valid 30 days, single use.
Example
"tpu_rt_ZmFrZQ"refresh_token_expires_atstringrequiredWhen the refresh token expires.
format: date-time
Example
"2026-10-08T09:30:00.000Z"userobjectrequiredA user with their extended profile.
idstringrequiredOpaque identifier.
Example
"4821"objectstringrequiredalways "user"
Example
"user"phonestring | nullrequiredPhone number in E.164 format,
nullfor a user who signed up without one.Example
"+33612345678"external_idstring | nullrequiredYour own identifier for this user.
Example
"cust_8f2a"verifiedbooleanrequiredThe phone number has been verified.
Example
truekyc_statusstringrequiredIdentity verification (KYC) status.
One of
nonependingapprovedrejectedExample
"approved"suspendedbooleanrequiredThe user is suspended and can no longer transact.
Example
falselivemodebooleanrequiredtruefor a live key,falsefor a sandbox key.Example
falsewallet_statusstringrequiredState of the user’s wallet.
ready: the wallet exists.pending: its creation is in progress or being retried (never blocks the user; pollGET /v1/users/{id}/wallets).failed: creation was abandoned after repeated errors (contact support).none: no wallet is created at this step.One of
nonependingreadyfailedExample
"ready"created_atstringrequiredCreation date.
format: date-time
Example
"2026-10-08T09:30:00.000Z"last_login_atstring | nullrequiredLast sign-in.
format: date-time
Example
"2026-10-08T09:30:00.000Z"profileobject | nullrequiredExtended profile of a user, collected by your signup flow. Personal data: returned only by
GET /v1/users/{id}andPATCH /v1/users/{id}, never in lists, events or webhooks.objectstringrequiredalways "profile"
Example
"profile"emailstring | nullrequiredEmail address (lowercased).
Example
"[email protected]"first_namestring | nullrequiredFirst name.
Example
"Ada"last_namestring | nullrequiredLast name.
Example
"Lovelace"birth_datestring | nullrequiredDate of birth (YYYY-MM-DD).
Example
"1990-12-10"countrystring | nullrequiredCountry (ISO 3166-1 alpha-2).
Example
"FR"referral_codestring | nullrequiredReferral code entered at signup.
Example
"ADA2026"terms_acceptanceobject | nullrequiredAcceptance of your terms.
versionstringrequiredVersion of the terms accepted.
Example
"2026-10"accepted_atstringrequiredWhen the user accepted them.
format: date-time
Example
"2026-10-08T09:30:00.000Z"
tagnamestring | nullrequiredUsername chosen by the user.
Example
"ada_l"updated_atstringrequiredLast update.
format: date-time
Example
"2026-10-08T09:30:00.000Z"
{
"object": "session",
"token_type": "Bearer",
"access_token": "tpu_at_ZmFrZQ",
"access_token_expires_at": "2026-10-08T09:30:00.000Z",
"refresh_token": "tpu_rt_ZmFrZQ",
"refresh_token_expires_at": "2026-10-08T09:30:00.000Z",
"user": {
"id": "4821",
"object": "user",
"phone": "+33612345678",
"external_id": "cust_8f2a",
"verified": true,
"kyc_status": "approved",
"suspended": false,
"livemode": false,
"created_at": "2026-10-08T09:30:00.000Z",
"wallet_status": "ready",
"last_login_at": null,
"profile": {
"object": "profile",
"email": "[email protected]",
"first_name": "Ada",
"last_name": "Lovelace",
"birth_date": "1990-12-10",
"country": "FR",
"referral_code": "ADA2026",
"terms_acceptance": {
"version": "2026-10",
"accepted_at": "2026-10-08T09:29:00.000Z"
},
"tagname": "ada_l",
"updated_at": "2026-10-08T09:30:00.000Z"
}
}
}400Invalid request (malformed JSON, unknown cursor, invalid Idempotency-Key header).
Example: invalid_cursor
{
"error": {
"type": "invalid_request_error",
"code": "invalid_cursor",
"message": "starting_after: unknown cursor",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}401Missing, invalid or revoked API key.
Example: missing_api_key
{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "Provide your API key as \"Authorization: Bearer <key>\"",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}Example: invalid_api_key
{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key is invalid",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}Example: api_key_revoked
{
"error": {
"type": "authentication_error",
"code": "api_key_revoked",
"message": "This API key has been revoked",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}403Organization suspended, live access not enabled, or sandbox-only route.
Example: organization_suspended
{
"error": {
"type": "permission_error",
"code": "organization_suspended",
"message": "Your organization is suspended. Contact Tilt Pay support.",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}Example: live_not_enabled
{
"error": {
"type": "permission_error",
"code": "live_not_enabled",
"message": "Live access has not been enabled for your organization yet",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}Example: sandbox_only
{
"error": {
"type": "permission_error",
"code": "sandbox_only",
"message": "This route is only available with a sandbox API key",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}409Conflict with the state of the resource, or the original idempotent request is still in progress.
Example: user_already_exists
{
"error": {
"type": "invalid_request_error",
"code": "user_already_exists",
"message": "A user with this phone number already exists",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}422Invalid parameter, or Idempotency-Key reused with a different body.
Example: validation_error
{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "phone: has an invalid format",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}Example: idempotency_key_reuse
{
"error": {
"type": "idempotency_error",
"code": "idempotency_key_reuse",
"message": "This Idempotency-Key was already used with a different request",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}429Rate limit exceeded. Retry after the Retry-After delay (seconds).
Example: rate_limit_exceeded
{
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Too many requests. Slow down and retry after the delay in Retry-After.",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}500Internal error. Retry; give request_id to support if it persists.
Example: internal_error
{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "Internal server error",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}503Temporarily unavailable: the API is in maintenance (maintenance_mode, with a Retry-After delay in seconds) or a dependency of this route is unavailable. Retry after the delay.
Example: maintenance_mode
{
"error": {
"type": "api_error",
"code": "maintenance_mode",
"message": "The API is temporarily unavailable for maintenance.",
"request_id": "0b2c8f6e-41f9-4c0a-8d55-6f6a3c1d9e21"
}
}Headers on every response
X-Request-IdIdentifier of the request, also present in error bodies. Give it to support.X-API-VersionVersion of the API that answered.X-RateLimit-Limit / -Remaining / -ResetQuota of your key for the current window. See Rate limits.
Errors#
Errors share one format, described in Errors. Branch your code on error.code.
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_cursor | Invalid request (malformed JSON, unknown cursor, invalid Idempotency-Key header). |
| 401 | missing_api_key | Missing, invalid or revoked API key. |
| 401 | invalid_api_key | Missing, invalid or revoked API key. |
| 401 | api_key_revoked | Missing, invalid or revoked API key. |
| 401 | invalid_credentials | Incorrect identifier or proof. |
| 403 | organization_suspended | Organization suspended, live access not enabled, or sandbox-only route. |
| 403 | live_not_enabled | Organization suspended, live access not enabled, or sandbox-only route. |
| 403 | sandbox_only | Organization suspended, live access not enabled, or sandbox-only route. |
| 409 | user_already_exists | Conflict with the state of the resource, or the original idempotent request is still in progress. |
| 409 | user_suspended | The user is suspended. |
| 422 | validation_error | Invalid parameter, or Idempotency-Key reused with a different body. |
| 422 | idempotency_key_reuse | Invalid parameter, or Idempotency-Key reused with a different body. |
| 422 | auth_method_disabled | The proof or identifier is not enabled for your project. |
| 429 | rate_limit_exceeded | Too many failures: the identifier or the address is locked for a while. |
| 500 | internal_error | Internal error. Retry; give request_id to support if it persists. |
| 503 | maintenance_mode | Temporarily unavailable: the API is in maintenance (maintenance_mode, with a Retry-After delay in seconds) or a dependency of this route is unavailable. Retry after the delay. |