POST /v1/actions/call
Validates `input` against the action's schema, runs it, validates the result against its output schema and returns it. Credentials come from `connections` (pack connection key to `conn_` ID), or else from your project's most recently created connection for that pack and key; when that connection belongs to an end user (it has a `subject`), the call is refused with `422 connection_required` instead, so an unnamed key never uses one end user's credential for another: name end-user connections explicitly. Using a stored connection, named or not, also needs `vault:run`. Only `pure` and `read` actions are retried automatically; send `Idempotency-Key` with `write` actions so a retry of your own does not repeat the effect (packs that declare an idempotency header pass it upstream). `timing` phases: `validate` (input schema), `inject` (connections), `render` (request templates), `upstream` (every HTTP exchange, retries and redirects included), `map` (response mapping and output schema) for declarative HTTP actions; `sidecar` for JavaScript actions. Bills one `actions.call` once the action ran.

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)

Header Parameters

Idempotency-Key string optional header
A unique value (for example a UUID) that makes this request safe to retry. Scoped to your project for 24 hours: a retry with the same key, method, path and body returns the stored response with `Idempotent-Replayed: true`, and only to the same API key. Reusing the key for a different request returns `409 idempotency_key_conflict`.

Request Body required

application/json
ref string REQUIRED
`<namespace>/<name>/<action>@<version>`, the version exact (strict semver without build metadata, as in b3pack's `semver` and the routine callable) or a major.
input object
Validated against the action's input schema.
connections object
Pack connection key to vault connection ID. Omit a key to use your project's most recently created connection for it (refused with `422 connection_required` when that connection belongs to an end user).
timeout_ms integer
Overall time limit; defaults to the action's own.

Responses

200 The action's output.
application/json
object string REQUIRED
Enum: action_result
ref string REQUIRED
The exact version that ran.
output unknown REQUIRED
Matches the action's output schema.
upstream_status integer
HTTP status of the upstream call, for declarative HTTP actions.
timing object REQUIRED
Server-side phase durations in milliseconds with microsecond resolution: the same phases as the `Server-Timing` header, keyed `<phase>_ms`. `total_ms` is always present. Phase names are product-specific and documented per operation. Example values in this reference are illustrative, not measurements.
total_ms number REQUIRED
400 The reference is malformed (`action_ref_invalid`).
401 Missing, malformed, expired or revoked credentials (`unauthorized`).
402 The organization has no credits left, or the key reached its spend cap.
403 The action tried to reach a host it does not declare, or a refused address (`egress_denied`), or the caller may not use the connection (`forbidden`).
404 The pack, version or action does not exist (`pack_not_found`, `pack_version_not_found`, `action_not_found`).
409 The object's state does not allow this operation, or the idempotency key conflicts.
413 The request body exceeds this operation's limit.
415 The Content-Type is not accepted by this operation.
422 The input or the connections do not fit the action (`action_input_invalid`, `connection_required`, `connection_mismatch`, `connection_invalid`), or a request template failed for this input (`action_expression_error`).
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
502 The upstream failed or answered with unexpected data (`upstream_error`, `upstream_unreachable`, `action_output_invalid`).
503 The node could not load or verify the pack (`pack_unavailable`), or the node is not ready.
504 The upstream did not answer in time (`upstream_timeout`).
curl -X POST 'https://beta-api.b3os.org/v1/actions/call' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "ref": "io.b3os/github/create-issue@1",  "input": {    "owner": "acme",    "repo": "web",    "title": "Checkout button misaligned on mobile"  },  "connections": {    "api": "conn_01m5t6cbgdjs1ketgcqwa2sne8"  }}'
const response = await fetch('https://beta-api.b3os.org/v1/actions/call', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({    "ref": "io.b3os/github/create-issue@1",    "input": {      "owner": "acme",      "repo": "web",      "title": "Checkout button misaligned on mobile"    },    "connections": {      "api": "conn_01m5t6cbgdjs1ketgcqwa2sne8"    }  })});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/v1/actions/call', headers=headers, json={  "ref": "io.b3os/github/create-issue@1",  "input": {    "owner": "acme",    "repo": "web",    "title": "Checkout button misaligned on mobile"  },  "connections": {    "api": "conn_01m5t6cbgdjs1ketgcqwa2sne8"  }})print(response.json())
200 Response
{  "object": "action_result",  "ref": "io.b3os/github/create-issue@1.2.0",  "output": {    "number": 1423,    "url": "https://github.com/acme/web/issues/1423"  },  "upstream_status": 201,  "timing": {    "validate_ms": 0.03,    "inject_ms": 0.02,    "upstream_ms": 412.6,    "map_ms": 0.04,    "total_ms": 412.8  }}
Ask a question... ⌘I