Skip to main content
POST
/
role-bindings
Create a new RoleBinding
curl --request POST \
  --url https://api.emulator.farm/v1/role-bindings \
  --header 'Content-Type: application/json' \
  --header 'X-EMULATOR-FARM-API-KEY: <api-key>' \
  --data '
{
  "role_id": "550e8400-e29b-41d4-a716-446655440000",
  "subject_type": "user",
  "subject_id": "550e8400-e29b-41d4-a716-446655440000"
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "role_id": "550e8400-e29b-41d4-a716-446655440000",
  "subject_type": "user",
  "subject_id": "550e8400-e29b-41d4-a716-446655440000",
  "created_at": "2025-12-10T12:00:00Z"
}

Authorizations

X-EMULATOR-FARM-API-KEY
string
header
required

Body

application/json
role_id
string<uuid>
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

subject_type
enum<string>
required
Available options:
user,
service_account
Example:

"user"

subject_id
string<uuid>
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

RoleBinding created successfully

id
string<uuid>
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

role_id
string<uuid>
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

subject_type
enum<string>
required
Available options:
user,
service_account
Example:

"user"

subject_id
string<uuid>
required
Example:

"550e8400-e29b-41d4-a716-446655440000"

created_at
string<date-time>
required
Example:

"2025-12-10T12:00:00Z"