Skip to main content
POST
Assign Service Account Role

Authorizations

Authorization
string
header
required

OAuth 2.0 client credentials. Alternatively, you can authenticate with a personal access token (PAT) by sending Authorization: Basic base64(email:PAT).

Scopes

management:service-accounts:write

Write access to service account resources.

Path Parameters

id
string<uuid>
required

Service account identifier (UUID).

Body

application/json
role_id
string<uuid>
required

Role to assign. Must exist in the organization.

Response

OK. The role is already assigned; returns the existing assignment.

A direct role assignment made via POST /service-accounts/{id}/roles.

id
string<uuid>

Assignment identifier.

service_account_id
string<uuid>

The service account this role is assigned to.

role_id
string<uuid>

The role identifier.

role_name
string

The name of the role.

role_type
enum<string>

Always system_role (admin) for assignments made via this endpoint.

Available options:
system_role
grant_type
enum<string>

Always direct.

Available options:
direct
granted_at
string<date-time>

ISO 8601 UTC.

granted_by
string<uuid>

The user who granted the role.

Last modified on September 2, 2026