SynapDocs

Skill invocation

List and invoke skills on your pod over HTTP with an API key.

For BuildersOpen-source podSynap CloudReviewed 2026-11-04

The skills on this page are operations your pod runs, called over HTTP. They are not agent skills, which are folders of instructions that teach an AI client how to use Synap.

What it is

A skill is a named operation stored on your pod, with an input schema. You call it like a typed function: you send input as JSON and get a JSON result back. No language model sits between you and the call.

Use it from a script, a scheduled job or your own app when you want the same operation every time, under the permissions of the key that calls it.

Get an API key

Create an API key with the scope skills.invoke. Give it full access: a key whose grant is limited to some kinds, spaces or objects is refused on these routes (403 GRANT_DOOR_UNSUPPORTED).

The key is shown once, when you create it.

List your skills

curl https://pod.example.com/api/external/skills \
  -H "Authorization: Bearer <api-key>"

The answer is an array of the active skills the key's user can see. It also includes instruction skills (kind: "instruction"), which hold text for agents rather than an operation:

[
  {
    "id": "0b6f1c9e-2d4a-4e8b-9c1a-5f3e7d2a1b00",
    "name": "Summarize overdue tasks",
    "description": "Returns a summary of the overdue tasks in a space.",
    "scope": "workspace",
    "parameters": {
      "type": "object",
      "properties": { "workspaceId": { "type": "string" } },
      "required": ["workspaceId"]
    },
    "executionMode": "sync",
    "timeoutSeconds": 30,
    "kind": "code"
  }
]

parameters is the JSON Schema of the skill's input. Call a skill by its id; its name is not accepted in the URL.

Invoke a skill

curl -X POST https://pod.example.com/api/external/skills/<skill-id>/invoke \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{ "input": { "workspaceId": "<workspace-id>" } }'

A skill that ran answers:

{
  "success": true,
  "result": { "…": "what the skill returned" },
  "correlationId": "<id>",
  "ackState": "applied"
}

result is whatever the skill returns. input is optional; an empty body runs the skill with no input.

Who can see a skill

Each skill has a scope:

ScopeWho can list and invoke it
podEvery user of the pod
workspaceMembers of the skill's space
userOnly the user who owns it

A key acts for a user (for an agent's key, the person the agent works for). A user skill that belongs to someone else, or a workspace skill in a space that user is not a member of, answers 404, as if it did not exist.

Governance

An invocation goes through the same governance check as any other run of a skill. If the key belongs to an agent, the pod decides whether the run goes ahead, waits for a person, or is refused (see the validation policy). When the run needs a person's approval, nothing runs yet: the pod answers 202 with a proposal, and the skill runs when a person approves it.

{
  "success": false,
  "proposed": true,
  "proposalId": "<id>",
  "reviewUrl": "<url>"
}

Errors and other answers

StatusMeaning
200 with success: falseThe skill ran and failed. The body has an error message.
202 AcceptedNothing ran yet: the run became a proposal (see above).
400 Bad RequestThe request body is invalid, or the skill exists but is not active.
401 UnauthorizedThe API key is missing, invalid or expired.
403 ForbiddenThe key lacks the skills.invoke scope, its grant is narrower than full access (GRANT_DOOR_UNSUPPORTED), its person is a guest of the pod, or the pod's governance refused the run. The error says which.
404 Not FoundThe skill does not exist, or the key's user cannot see it.
429 Too Many RequestsThe key's rate limit is reached.
502 Bad GatewayThe pod could not execute the skill.

TypeScript example

const POD_URL = 'https://pod.example.com';
const API_KEY = process.env.SYNAP_API_KEY;

async function invokeSkill(skillId: string, input: Record<string, unknown>) {
  const res = await fetch(`${POD_URL}/api/external/skills/${skillId}/invoke`, {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ input }),
  });

  if (res.status === 202) return { proposed: true, ...(await res.json()) };
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);

  const data = await res.json();
  if (!data.success) throw new Error(`Skill failed: ${data.error}`);
  return data.result;
}

Next steps

On this page