Skip to main content
POST
Assign Service Account Role

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

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.