DotsDocs
Team

Create an Organization Custom Role

Create a custom role on the organization. Assign it to team members with `update-organization-developer` or to new members with `create-organization-developer-invite`.

POST
/v2/organizations/roles

Create a custom role on the organization. Assign it to team members with update-organization-developer or to new members with create-organization-developer-invite.

Authorization

api_key
headerAuthorizationBasic <token>

Request Body

application/json
  1. body
name*string

Name of the role. Must be unique among the scope's active custom roles.

Length1 <= length <= 100
actions*array<>

Permissions the role grants.

Response Body

Created

application/json
  1. response
id?string
Formatuuid
name?string
actions?array<>

Permissions the role grants, sorted.

scope?string

Whether the role belongs to an App or to the organization.

Value in"app""organization"
Example Request
curl -X POST 'https://api.dots.dev/api/v2/organizations/roles' \  -H 'Content-Type: application/json' \  -d '{  "name": "Payout operator",  "actions": [    "get",    "create_payout",    "view_payouts_tab"  ]}'
Example Response
{  "id": "8a5f8a7e-1b0f-4f4b-9b2e-3c8d6f1e2a90",  "name": "Payout operator",  "actions": [    "create_payout",    "get",    "view_payouts_tab"  ],  "scope": "organization"}