Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Body

application/json

Request to create a service account.

name
string
required

Name, unique in the organization. Can be changed later.

Required string length: 1 - 255
Example:

"ci-deployer"

preset_permissions
ServiceAccountPresetPermissionsRequestV1 · object
required

What the service account may do. Can be changed later. Temporary; may be removed once fine-grained access control is available.

description
string | null

Optional description, up to 1,024 characters

Maximum string length: 1024
team_id
string | null

The team that owns the account. Omit for an organization account. Can't be changed.

Minimum string length: 1

Response

200 - application/json

A named service account that workload identity federation tokens act as.

id
string
required

Service account ID

name
string
required

Name, unique in the organization

preset_permissions
ServiceAccountPresetPermissionsV1 · object
required

What the service account may do. Temporary; may be removed once fine-grained access control is available.

disabled
boolean
required

Whether the account is disabled. A disabled account can't be used.

created_at
string<date-time>
required

Time the account was created

updated_at
string<date-time>
required

Time the account was last updated

description
string | null

Description

team_id
string | null

The team that owns the account. Null for an organization account.

last_used_at
string<date-time> | null

Last time a token was exchanged for this account. Null until the first.