Skip to content

Creates a new service account in the project. This also returns an unredacted API key for the service account.

POST
/organization/projects/{project_id}/service_accounts

Authorizations

Parameters

Path Parameters

project_id
required
string

The ID of the project.

Request Body required

The project service account create request payload.

object
name
required

The name of the service account being created.

string

Responses

200

Project service account created successfully.

object
object
required
string
Allowed values: organization.project.service_account
id
required
string
name
required
string
role
required

Service accounts can only have one role of type member

string
Allowed values: member
created_at
required
integer
api_key
required
object
object
required

The object type, which is always organization.project.service_account.api_key

string
Allowed values: organization.project.service_account.api_key
value
required
string
name
required
string
created_at
required
integer
id
required
string

400

Error response when project is archived.

object
error
required
object
code
required
string
nullable
message
required
string
param
required
string
nullable
type
required
string