ONE world:invite-member
← Receivers

world:invite-member

world family

mcp

Invite a human member to a workspace; email optional — returns inviteUrl when omitted. With claim: true it answers a short account link (claimUrl, /claim#<code>): the person opens it, makes their own key on their own device and lands signed in. With signin: true, or claim for an email that already has an account, ONE mails that link to the person's own address and answers no link at all

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_members
The class of authority the caller must already hold, decided from the attested context with no round trip.
Authority action
invite_member
Also gated per node — the caller must be permitted this action over the workspace it names.
Reversible
yes
The effect can be undone by a later call.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/world:invite-member \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "workspace": "acme", "claim": true }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • workspace string required
  • email string optional
  • role string optional member by default; viewer by default with claim
  • claim boolean optional true = answer a short account link (code + claimUrl) and send NO email. The invite is spent only after the person's own key is kept. Money rides the same link as a second part the payer adds (@oneie/sdk/pay-link payLinkUrl); a ONE server never holds that part. When the email ALREADY has an account no link can be handed over, so the sign-in link is mailed to them instead and the answer is { sent: true } with no code
  • signin boolean optional true = mail a sign-in link to `email` (required) and answer NO link, code or token. It opens the person's account, new or existing, and walks them to make their own key. Works once, for 72 hours. The link is never given to the caller: being delivered to the person's own mailbox is what lets it sign in to an account that already exists

Response

What comes back from the call.

  • ok boolean
  • uid string
  • token string
  • inviteUrl string
  • code string claim only: the 12-letter invite code the short link carries
  • claimUrl string claim only: <origin>/claim#<code>, always on the platform's own host. Hand this over, never inviteUrl
  • expiresAt number claim or signin: when the link stops opening, unix seconds
  • sent boolean signin only: the link was mailed to the person's own address
  • mailbox boolean signin only: true. The answer carries no link by design
  • already boolean signin: a link was mailed to this person for this group inside the last ten minutes, so no second one went out
  • error string signin_needs_email · signin_link_unavailable · signin_link_not_sent · claim_link_unavailable · seat_limit_reached

Traffic

Every call to world:invite-member, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names world:invite-member, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

UI 1
  • one.ie/web/src/components/pay/PayByLink.tsx:96
API route 2
  • one.ie/web/src/lib/act-as.ts:205
  • one.ie/web/src/lib/world-receivers.ts:3647
CLI 2
  • packages/cli/src/pay-link.ts:14
  • packages/cli/src/staff.ts:12
SDK 1
  • packages/sdk/src/pay-link.ts:12
→
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "format": "email",
      "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "role": {
      "description": "member by default; viewer by default with claim",
      "type": "string"
    },
    "claim": {
      "description": "true = answer a short account link (code + claimUrl) and send NO email. The invite is spent only after the person's own key is kept. Money rides the same link as a second part the payer adds (@oneie/sdk/pay-link payLinkUrl); a ONE server never holds that part. When the email ALREADY has an account no link can be handed over, so the sign-in link is mailed to them instead and the answer is { sent: true } with no code",
      "type": "boolean"
    },
    "signin": {
      "description": "true = mail a sign-in link to `email` (required) and answer NO link, code or token. It opens the person's account, new or existing, and walks them to make their own key. Works once, for 72 hours. The link is never given to the caller: being delivered to the person's own mailbox is what lets it sign in to an account that already exists",
      "type": "boolean"
    }
  },
  "required": [
    "workspace"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "uid": {
      "type": "string"
    },
    "token": {
      "type": "string"
    },
    "inviteUrl": {
      "type": "string"
    },
    "code": {
      "description": "claim only: the 12-letter invite code the short link carries",
      "type": "string"
    },
    "claimUrl": {
      "description": "claim only: <origin>/claim#<code>, always on the platform's own host. Hand this over, never inviteUrl",
      "type": "string"
    },
    "expiresAt": {
      "description": "claim or signin: when the link stops opening, unix seconds",
      "type": "number"
    },
    "sent": {
      "description": "signin only: the link was mailed to the person's own address",
      "type": "boolean"
    },
    "mailbox": {
      "description": "signin only: true. The answer carries no link by design",
      "type": "boolean"
    },
    "already": {
      "description": "signin: a link was mailed to this person for this group inside the last ten minutes, so no second one went out",
      "type": "boolean"
    },
    "error": {
      "description": "signin_needs_email · signin_link_unavailable · signin_link_not_sent · claim_link_unavailable · seat_limit_reached",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}