Skip to main content
POST
Create an API token

Authorizations

X-Auth-Token
string
header
required

FlowPayroll JWT (raw token, no Bearer prefix)

Headers

Idempotency-Key
string

Your own key for this create, so a retry after a lost response finds what the first attempt made instead of making a second one. Any unique string up to 255 characters; a UUID is the usual choice. Send the same value on every retry of the same request, and a new value for a new one — reusing a key for a different body answers 409 idempotency_key_reused. Keys are remembered for 24 hours. Optional, and a request without one simply has no replay protection.

Maximum string length: 255

Body

application/json

Issues a new API token (client credential) for your account.

name
string | null

Required. A display name, unique within your account.

organisationIds
string[] | null
deprecated

Deprecated: use access. Deprecated: use access with Organisation entries. The organisations the token reaches. State exactly one of this and allOrganisations.

allOrganisations
boolean | null
deprecated

Deprecated: use access. Deprecated: use access with an Account entry. Give the credential access to every organisation the account owns, including ones added later, instead of the ones named in organisationIds. State exactly one of the two. This is the widest grant this API makes, so only somebody who already holds account-wide access may ask for it.

access
object[] | null

The access to give: one grant per scope, each with its own role. Replaces organisationIds, allOrganisations and roleId, which are deprecated: send one or the other, never both (400 access_with_deprecated_fields).

allowedIpRanges
string[] | null

Optional. Address ranges the token may be used from, such as ["203.0.113.0/24"]: up to 20, IPv4 or IPv6. Leave it out to allow any address. A request from anywhere else is refused, here and on every other API.

Response

OK

message
object
content
object
validationIssues
object[] | null