← Receivers

endpoint:call

endpoint family

mcp

Call one registered endpoint and return its answer — or, in url/bytes mode, file the asset in the media library and return the reader url. The SSRF guard re-runs on EVERY call because a stored verdict is a fact about the past.

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
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
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/endpoint:call \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "endpoint": "thumbs", "input": { "title": "How we shipped in a week", "style": "bold" } }}'

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
  • endpoint string required The handle from endpoint:register.
  • input object optional The ONLY thing that crosses to the endpoint, beside its own sealed credential. Never the caller's session, the workspace key, or any ONE secret.
  • returnMode json | url | bytes optional Overrides the row's mode for this call.
  • dryRun boolean optional Run the guard and answer its verdict without spending a request. What `one endpoint test` uses.

Response

What comes back from the call.

  • ok boolean
  • endpoint string
  • status number
  • json any
  • text string Present instead of `json` when the endpoint answered something that is not JSON. Named rather than coerced, so a step never branches on an invented shape.
  • workspace string
  • key string
  • url string `/api/product-image/{workspace}/{path}` — the same reader media:generate returns.
  • kind "image"
  • contentType string Sniffed from the MAGIC BYTES, never from what the endpoint declared.
  • size number
  • dryRun boolean
  • guard string
  • error string Named: not_found · disabled · blocked_url:<reason> · fetch_failed · endpoint_error · too_large · bad_response · unsupported_type · credential_unreadable · storage_error.

Traffic

Every call to endpoint:call, 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:call, 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 3
  • one.ie/web/src/lib/endpoint-secret.ts:12
  • one.ie/web/src/lib/receiver-index.generated.ts:116
  • one.ie/web/src/lib/resolvers/endpoints.ts:11
Agent runtime 1
  • channels/src/tenant-endpoint.ts:17
CLI 1
  • packages/cli/src/endpoint.ts:111

Answered by

endpoint:call one.ie/web/src/lib/resolvers/endpoints.ts:293 Dispatched through POST /api/ask/endpoint:call, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "type": "string"
    },
    "endpoint": {
      "type": "string",
      "description": "The handle from endpoint:register."
    },
    "input": {
      "description": "The ONLY thing that crosses to the endpoint, beside its own sealed credential. Never the caller's session, the workspace key, or any ONE secret.",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "returnMode": {
      "description": "Overrides the row's mode for this call.",
      "type": "string",
      "enum": [
        "json",
        "url",
        "bytes"
      ]
    },
    "dryRun": {
      "description": "Run the guard and answer its verdict without spending a request. What `one endpoint test` uses.",
      "type": "boolean"
    }
  },
  "required": [
    "endpoint"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "endpoint": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "json": {},
    "text": {
      "description": "Present instead of `json` when the endpoint answered something that is not JSON. Named rather than coerced, so a step never branches on an invented shape.",
      "type": "string"
    },
    "workspace": {
      "type": "string"
    },
    "key": {
      "type": "string"
    },
    "url": {
      "description": "`/api/product-image/{workspace}/{path}` — the same reader media:generate returns.",
      "type": "string"
    },
    "kind": {
      "type": "string",
      "const": "image"
    },
    "contentType": {
      "description": "Sniffed from the MAGIC BYTES, never from what the endpoint declared.",
      "type": "string"
    },
    "size": {
      "type": "number"
    },
    "dryRun": {
      "type": "boolean"
    },
    "guard": {
      "type": "string"
    },
    "error": {
      "description": "Named: not_found · disabled · blocked_url:<reason> · fetch_failed · endpoint_error · too_large · bad_response · unsupported_type · credential_unreadable · storage_error.",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}