DotsDocs
Team

Update an App Custom Role

Rename a custom role or replace its actions. Only the fields you send change. Team members with the role get the new actions immediately.

PATCH
/v2/roles/{role_id}

Rename a custom role or replace its actions. Only the fields you send change. Team members with the role get the new actions immediately.

Authorization

api_key
headerAuthorizationBasic <token>

Path Parameters

role_id*string

ID of the custom role.

Formatuuid

Request Body

application/json
  1. body
Properties1 <= properties
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

OK

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 PATCH 'https://api.dots.dev/api/v2/roles/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "actions": [    "get",    "create_payout",    "cancel_transfer",    "view_payouts_tab"  ]}'
Example Response
{  "id": "8a5f8a7e-1b0f-4f4b-9b2e-3c8d6f1e2a90",  "name": "Payout operator",  "actions": [    "create_payout",    "get",    "view_payouts_tab"  ],  "scope": "app"}