EvoHub Docs Sign in

Organization API › Roles

Give a role to a member

Use with AI
View as MarkdownThis page as plain text, for pasting into an AI tool Open in ClaudeAsk Claude questions about this page Open in ChatGPTAsk ChatGPT questions about this page
Connect to Cursor / VS Code / ClaudeSearch and read these docs from your AI tool (MCP server)

MCP server URL

https://docs-dev.evohub.io/mcp

Claude Code

claude mcp add --transport http evohub-docs-docs https://docs-dev.evohub.io/mcp

Claude (claude.ai and Claude Desktop): Settings → Connectors → Add custom connector, and paste the URL above.

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "evohub-docs-docs": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://docs-dev.evohub.io/mcp"
      ]
    }
  }
}

Cursor — ~/.cursor/mcp.json

{
  "mcpServers": {
    "evohub-docs-docs": {
      "url": "https://docs-dev.evohub.io/mcp"
    }
  }
}

VS Code — .vscode/mcp.json

{
  "servers": {
    "evohub-docs-docs": {
      "type": "http",
      "url": "https://docs-dev.evohub.io/mcp"
    }
  }
}
POST/api/v1/roles/{id}/users

Gives the member the role. The key must hold every permission in it; the Admin role is given only by an administrator, and the owner's roles do not change.

Permission (API-key scope): identity:role:write.

Authorization

Any one of:

Parameters

Path parameters

  • id string required
    The id of the member (usr_…), team (team_…), role (role_…), invitation (inv_…) or organization (org_…) the path names.

Request body required

Content type: application/json

Type: object

  • user_id string required

Responses

204

Given.

400

Not JSON (INVALID_BODY), or no user_id (VALIDATION_ERROR).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.
    • request_id string
      The response's X-Request-ID; quote it to support.

401

No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.
    • request_id string
      The response's X-Request-ID; quote it to support.

403

The key lacks the scope (FORBIDDEN); the change would grant a permission the key does not hold (FORBIDDEN, naming it); or only an administrator may do it (ADMIN_ONLY).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.
    • request_id string
      The response's X-Request-ID; quote it to support.

404

No such role in the organization (NOT_FOUND).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.
    • request_id string
      The response's X-Request-ID; quote it to support.

409

The member is the owner (OWNER_ROLE).

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.
    • request_id string
      The response's X-Request-ID; quote it to support.

429

Too many requests (RATE_LIMITED). Wait Retry-After seconds.

Headers

  • Retry-After integer
    Seconds to wait.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.
    • request_id string
      The response's X-Request-ID; quote it to support.

500

Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.

Content type: application/json

Type: Error

  • error object required
    • code string required
      Machine-readable code. Branch on this.
    • message string required
      Human-readable explanation.
    • request_id string
      The response's X-Request-ID; quote it to support.

Example request

curl -X POST 'https://evohub.io/api/v1/roles/string/users' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <TOKEN>' \
  -d '{
  "user_id": "usr_7a3c9e10-b2d4-4f6a-8c1e-5d7f9a0b2c3e"
}'

Last updated