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

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
toRemove
object[]
required

Response

200 - application/json

Successful response

perms
object[]
required