Skip to main content
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

API quickstart

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

Prepare a filing (dry run)#

Use your API key with a draft and audit exemption answers from the OpenAPI schema.

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.

Filing webhooks#

Where it runs#

  • MCPlist_workspace_webhooks
  • MCPprepare_workspace_webhooks_change
  • RESTGET /api/v1/workspaces/{id}/webhooks
  • RESTPOST /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 thewebhook-id header.