Skip to main content
POST
/
api
/
roles
/
{id}
/
perms
cURL
curl --request POST \
  --url https://app.cotool.ai/api/roles/{id}/perms \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "toAdd": [
    {
      "resource": {
        "type": "all"
      },
      "action": "agent.create"
    }
  ],
  "toRemove": [
    {
      "resource": {
        "type": "all"
      },
      "action": "agent.create"
    }
  ]
}'
{
  "perms": [
    {
      "resource": {
        "type": "all"
      },
      "action": "agent.create"
    }
  ]
}

Authorizations

Authorization
string
header
required

API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here

Path Parameters

id
string
required

Body

application/json
toAdd
object[]
required
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
  • Option 15
  • Option 16
  • Option 17
toRemove
object[]
required
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
  • Option 15
  • Option 16
  • Option 17

Response

200 - application/json

Successful response

perms
object[]
required
  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
  • Option 6
  • Option 7
  • Option 8
  • Option 9
  • Option 10
  • Option 11
  • Option 12
  • Option 13
  • Option 14
  • Option 15
  • Option 16
  • Option 17