Skip to main content
POST
Create an API key

Authorizations

Authorization
string
header
required

A session token from subscriber login, used by subscriber.dev's own apps. Requests about an environment also need its ID in the x-environment-id header. From your own code, use an API key.

Body

application/json
name
string
required
Required string length: 1 - 255
access
enum<string>

limited (the default) can trigger workflows and create or update subscribers. full can call every endpoint an API key can.

Available options:
limited,
full
scopes
enum<string>[]

Pick scopes yourself instead of access.

Minimum array length: 1
Available options:
workflows:trigger,
workflows:read,
workflows:write,
broadcasts:read,
broadcasts:write,
subscribers:read,
subscribers:write,
emails:test,
integrations:read,
integrations:write,
uploads:write,
events:read,
analytics:read,
billing:read

Response

publicId
string
required
name
string
required
start
string
required

The first characters of the key, to recognise it

scopes
enum<string>[]
required
Available options:
workflows:trigger,
workflows:read,
workflows:write,
broadcasts:read,
broadcasts:write,
subscribers:read,
subscribers:write,
emails:test,
integrations:read,
integrations:write,
uploads:write,
events:read,
analytics:read,
billing:read
lastUsedAt
string<date-time> | null
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
createdAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
key
string
required

The API key. It's only shown this once.