Create an API token
POST
/api-tokens
const url = 'https://api.warmup.social/api-tokens';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Reporting script","expiresAt":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.warmup.social/api-tokens \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Reporting script", "expiresAt": "2026-04-15T12:00:00Z" }'Returns the token value ONCE. Requires a dashboard session; a request authenticated with an API token gets 403. Usually you create tokens in the dashboard.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
A label to recognize the token in the list.
string
Example
Reporting scriptexpiresAt
Expiry time (ISO 8601), or null for a token that never expires.
string format: date-time
Responses
Section titled “Responses”Token created. The token field is shown only once.
Media typeapplication/json
object
token
required
The token value. Shown only once.
string
info
required
object
id
required
string format: uuid
name
required
string
prefix
required
Display prefix, e.g. wmp_a1b2.
string
lastUsedAt
required
string format: date-time
expiresAt
required
string format: date-time
createdAt
required
string format: date-time
Example
{ "token": "wmp_8f3c...redacted", "info": { "prefix": "wmp_a1b2" }}Invalid request.
Media typeapplication/json
object
statusCode
required
integer
message
required
One of:
string
Array<string>
object
key
additional properties
any
error
string
key
additional properties
any
Example
{ "statusCode": 400, "message": "Invalid request", "error": "Bad Request"}The Bearer token is missing or invalid.
Media typeapplication/json
object
statusCode
required
integer
message
required
One of:
string
Array<string>
object
key
additional properties
any
error
string
key
additional properties
any
Example
{ "statusCode": 400, "message": "Invalid request", "error": "Bad Request"}Not enough permissions.
Media typeapplication/json
object
statusCode
required
integer
message
required
One of:
string
Array<string>
object
key
additional properties
any
error
string
key
additional properties
any
Example
{ "statusCode": 400, "message": "Invalid request", "error": "Bad Request"}