Assign or revoke a role Run in API Explorer

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://apidocs.plannrcrm.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "PlannrCRM MCP server": {
    "url": "https://apidocs.plannrcrm.com/mcp"
  }
}

Close
POST /api/v2/roles/{role_uuid}/{action}

Assign or revoke a role for one or more accounts. The action is determined by the URL parameter. Optionally scope the assignment to a specific target resource (e.g. a network). Processing is best-effort: each assignee is processed independently and the response reports which succeeded and which failed, both as lists of account UUIDs.

Headers

  • X-PLANNR-ACCOUNT-UUID string

Path parameters

  • role_uuid string Required
  • action string Required

    The action to perform.

  • role string Required

    The UUID of the role.

application/json

Body

  • assignees array[string(uuid)] Required

    An array of user UUIDs to assign or revoke the role for.

  • target_type string

    The type of target resource to scope the assignment to.

  • target_uuid string(uuid)

    The UUID of the target resource.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • successful array[string]
    • failed array[string]
  • 422 application/json

    Validation error

    Hide response attributes Show response attributes object
    • message string Required

      A human-readable description of the error.

    • errors object

      Validation messages keyed by the field that failed.

      Hide errors attribute Show errors attribute object
      • * array[string] Additional properties
POST /api/v2/roles/{role_uuid}/{action}
curl \
 --request POST 'https://api.plannrcrm.com/api/v2/roles/6ff8f7f6-1eb3-3525-be4a-3932c805afed/assign' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
 --data '{
  "assignees": [
    "58cfec29-7200-4e40-b1f7-b89caa1d8793",
    "52b828cb-e5e7-4bff-aa8c-7f2cfa0c4e89",
    "ddbc1bb5-44b0-48a2-a220-0e7c8ecc70d1"
  ],
  "target_type": "network",
  "target_uuid": "ae160b5c-61a4-4434-8542-eadb65521c39"
}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}

# Payload
{
  "assignees": [
    "58cfec29-7200-4e40-b1f7-b89caa1d8793",
    "52b828cb-e5e7-4bff-aa8c-7f2cfa0c4e89",
    "ddbc1bb5-44b0-48a2-a220-0e7c8ecc70d1"
  ],
  "target_type": "network",
  "target_uuid": "ae160b5c-61a4-4434-8542-eadb65521c39"
}
Response examples (200)
{
  "successful": [
    "uuid-1",
    "uuid-2"
  ],
  "failed": [
    "uuid-3"
  ]
}
Response examples (422)
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is invalid."
    ]
  }
}