Skip to content

API Integration ​

MyCompanyDesk has no public REST API yet, so you cannot create API keys; the API-keys page opens once the API goes live. Webhooks are available on Plus: MyCompanyDesk sends its events to an endpoint URL of your own.

Webhooks ​

Create a subscription under Settings › Webhooks: a name, the URL of your endpoint, and the events it receives (leave the list empty to receive them all). From then on the events truly go out. A webhook receives a JSON POST for creating, editing and status changes of invoices, expenses and customers, for sending (by email or Peppol), for paying (bank, Mollie, Stripe, the till or manual), for an invoice turning overdue, and for mail arriving in the inbox. Till receipts ride along as invoice events. The unattended engines send their events too, such as recurring invoices, automatic reminders and the overdue sweep.

Each delivery carries three headers worth using:

  • X-MCD-Event-Type: the kind of event, invoice.paid for example.
  • X-MCD-Event-Id: the fixed ID of this transition. The same transition never delivers twice, so deduplicate on this ID. A payment that is reversed and booked again reports the invoice as paid again, with a new event ID.
  • X-MCD-Signature: an HMAC-SHA256 of the raw body. Verify it with the secret you received when creating the webhook; you can rotate that secret on the same page.

A failing delivery retries by itself, and after ten failures in a row the webhook is switched off; the Active switch brings it back. The list shows when an endpoint was last reached, and Send test delivers a test event. Two inbox events sit apart: inbox.thread.received fires for every incoming email, inbox.thread.created only for the first email of a new conversation.

Using your data in another system ​

If you want to use your data elsewhere, you can do so on every plan in these ways:

  • Download data: under Settings › Download data you get your invoices, customers and expenses as a CSV file per section, or everything together in one JSON backup. Photos and PDFs of your receipts are not included; they stay with the expense itself.
  • Your accountant: give your accountant free access under Settings › Your accountant. They then always look at your latest figures, without you having to send files.

MyCompanyDesk, boekhouding eenvoudig gemaakt.