Create a token
Logs a user in. Needs no authentication. The token expires 30 minutes after its last use, and ends the earlier
tokens of the user. When the user has MFA, send mfa_token or a valid trusted_token.
application/json- body
email*stringThe email address of the user.
password*stringThe password of the user.
mfa_token?stringA code from the authenticator app or the SMS, or a recovery code.
force_send_sms?booleanSend an SMS code when the user has both SMS and an authenticator app.
generate_trusted_token?booleanReturn a trusted_token, valid for 14 days, so the device can log in without an MFA code.
trusted_token?stringA trusted token from an earlier login, instead of an MFA code.
The user is logged in.
application/json- response
id?stringThe token. Send it as the username of HTTP Basic authentication.
created?stringdate-timemerchant_id?stringuuidaccount_id?stringThe ID of the user.
uuidemail?stringlegal_name?stringexpiration?stringWhen the token expires, unless it's used before.
date-timeexpiration_period?stringHow long the token lasts after its last use, as an ISO 8601 duration.
status?string"active""inactive""invalid""expired"permissions?Path permissions, see Permissions.
field_permissions?The field permissions of the user, when it has any.
allowed_project_ids?array<string>The projects the user may read.
trusted_token?stringThe new trusted token, when you sent generate_trusted_token or trusted_token.
curl -X POST 'https://api.example.com/v1/tokens/' \ --user "$API_KEY:" \ -H 'Content-Type: application/json' \ -d '{ "email": "ops@example.com", "password": "correct-Horse-battery-7"}'{ "id": "4c0ffee5c0ffee5c0ffee5c0ffee5c0f", "created": "2026-04-30T12:16:28.598389+00:00", "merchant_id": "b09a6915-71f8-4597-986e-c431d37a09b8", "account_id": "845c16de-f627-48cb-bc81-a6b3b1fb134b", "email": "ops@example.com", "legal_name": "Example user", "expiration": "2026-04-30T12:46:28.598171+00:00", "expiration_period": "PT30M", "status": "active", "permissions": { "/merchants/self/": { "GET": true }, "/merchants/self/users/self/": { "GET": true, "PUT": true }, "/orders/**": { "GET": true }, "/search/orders/": { "POST": true } }, "trusted_token": "7e57c0de7e57c0de7e57c0de7e57c0de7e57c0de"}