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

Prepare a filing with the FileClerk API and receive its final status through a signed webhook.

## Prepare a filing (dry run)[#](#dry-run "Copy the link to this section")

Use your [API key](https://fileclerk.co.uk/docs/developers/authentication#workspace-keys) with a draft and audit exemption answers from the [OpenAPI schema](https://fileclerk.co.uk/api/v1/openapi.json).

TypeScript dry run

export async function prepareAccounts(
  draft: object,
  eligibility: object,
  apiKey: string,
  idempotencyKey: string,
  origin = "https://fileclerk.co.uk",
  request: (url: string, init?: RequestInit) => Promise<Response> = fetch,
) {
  const response = await request(origin + "/api/v1/filings/accounts", {
    method: "POST",
    headers: {
      "content-type": "application/json",
      "x-api-key": apiKey,
      "idempotency-key": idempotencyKey,
    },
    body: JSON.stringify({ dry_run: true, draft, eligibility }),
  })
  if (!response.ok) throw new Error(`Accounts preparation returned HTTP ${response.status}`)
  return response.json()
}

Use the calculated totals and individual findings to check the draft. When `ready` is true, the response includes checked iXBRL. The API currently supports preparation and signed receipts.

Send the same `Idempotency-Key` when you retry the same draft. For 24 hours, a changed payload with that key receives HTTP 422: see [idempotency](https://fileclerk.co.uk/docs/developers/authentication#idempotency).

## Filing webhooks[#](#webhooks "Copy the link to this section")

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

* MCP`list_workspace_webhooks`
* MCP`prepare_workspace_webhooks_change`
* REST`GET /api/v1/workspaces/{id}/webhooks`
* REST`POST /api/v1/workspaces/{id}/webhooks/prepare`

Once a submitted filing reaches a final status, FileClerk can send a signed `filing.updated` event to the submitter’s confirmed JSON webhook for that company. The payload contains the filing identifier, company number, previous and current status, and the time FileClerk observed the change.

Verify the Standard Webhooks signature before using the event. Deduplicate retries using the`webhook-id` header.
