For AI agents: the FileClerk index is at https://fileclerk.co.uk/llms.txt. Add .md to the address of any guide for its Markdown.
API authentication
Authenticate FileClerk API requests with a key or OAuth access token.
Workspace keys#
Where it runs#
- MCP
list_workspace_api_keys - MCP
prepare_workspace_api_key_change - REST
GET/api /v1 /workspaces /{id} /keys - REST
POST/api /v1 /workspaces /{id} /keys /prepare
Create a workspace key under Settings, then Integrations in Console. Send it in the Authorization: Bearer header for REST, or as a connection header for MCP. Select Manage deadlines when creating a workspace data key to let it change return marks and your deadline email categories.
Use list_workspace_companies to list saved companies and get_workspace_deadline_settings to read the current mark revision before editing. The OpenAPI spec lists the REST endpoints.
Personal keys#
Where it runs#
- MCP
list_personal_api_keys - MCP
prepare_personal_api_key_change - REST
GET/api /v1 /keys - REST
POST/api /v1 /keys /prepare
Request a key using an email address you control, with the code below. Open the verification link to reveal the key once.
export async function requestKey(
email: string,
origin = "https://fileclerk.co.uk",
request: (url: string, init?: RequestInit) => Promise<Response> = fetch,
) {
const response = await request(origin + "/api/v1/keys", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ email }),
})
if (!response.ok) throw new Error(`Key request returned HTTP ${response.status}`)
return response.json()
}
Send a production API key in the x-api-key header. Signed receipt requests also need the current receipt token in the Authorization header as a Bearer credential.
Turn on Account access for a personal API key under Personal API keys in Console. Send the key in the x-api-key header to /api/v1/workspaces, /api/v1/companies/{number}/filing-workspaces, /api/v1/email-preferences, /api/v1/invitations/accept and /api/v1/company-import, or as a connection header for MCP. It can then list, create and rename your workspaces, record the business that runs each, find the workspaces you can file a company in, read or change your email preferences, accept a workspace invitation sent to your address, and import the companies your sign-in email follows. A delete or leave answers a link to the Console page where you confirm it with a passkey.
Calls to /api/v1/keys (with Account access) and to /api/v1/workspaces/{id}/keys and /calendar-link (with a Manage workspace key) list keys and say whether you have a calendar link. To create, rotate or revoke a key, or to replace or revoke a link, they give you the Console page where you do it.
Connected apps#
Where it runs#
- MCP
list_connected_apps - MCP
revoke_connected_app - REST
GET/api /v1 /account /connected-apps - REST
POST/api /v1 /account /connected-apps /revoke
Idempotency#
An optional Idempotency-Key header, or the optional idempotency_key argument of the MCP tool, makes a retry safe for: creating and changing workspaces, email preferences, workspace companies, deadline settings and texts, drafts and their checks, trial balance mappings and imports, the company import, accepting an invitation, asking for a filing approval and the Console profile (your answer to “What best describes you?”). Send 1 to 128 visible ASCII characters, such as a UUID, new for each change.
A key is kept for the API key or workspace key that sends it. For 24 hours, a retry with the same key and the same request, over REST or MCP, gets the first answer as it was then, even if something changed since, and nothing is changed again: no second workspace, no second email. The same key with another request receives HTTP 422 idempotency_conflict. A retry while the first request still runs receives HTTP 409 idempotency_key_in_use: send it again a few seconds later. A refused request keeps nothing, so the same key can send it again.
The dry runs (/api/v1/filings/accounts, /ct600 and /cic-package) need the header and keep only a fingerprint of the request, so a retry is computed again. A missing header, or one that is not a key, receives HTTP 400 idempotency_key_required. The sandbox filing needs the header too.
Rate limits#
Every read needs a key or an OAuth sign-in. Company lookups allow 1,000 requests and name searches 10,000 per hour per account; a call with neither answers 401.