POST
/
api
/
{organization_id}
/
teams
/
{team_id}
/
roles
Create team role
curl --request POST \
  --url https://api.select.dev/api/{organization_id}/teams/{team_id}/roles \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "role": "admin",
  "scope": {
    "type": "organization",
    "id": "<string>"
  }
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "role": "admin",
  "scope": {
    "type": "organization",
    "id": "<string>",
    "name": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

team_id
string<uuid>
required

The ID of the team

organization_id
string
required

Body

application/json

The role configuration to create

role
enum<string>
required

The role level to grant (admin, editor, monitor_editor, or viewer)

Available options:
admin,
editor,
monitor_editor,
viewer
scope
object | null

The scope for this role. If not provided, creates an organization-wide role Scope definition for creating/updating role assignments (request only).

Response

Successful Response

Team role information returned by public API.

id
string<uuid>
required

The unique identifier of this role assignment

role
enum<string>
required

The role level (admin, editor, monitor_editor, or viewer)

Available options:
admin,
editor,
monitor_editor,
viewer
scope
object
required

The scope this role applies to

created_at
string<date-time>
required

When the role was created

updated_at
string<date-time>
required

When the role was last updated