ONE people:create
← Receivers

people:create

people family

Create a person in a group and, when `company` is named, the company they belong to: the person, the company (a group of group-type company, reused when the caller already holds one by that name), the seat that ties them, and the row the People page reads

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
member
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.

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/people:create \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "name": "Anna Byrne", "email": "anna@byrnedental.ie", "company": "Byrne Dental" }}'

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.

  • name string required
  • email string optional
  • company string optional The company's name. The caller's own company of that exact name is reused; otherwise one is created and owned by the caller. The person becomes its member and carries the name
  • group string optional Bare slug of the group the person joins; default the caller's own. It NAMES a target and never authorizes one: any other group is refused unless the caller holds invite_member over it

Response

What comes back from the call.

  • ok boolean
  • aid string
  • name string
  • company object
  • companyError string The person was created and the company was not: company_create_failed (no company written) · company_link_failed (company written, the person's seat in it was not)
  • error string name required · invalid_email · create failed

Traffic

Every call to people:create, 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 people:create, 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 2
  • one.ie/web/src/components/crm/AddPersonSheet.tsx:3
  • one.ie/web/src/components/in/Inbox.tsx:416
API route 1
  • one.ie/web/src/lib/receiver-index.generated.ts:346
CLI 1
  • packages/cli/src/compiler.ts:335
→

Answered by

people:create one.ie/web/src/lib/resolvers/groups.ts:299 Dispatched through POST /api/ask/people:create, after the envelope validates the payload.

people family · 1 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "company": {
      "description": "The company's name. The caller's own company of that exact name is reused; otherwise one is created and owned by the caller. The person becomes its member and carries the name",
      "type": "string"
    },
    "group": {
      "description": "Bare slug of the group the person joins; default the caller's own. It NAMES a target and never authorizes one: any other group is refused unless the caller holds invite_member over it",
      "type": "string"
    }
  },
  "required": [
    "name"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "aid": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "company": {
      "type": "object",
      "properties": {
        "gid": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "created": {
          "type": "boolean",
          "description": "false when an existing company was reused"
        },
        "unchecked": {
          "description": "true when a new company was made while the caller's existing companies could not be read, so a same-named one may already exist",
          "type": "boolean"
        }
      },
      "required": [
        "gid",
        "name",
        "created"
      ]
    },
    "companyError": {
      "description": "The person was created and the company was not: company_create_failed (no company written) · company_link_failed (company written, the person's seat in it was not)",
      "type": "string"
    },
    "error": {
      "description": "name required · invalid_email · create failed",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}