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"

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
preset_permissions
ServiceAccountPresetPermissionsRequestV1 · object | null

What the service account may do. Can be changed later. Omit to give the account access through role assignments instead, where custom roles are enabled; its preset then can't be set later. Temporary; may be removed once fine-grained access control is available.

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

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.

preset_permissions
ServiceAccountPresetPermissionsV1 · object | null

What the service account may do. Null when its access comes from its role assignments instead. Temporary; may be removed once fine-grained access control is available.

last_used_at
string<date-time> | null

Last time a request authenticated as this account, to within an hour. Null until the first.