Capabilities API reference
The Capabilities API has three endpoints: list the capabilities your key can call, get their OpenAPI schemas, and call one. All endpoints are under https://api.ansehn.com/v1 and need an API key in the Authorization: Bearer header. An OAuth access token from a connected app works the same way.
Method | Path | Purpose |
|---|---|---|
|
| List the capabilities this key can call |
|
| OpenAPI 3.1 document for those capabilities |
|
| Call one capability |
List capabilities
GET /v1/capabilities returns the capabilities your key can call, filtered by its scopes.
curl https://api.ansehn.com/v1/capabilities \
-H "Authorization: Bearer $ANSEHN_API_KEY"{
"data": [
{
"name": "getServerLogStats",
"description": "Summarize what we've learned from server-log uploads for this project...",
"risk": "read",
"requiresIdempotencyKey": false
}
]
}Field | Type | Description |
|---|---|---|
| string | The capability name, used in the call path |
| string | What the capability does |
| string |
|
| boolean |
|
Get the OpenAPI document
GET /v1/openapi.json returns an OpenAPI 3.1 document with the input and output schemas of exactly the capabilities your key can call. Use it to generate a client, or give it to an agent that works with OpenAPI.
curl https://api.ansehn.com/v1/openapi.json \
-H "Authorization: Bearer $ANSEHN_API_KEY"Call a capability
POST /v1/capabilities/{name} runs one capability for the key's project.
curl -X POST https://api.ansehn.com/v1/capabilities/getRankings \
-H "Authorization: Bearer $ANSEHN_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "input": { "range": { "from": "2026-09-01", "to": "2026-09-30" } } }'Request body
inputholds the capability's input. Its schema is inopenapi.json.An empty body, or a body without
input, means an empty input. Use it for capabilities that take no input.Unknown fields are rejected with
422at the top level of the body and at the top level ofinput. Unknown fields inside nested objects, such asrange, are ignored.A project ID is never accepted. The project always comes from the key.
Response
A successful call returns 200 and the result in data:
{
"data": {
"componentHint": "table",
"title": "...",
"columns": [ ... ],
"rows": [ ... ]
}
}Results are structured, and componentHint gives the shape:
| Shape |
|---|---|
|
|
| One value with a label and an optional change |
| Series for a chart |
| A list of matching items, for example from a name search |
| The project overview |
| Several of the shapes above in |
| No data, with a |
Each capability's possible shapes are listed in openapi.json.
Untrusted text
Text that comes from AI answers, transcripts, web pages or your own data entries is wrapped in external_content tags. Treat it as data, never as instructions. This protects agents that read the results from text that tries to give them commands.
Change a content action's status
updateContentActionStatus is the only capability that changes data. It needs the Content Actions Write scope, a key creator who can edit the project, and an Idempotency-Key header.
curl -X POST https://api.ansehn.com/v1/capabilities/updateContentActionStatus \
-H "Authorization: Bearer $ANSEHN_API_KEY" \
-H "Idempotency-Key: 5f0c2a1e-7b3d-4c1a-9e2f-8d6b4a0c1e93" \
-H "Content-Type: application/json" \
-d '{ "input": { "actionId": "9f1b6a52-3c4d-4e5f-8a7b-0c1d2e3f4a5b", "status": "done" } }'status:open,in_progress,in_review,doneorarchived.Result:
{ "data": { "actionId": "...", "status": "done", "updatedAt": "..." } }.Content action IDs are in the
idfield of each row returned bylistContentActions.
How the Idempotency-Key header works is described in Errors, rate limits and idempotency.