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.

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
  • 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":["36879bef-41f7-4ade-a8ce-e753d033483f","e0e639ad-aabe-4c7f-963b-7696d3e265e4","ccc3f38f-e635-4cf9-9a35-60c2be014b63"],"target_type":"network","target_uuid":"bd3efa8c-a5ad-4170-a903-5c15d182bdca"}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}

# Payload
{
  "assignees": [
    "36879bef-41f7-4ade-a8ce-e753d033483f",
    "e0e639ad-aabe-4c7f-963b-7696d3e265e4",
    "ccc3f38f-e635-4cf9-9a35-60c2be014b63"
  ],
  "target_type": "network",
  "target_uuid": "bd3efa8c-a5ad-4170-a903-5c15d182bdca"
}
Response examples (200)
{
  "successful": [
    "uuid-1",
    "uuid-2"
  ],
  "failed": []
}
Response examples (422)
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is invalid."
    ]
  }
}