← Receivers

endpoint:register

endpoint family

mcp

Register (or update) one of the workspace's own https endpoints under a handle a workflow step can name. The url is SSRF-checked here and again on every call; a secret is sealed under the worker's envelope key and never returned.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_integrations
The class of authority the caller must already hold, decided from the attested context with no round trip.
Authority action
manage_integrations
Also gated per node — the caller must be permitted this action over the workspace it names.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
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/endpoint:register \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "name": "thumbs", "url": "https://api.dave.example/thumbnail", "method": "POST", "returnMode": "bytes", "authHeader": "Authorization", "secret": "Bearer …" }}'

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 optional Group slug. Omit for your own. A scope REQUEST — refused when the authority walk says no, never swapped for your own.
  • name string required The handle a workflow step names. Lowercase letters, digits, `-` and `_`, 1–48 chars. Unique per workspace; re-registering the same name updates it in place so a live workflow keeps working.
  • url string required A public https address. Refused BY NAME — https_required · ip_literal · private_hostname · dns_unresolved · blocked_address — so a retry is informed.
  • method GET | POST | PUT | PATCH optional Default POST. GET folds `input` into the query string; the others send it as a JSON body.
  • authHeader string optional The header NAME the secret travels in, e.g. `Authorization` or `X-Api-Key`. The VALUE is `secret` and is stored sealed.
  • secret string optional Your endpoint's own credential. Sealed AES-256-GCM under the worker's PII_ENVELOPE_KEY, opened into memory for one outbound header, never logged, never returned. Requires `authHeader`. Omitting it on a re-register KEEPS the existing secret rather than disarming it.
  • returnMode json | url | bytes optional What the endpoint answers. `json` = the answer itself. `url` = a small JSON body naming a url, which is fetched under the SAME guard and filed to the media library. `bytes` = the asset itself, filed the same way. Default json.
  • timeoutMs number optional Per-call AbortSignal timeout. Default 20000, clamped to 1000–120000.
  • maxBytes number optional Response byte ceiling, enforced while reading — `content-length` is a claim and is not read. Default 5 MiB, clamped to 10 MiB.

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • endpoint object The stored row, minus the sealed secret. `hasSecret` is a boolean; the value has no read door.
  • error string

Traffic

Every call to endpoint:register, 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 endpoint:register, 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

API route 1
  • one.ie/web/src/lib/receiver-index.generated.ts:118
Agent runtime 2
  • channels/src/endpoint-secret.ts:4
  • channels/src/tenant-endpoint.ts:4
CLI 1
  • packages/cli/src/endpoint.ts:157

Answered by

endpoint:register one.ie/web/src/lib/resolvers/endpoints.ts:152 Dispatched through POST /api/ask/endpoint:register, after the envelope validates the payload.

endpoint family · 3 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "description": "Group slug. Omit for your own. A scope REQUEST — refused when the authority walk says no, never swapped for your own.",
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "The handle a workflow step names. Lowercase letters, digits, `-` and `_`, 1–48 chars. Unique per workspace; re-registering the same name updates it in place so a live workflow keeps working."
    },
    "url": {
      "type": "string",
      "description": "A public https address. Refused BY NAME — https_required · ip_literal · private_hostname · dns_unresolved · blocked_address — so a retry is informed."
    },
    "method": {
      "description": "Default POST. GET folds `input` into the query string; the others send it as a JSON body.",
      "type": "string",
      "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH"
      ]
    },
    "authHeader": {
      "description": "The header NAME the secret travels in, e.g. `Authorization` or `X-Api-Key`. The VALUE is `secret` and is stored sealed.",
      "type": "string"
    },
    "secret": {
      "description": "Your endpoint's own credential. Sealed AES-256-GCM under the worker's PII_ENVELOPE_KEY, opened into memory for one outbound header, never logged, never returned. Requires `authHeader`. Omitting it on a re-register KEEPS the existing secret rather than disarming it.",
      "type": "string"
    },
    "returnMode": {
      "description": "What the endpoint answers. `json` = the answer itself. `url` = a small JSON body naming a url, which is fetched under the SAME guard and filed to the media library. `bytes` = the asset itself, filed the same way. Default json.",
      "type": "string",
      "enum": [
        "json",
        "url",
        "bytes"
      ]
    },
    "timeoutMs": {
      "description": "Per-call AbortSignal timeout. Default 20000, clamped to 1000–120000.",
      "type": "number"
    },
    "maxBytes": {
      "description": "Response byte ceiling, enforced while reading — `content-length` is a claim and is not read. Default 5 MiB, clamped to 10 MiB.",
      "type": "number"
    }
  },
  "required": [
    "name",
    "url"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "endpoint": {
      "description": "The stored row, minus the sealed secret. `hasSecret` is a boolean; the value has no read door.",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}