ONE people:enroll
← Receivers

people:enroll

people family

Start one workflow for each of several people (the People list's Add to workflow). Every person is checked against the group's own contact rows first: a person of another group answers not_a_contact and no run starts for them. One run per person per workflow (pressing twice returns the runs already started), at most 50 people a call (capped says how many were left out). The run's trigger payload carries contact, personId, name and email. If the workflow asks a person to approve (a path that moves money), the first ask is returned as approval and nobody past it is started

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_workflows
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
variable
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Idempotent
yes
Safe to retry as-is.

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:enroll \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "aids": [ "person-01a2b3c4", "person-09f8e7d6" ], "workflowId": "spring-sale-follow-up" }}'

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.

  • aids string[] required The people. At most 50 are started; capped says how many were left out
  • workflowId string required The workflow, by id or by name; it must belong to the group being edited, or one the caller controls
  • group string optional Bare slug of the group whose list is edited and whose workflow runs; default the caller's own. It NAMES a group and never authorizes one: the caller must control it

Response

What comes back from the call.

  • ok boolean
  • workflowId string
  • results object[]
  • started number People a run was started for (or already had one)
  • refused number
  • capped number
  • stopped needs_approval | workflow_unreachable Why the batch stopped before its end
  • approval object The first run's ask, when stopped is needs_approval
  • error string workflowId required · aids required · no_db

Traffic

Every call to people:enroll, 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:enroll, 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/crm/PeopleView.tsx:573
API route 2
  • one.ie/web/src/lib/crm/people-bulk.ts:158
  • one.ie/web/src/lib/receiver-index.generated.ts:377
CLI 1
  • packages/cli/src/people.ts:185
→

Answered by

people:enroll one.ie/web/src/lib/resolvers/groups.ts:560 Dispatched through POST /api/ask/people:enroll, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "aids": {
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The people. At most 50 are started; capped says how many were left out"
    },
    "workflowId": {
      "type": "string",
      "description": "The workflow, by id or by name; it must belong to the group being edited, or one the caller controls"
    },
    "group": {
      "description": "Bare slug of the group whose list is edited and whose workflow runs; default the caller's own. It NAMES a group and never authorizes one: the caller must control it",
      "type": "string"
    }
  },
  "required": [
    "aids",
    "workflowId"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workflowId": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "aid": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "runId": {
            "type": "string"
          },
          "error": {
            "description": "not_a_contact · is_an_agent · not_started (an earlier person stopped the batch) · needs_approval · or the workflow's own refusal",
            "type": "string"
          }
        },
        "required": [
          "aid",
          "ok"
        ]
      }
    },
    "started": {
      "description": "People a run was started for (or already had one)",
      "type": "number"
    },
    "refused": {
      "type": "number"
    },
    "capped": {
      "type": "number"
    },
    "stopped": {
      "description": "Why the batch stopped before its end",
      "type": "string",
      "enum": [
        "needs_approval",
        "workflow_unreachable"
      ]
    },
    "approval": {
      "description": "The first run's ask, when stopped is needs_approval",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "error": {
      "description": "workflowId required · aids required · no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}