Create a new API token for the caller's affiliate.

Requires the AccountAdmin policy and the api_tokens feature. On success returns
201 Created with a Location header pointing at the new token and a body that
includes the one-time raw token secret. This raw secret is shown only here and cannot
be retrieved again, so the caller must persist it immediately.

🔐 Required permission: AccountAdmin

🔐 Requires an Affiliate context (AffiliateId in header or token)

🚩 Requires feature: api_tokens

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The request data for creating the new API token (name, optional expiration, optional scopes).

Request to create a new API token.

string | null

Human-friendly name for the token (shown in listings). Required.

date-time | null

Optional UTC expiry; when omitted a default expiry is applied by the service.

scopes
array of strings | null

Optional set of scope strings limiting what the token may access; null/empty grants the account's default scope.

scopes
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json