API Keys and Webhooks
Mint API keys for the public REST API and register outbound webhook endpoints for document events.
API Keys
- Go to Settings → API Keys and click Generate Key.
- Copy the key now; it is shown once and only a hash is stored.
- Send it in the
X-Api-Keyheader (or as a Bearer token). Revoke a key from the same page at any time, on any plan.
See The REST API for the endpoints.
Webhooks
- Go to Settings → Webhooks and click Add Webhook.
- Pick the event (
invoice.generated,invoice.sent,invoice.failed, or the same three forestimate), enter the HTTPS URL and an optional secret. - Use Edit to change an endpoint later (leave the secret blank to keep it), or Delete, which works on any plan. A store can register up to 20 endpoints, and the same event and URL only once.
Each delivery is a JSON POST with event, shop, document_type, action, order_id and fired_at, plus the order name and template on generated; the recipient (the customer's email address) and message_id on sent; and on failed, stage (generation or send) with a short error, plus the recipient when a send failed. A failed event fires when a document could not be made (a template error, for example) or saved, or an email could not be sent — but not while the app is still retrying it. The endpoint must be an https address on the public internet, checked when you save it. The secret is sent as the X-Webhook-Secret header. Deliveries are fire-and-forget: there is no retry, so make your endpoint answer quickly.
Was this guide missing something? Tell us and we will fix it.
Contact Us