Docs

API reference / Authentication

Sign up an end user

POST/v1/auth/signup

API key requiredSandbox key onlySupports Idempotency-Key

Creates a user and opens their first session. Call it from your server with your API key, then hand the session tokens to the browser or app of the user. The identifiers and proofs accepted come from the flow you chose in the Hub (GET /v1/signup-config, authentication and flow): give at least one accepted identifier (tagname, phone, email) and a proof: a password (10 to 128 characters), or a phone when the code-by-SMS proof is enabled. Profile fields are validated like in POST /v1/users. A simulated wallet is created in sandbox. Anything not enabled for your project is refused. Available with sandbox keys only for now.

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

Header parameters
NameTypeDescription
Idempotency-KeystringIdempotency key (1 to 255 characters, UUID v4 recommended). Responses are replayed for 24 h.

See Idempotency.

Request body#

  • end_user_ipstring

    Network 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"

  • tagnamestring

    Username. Identifier tagname; unique in your project, case-insensitive.

    max length: 30

    Example "ada_l"

  • phonestring

    Phone number in E.164 format, for example +33612345678.

    pattern: ^\+[1-9]\d{6,14}$

    Example "+33612345678"

  • emailstring

    Email address. Identifier email; unique in your project. Not verified yet.

    max length: 254

    Example "[email protected]"

  • passwordstring

    Password chosen by the user (10 to 128 characters). Stored hashed, never returned.

    min length: 10 · max length: 128

  • external_idstring

    Your own identifier for this user.

    min length: 1 · max length: 128

    Example "cust_8f2a"

  • first_namestring

    First name. Module first_name.

    min length: 1 · max length: 100

    Example "Ada"

  • last_namestring

    Last name. Module last_name.

    min length: 1 · max length: 100

    Example "Lovelace"

  • birth_datestring

    Date of birth, YYYY-MM-DD. Module birth_date; the min_age option of your signup flow is enforced.

    pattern: ^\d{4}-\d{2}-\d{2}$

    Example "1990-12-10"

  • countrystring

    Country, ISO 3166-1 alpha-2. Module country; the allowed_countries option of your signup flow is enforced.

    pattern: ^[A-Za-z]{2}$

    Example "FR"

  • referral_codestring

    Referral code entered at signup. Stored as given; module referral_code.

    pattern: ^[A-Za-z0-9_-]{3,32}$

    Example "ADA2026"

  • terms_acceptanceobject

    Acceptance of your terms. Module terms_acceptance.

    • versionstringrequired

      Version of the terms accepted.

      min length: 1 · max length: 64

      Example "2026-10"

    • accepted_atstringrequired

      When the user accepted them (ISO 8601, not in the future).

      format: date-time

      Example "2026-10-08T09:29:00.000Z"

Example request body
{
  "tagname": "ada_l",
  "email": "[email protected]",
  "password": "correct horse battery"
}

Responses#

201User created, session opened.

Headers

  • X-Request-Id Request identifier.
  • X-RateLimit-Limit Quota of the current window.
  • X-RateLimit-Remaining Requests remaining in the window.
  • X-RateLimit-Reset Seconds before the quota renews.

Body

  • objectstringrequired

    always "session"

    Example "session"

  • token_typestringrequired

    always "Bearer"

    Example "Bearer"

  • access_tokenstringrequired

    Access token, to send as Authorization: Bearer.

    Example "tpu_at_ZmFrZQ"

  • access_token_expires_atstringrequired

    When the access token expires (15 minutes).

    format: date-time

    Example "2026-10-08T09:30:00.000Z"

  • refresh_tokenstringrequired

    Refresh token, valid 30 days, single use.

    Example "tpu_rt_ZmFrZQ"

  • refresh_token_expires_atstringrequired

    When the refresh token expires.

    format: date-time

    Example "2026-10-08T09:30:00.000Z"

  • userobjectrequired

    A user with their extended profile.

    • idstringrequired

      Opaque identifier.

      Example "4821"

    • objectstringrequired

      always "user"

      Example "user"

    • phonestring | nullrequired

      Phone number in E.164 format, null for a user who signed up without one.

      Example "+33612345678"

    • external_idstring | nullrequired

      Your own identifier for this user.

      Example "cust_8f2a"

    • verifiedbooleanrequired

      The phone number has been verified.

      Example true

    • kyc_statusstringrequired

      Identity verification (KYC) status.

      One ofnonependingapprovedrejected

      Example "approved"

    • suspendedbooleanrequired

      The user is suspended and can no longer transact.

      Example false

    • livemodebooleanrequired

      true for a live key, false for a sandbox key.

      Example false

    • wallet_statusstringrequired

      State of the user’s wallet. ready: the wallet exists. pending: its creation is in progress or being retried (never blocks the user; poll GET /v1/users/{id}/wallets). failed: creation was abandoned after repeated errors (contact support). none: no wallet is created at this step.

      One ofnonependingreadyfailed

      Example "ready"

    • created_atstringrequired

      Creation date.

      format: date-time

      Example "2026-10-08T09:30:00.000Z"

    • last_login_atstring | nullrequired

      Last sign-in.

      format: date-time

      Example "2026-10-08T09:30:00.000Z"

    • profileobject | nullrequired

      Extended profile of a user, collected by your signup flow. Personal data: returned only by GET /v1/users/{id} and PATCH /v1/users/{id}, never in lists, events or webhooks.

      • objectstringrequired

        always "profile"

        Example "profile"

      • emailstring | nullrequired

        Email address (lowercased).

        Example "[email protected]"

      • first_namestring | nullrequired

        First name.

        Example "Ada"

      • last_namestring | nullrequired

        Last name.

        Example "Lovelace"

      • birth_datestring | nullrequired

        Date of birth (YYYY-MM-DD).

        Example "1990-12-10"

      • countrystring | nullrequired

        Country (ISO 3166-1 alpha-2).

        Example "FR"

      • referral_codestring | nullrequired

        Referral code entered at signup.

        Example "ADA2026"

      • terms_acceptanceobject | nullrequired

        Acceptance of your terms.

        • versionstringrequired

          Version of the terms accepted.

          Example "2026-10"

        • accepted_atstringrequired

          When the user accepted them.

          format: date-time

          Example "2026-10-08T09:30:00.000Z"

      • tagnamestring | nullrequired

        Username chosen by the user.

        Example "ada_l"

      • updated_atstringrequired

        Last update.

        format: date-time

        Example "2026-10-08T09:30:00.000Z"

Example 201 response
{
  "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

Example 400 response
{
  "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

Example 401 response
{
  "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

Example 401 response
{
  "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

Example 401 response
{
  "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

Example 403 response
{
  "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

Example 403 response
{
  "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

Example 403 response
{
  "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

Example 409 response
{
  "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

Example 422 response
{
  "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

Example 422 response
{
  "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

Example 429 response
{
  "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

Example 500 response
{
  "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

Example 503 response
{
  "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-Id Identifier of the request, also present in error bodies. Give it to support.
  • X-API-Version Version of the API that answered.
  • X-RateLimit-Limit / -Remaining / -Reset Quota of your key for the current window. See Rate limits.

Errors#

Errors share one format, described in Errors. Branch your code on error.code.

Errors this route can return
StatusCodeMeaning
400invalid_cursorInvalid request (malformed JSON, unknown cursor, invalid Idempotency-Key header).
401missing_api_keyMissing, invalid or revoked API key.
401invalid_api_keyMissing, invalid or revoked API key.
401api_key_revokedMissing, invalid or revoked API key.
403organization_suspendedOrganization suspended, live access not enabled, or sandbox-only route.
403live_not_enabledOrganization suspended, live access not enabled, or sandbox-only route.
403sandbox_onlyOrganization suspended, live access not enabled, or sandbox-only route.
409user_already_existsThis phone number, email or external_id already exists in the project.
409tagname_already_takenThis tagname is already used by another user of the project.
422validation_errorInvalid or missing field (param names the field).
422idempotency_key_reuseInvalid parameter, or Idempotency-Key reused with a different body.
422auth_method_disabledThe proof or identifier is not enabled for your project.
429rate_limit_exceededToo many sign-ups from this address.
500internal_errorInternal error. Retry; give request_id to support if it persists.
503maintenance_modeTemporarily 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.