> 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.

[Docs](https://fileclerk.co.uk/docs)

# API authentication

Authenticate FileClerk API requests with a key or OAuth access token.

## Workspace keys[#](#workspace-keys "Copy the link to this section")

### Where it runs[#](#workspace-keys-where "Copy the link to this section")

* 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](https://fileclerk.co.uk/docs/developers/mcp#clients-with-a-key). 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](https://fileclerk.co.uk/api/v1/openapi.json) lists the REST endpoints.

## Personal keys[#](#personal-keys "Copy the link to this section")

### Where it runs[#](#personal-keys-where "Copy the link to this section")

* 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.

TypeScript key request

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](https://fileclerk.co.uk/docs/developers/mcp#clients-with-a-key). 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[#](#connected-apps "Copy the link to this section")

### Where it runs[#](#connected-apps-where "Copy the link to this section")

* MCP`list_connected_apps`
* MCP`revoke_connected_app`
* REST`GET /api/v1/account/connected-apps`
* REST`POST /api/v1/account/connected-apps/revoke`

An MCP client can connect to your FileClerk account by OAuth. When it asks, FileClerk opens a page in your browser that names the app and the address it returns to. Verify with your passkey, then allow it.

A connected app can use every tool, and every workspace you belong to. It names the workspace in each call. Its access token lasts one hour, and it renews it with a refresh token. A refresh token stops working 90 days after its last use.

To see your connections, open Personal API keys in the Console, then Connected apps. Each card shows the app's name, when you connected it and its last request. Revoke access stops the app's tokens at once. To connect again, the app must ask you again.

An agent lists and ends connections when it connects by OAuth or sends a personal API key with Account access. Ending the connection the call came through also ends that session.

## Idempotency[#](#idempotency "Copy the link to this section")

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](https://fileclerk.co.uk/docs/developers/sandbox#key) filing needs the header too.

## Rate limits[#](#rate-limits "Copy the link to this section")

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.

Name searches have their own limit: 600 an hour per IP address, or 10,000 an hour with a key. Callers with no key also share a limit of 300 lookups an hour for each network, so that many addresses of one network count as one caller.

A request over a limit receives HTTP 429\. The answer says when the limit opens again, and the Retry-After header gives the wait in seconds. An MCP tool over a limit fails with the same times, as reset\_at and retry\_after.
