Reference · v1
API reference
Generated from the same declaration the routes are served from, so it cannot name an endpoint that is not there. The live version is served by the API itself, and the OpenAPI description beside it.
- Base path
- /api/v1
- OpenAPI
- /api/v1/openapi.json
- Page size
- 100 max
- Rate limit
- 600/1h
The same list as a file, for tools that generate a client from one: download the OpenAPI description (JSON).
The envelope
Every answer carries data. meta is present only when there is something to say — another page, usually — and omitted otherwise rather than sent as null. A refusal replaces both with error, carrying a code and a message.
{ "data": … } // an answer
{ "data": [ … ], "meta": { "nextCursor": "…" } } // a page of a list
{ "error": { "code": "forbidden", "message": "…" } } // a refusalOpened by a workspace token
Each one needs exactly the scope named beside it. A token without it is refused, and the message says which scope was missing.
GET
/api/v1/decisionsread:growth
The decision ledger: each decision with its prediction and, once measured, what happened. Newest first.
GET
/api/v1/missionsread:growth
Growth missions, each with its measured progress and the automations working on it.
GET
/api/v1/signalsread:growth
What the product noticed in the business, and which opportunity each notice speaks for.
GET
/api/v1/opportunitiesread:growth
Things worth doing, in the order they are worth doing them, with the measured impact where there is one.
GET
/api/v1/experimentsread:growth
Hypotheses written down before their tests were decided, and what each test said.
POST
/api/v1/experimentswrite:experiments
Write down a hypothesis against an email A/B test or a send with a held-back group, before it is decided.
GET
/api/v1/outcomesread:growth
How the predictions have held up — by author, measure and stated confidence — why findings were turned down, and what the tests showed.
GET
/api/v1/approvalsread:growth
Sends waiting for, or given, a person’s approval.
GET
/api/v1/actionsread:growth
Proposed changes, newest first: what each would do, whether the workspace’s limits allowed it, who proposed it, and what became of it.
POST
/api/v1/actionswrite:actions
Propose a change. It is planned and checked against the workspace’s limits exactly as an agent’s proposal is, then waits for a person in Proposed changes. Nothing here approves it or carries it out.
POST
/api/v1/contactswrite:contacts
Add or update up to 100 contacts, the way an import does: an address on the do-not-contact list is skipped, tags are merged, and the plan’s contact allowance applies.
POST
/api/v1/trackwrite:events
Report that one of your contacts did something in your own systems, such as trial_started. It starts the active workflows listening for that event, and says how many it started.
GET
/api/v1/customersread:contacts
The customer base in aggregate, and the people in one stage of it, with what each has spent per currency.
GET
/api/v1/revenueread:analytics
Revenue from the order ledger, per currency and never added across currencies, with how much of it is traced to marketing.
GET
/api/v1/usageread:analytics
What this workspace has used of each monthly allowance, and what remains.
GET
/api/v1/connectionsread:analytics
Each connected store, ad account, email platform and social account, and whether it is still delivering.
GET
/api/v1/eventsread:events
The events a webhook can subscribe to, oldest first from a cursor, for a caller that would rather poll.
GET
/api/v1/agentsread:agents
Every agent in this workspace, Xyranik’s own and your own, with what each may do, the most it may ask for, and when it last acted. Read only: registering an agent or giving it a credential stays with a person.
GET
/api/v1/agents/toolsread:agents
The tools an agent can be permitted here and every action each one has — its risk, the data it uses, whether it can be undone. These keys are what an authorize call names.
GET
/api/v1/agents/rulesread:agents
The rules in force for agents in this workspace, each as a sentence built from its structure rather than stored prose.
GET
/api/v1/agents/requestsread:agents
Every decision the gateway has made, newest first: what was asked, what was decided, which checks passed, which rules bit, and what became of it. Refusals included — how often the rules bite is the evidence that they work.
Opened by an agent’s own credential
These carry no scope, and that is not an omission. An agent credential grants nothing by itself — what the agent may do is decided for each request by the gateway, against the workspace’s permissions, the data the action would use, the risk, and the rules the owner wrote.
POST
/api/v1/agent/authorizeagent credential
May this agent do this, here, now? Judged by the same gateway that judges Xyranik’s own agents. `requires_approval` is not a yes — `mayProceed` says plainly whether to go ahead.
POST
/api/v1/agent/resultagent credential
What became of something this agent was allowed to do. Recorded against that decision, and only for one belonging to this workspace and this agent. Kept as unverified: a report of success is a claim, not a check.
GET
/api/v1/agent/meagent credential
What this agent is and what it may ask for: its permissions in words, the most it may ask for, its own limits, and whether the workspace has stopped its agents.
/api/v1/agents/… and /api/v1/agent/… differ by one letter and by which credential opens them. The plural reads the workspace’s agents with a workspace token; the singular is one agent asking about itself and asking permission.
The live list
Served by the API rather than written out, so it is true of the deployment you are calling:
curl "$XYRANIK_HOST/api/v1"
curl "$XYRANIK_HOST/api/v1/openapi.json"Both are public: they hold no workspace data, and a developer deciding which scopes to ask for needs to read them before holding a token.