Skip to content
Connect an agent

Organisations

Read an organisation's call history

One page of the calls made with the organisation keys and connected agents, newest first: when, who, which agent, which tool, how it ended, how long it took.

GET/orgs/{org}/calls

TL;DR

QuestionAnswer
What does it do?Read an organisation's call history.
What does it take?org in the path, and member, key, tool, group, outcome, from, to, cursor, limit in the query string.
What does it return?Status 200 with a body of type OrgCallPage.
What can go wrong?400 a filter or the cursor is not valid; 401 not signed in, or the key is not valid; 403 an organisation key without audit:read, or an agent connection (orgs.forbidden); 404 no such organisation, the caller is not a member of it, or the key is another organisation's; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

One page of the calls made with the organisation keys and connected agents, newest first: when, who, which agent, which tool, how it ended, how long it took. Never the diagram content. The owner, admins and the people the owner chose see every call; other members their own agents. Kept 90 days.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Query parameters

FieldTypeRequiredDescription
memberstringnoA member's account id: the calls of the agents they connected.
keystringnoAn organisation key, or the key behind an agent connection, by id.
tool"compare_diagrams" | "convert_mermaid" | "delete_diagram" | "draw_diagram" | "draw_from_pattern" | "edit_diagram" | "find_pattern" | "get_diagram_syntax" | "get_pattern" | "import_source" | "list_diagrams" | "map_icons" | "outline_diagram" | "plan_document_diagrams" | "publish_diagram" | "read_diagram" | "render_diagram" | "search_icons" | "suggest_diagram" | "sync_markdown" | "validate_diagram" | "GET /v1/icons" | "GET /v1/vocabulary" | "POST /v1/diagrams/compare" | "POST /v1/diagrams/convert-mermaid" | "POST /v1/diagrams/draw" | "POST /v1/diagrams/edit" | "POST /v1/diagrams/outline" | "POST /v1/diagrams/publish" | "POST /v1/diagrams/read" | "POST /v1/diagrams/render" | "POST /v1/diagrams/suggest" | "POST /v1/diagrams/validate" | "POST /v1/icons/map" | "POST /v1/import" | "POST /v1/markdown/plan" | "POST /v1/markdown/sync" | "POST /v1/patterns/draw" | "POST /v1/patterns/find" | "POST /v1/patterns/get"noAn MCP tool, or a /v1 route as METHOD path.
group"draw" | "import" | "publish" | "library" | "check" | "icons" | "docs" | "help"noWhat the calls did.
outcome"ok" | "invalid" | "refused" | "error"noHow the calls ended.
fromstringnoFrom this time on (inclusive).
tostringnoBefore this time (exclusive).
cursorstringnoThe page's nextCursor from the page before, for the next, older page.
limitintegernoCalls in the page, 1 to 200. Default 50.

Responses

StatusMeaningBody
200The page.OrgCallPage
400A filter or the cursor is not valid.ErrorResponse
401Not signed in, or the key is not valid.ErrorResponse
403An organisation key without audit:read, or an agent connection (orgs.forbidden).ErrorResponse
404No such organisation, the caller is not a member of it, or the key is another organisation's.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type OrgCallPage.

FieldTypeRequiredDescription
availablebooleanyesFalse when the call history is not set up on this server, or could not be read.
itemsOrgCall[]yes
items[].atstringyesWhen the call ended: an ISO 8601 time in UTC with milliseconds.
items[].surface"mcp" | "api"yesmcp for the hosted MCP server, api for the REST API.
items[].via"connection" | "key"yesconnection for an agent a member connected with a browser sign-in, key for a key from the Keys tab.
items[].memberobject | nullyesThe member who connected the agent; null for a key from the Keys tab.
items[].member.userIdstringyes
items[].member.emailstring | nullyes
items[].keyobjectyesThe key behind the call, with its name; the name is null once the key is gone.
items[].key.idstringyes
items[].key.namestring | nullyes
items[].agentstring | nullyesThe name the agent gave itself, for a connection; null for a key.
items[].toolstringyesThe MCP tool, or the /v1 route as METHOD path.
items[].group"draw" | "import" | "publish" | "library" | "check" | "icons" | "docs" | "help"yes
items[].outcome"ok" | "invalid" | "refused" | "error"yesok, invalid (the input was refused: a source with errors, arguments that do not fit), refused (a limit, a plan or a rule said no) or error.
items[].durationMsintegeryes
items[].requestIdstring | nullyesThe request id or Cloudflare ray id, for support.
nextCursorstring | nullyesSend as cursor for the next, older page; null when this is the last.
scope"organisation" | "own"yesorganisation: every member's calls. own: the calls of the agents the caller connected, for someone the owner has not let read the history.
retentionDaysintegeryesDays the history keeps a call.
canExportbooleanyesWhether the caller may download the history as CSV (the owner and admins).

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools