EvoHub Docs Sign in

Organization API › Invitations

Invite someone

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/invitations

Emails an invitation to join the organization, valid for seven days. role is the standing (default member); role_ids and team_ids are what the person gets on arrival. The key must hold every permission those carry, and only an administrator invites an administrator.

An invitation names who sent it, so it needs a personal key: an organization key gets 403 NOT_A_PERSON. The answer's token is empty (""): the email is the only place the invitation's secret goes.

Permission (API-key scope): identity:user:invite.

Authorization

Any one of:

Request body required

Content type: application/json

Type: object

  • email string (email) required
  • role string
    One of: admin member viewer · Default: member
  • role_ids array of string
  • team_ids array of string

Responses

201

The invitation.

Content type: application/json

Type: object

  • data Invitation required
    Show Invitation properties
    • id string required
    • org_id string required
    • email string (email) required
    • role string required
      One of: admin member viewer
    • role_ids array of string | null
      Roles held on arrival.
    • team_ids array of string | null
      Teams joined on arrival.
    • token string
      The secret the invitation email carries. Always empty ("") in a response to the organization; only the email carries it.
    • status string required
      One of: pending accepted declined expired
    • invited_by string required
    • expires_at string (date-time) required
      Seven days after it was sent (or last resent).
    • accepted_at string (date-time)
    • created_at string (date-time) required
  • success boolean required
    Value: true

400

Not JSON (INVALID_BODY), no email (VALIDATION_FAILED), or role is not admin, member or viewer (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 or a permission the invitation grants (FORBIDDEN), an administrator is being invited (ADMIN_ONLY), or it is an organization key (NOT_A_PERSON).

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

A role or team named does not exist (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 address already has a pending invitation (INVITATION_PENDING); resend it instead.

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/invitations' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <TOKEN>' \
  -d '{
  "role": "member",
  "email": "deniz@acme.example",
  "role_ids": [
    "role_8e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b"
  ],
  "team_ids": [
    "team_2f9c4b7e-1a3d-4c5e-9f7a-0b2d4e6f8a1c"
  ]
}'

Last updated