Documentation/Integrations/API keys and webhooks

API keys and webhooks

Let other software read and write your data, or send events to other systems.

AdvancedAbout 25 minutesVersion 1.0Updated 17 November 2026

Overview

An API lets another program use Hesabu ERP, for example a website that creates orders. A webhook does the opposite: Hesabu ERP calls another system when something happens, such as a submitted invoice.

These tools are for developers or technical staff.

API keys

  1. Use a dedicated user for the integration, such as [email protected], with only the roles it needs. See Permissions and restricting access.
  2. Open that user, scroll to API Access and click Generate Keys.
  3. Copy the API Secret immediately. It is shown only once.
  4. The other software sends Authorization: token <api_key>:<api_secret> with each request.

Webhooks

  1. Search for Webhook and click Add Webhook.
  2. Choose the Document Type and the Event, for example Sales Invoice and on_submit.
  3. Enter the Request URL of the receiving system.
  4. Optionally add Request Headers, a Condition and a JSON body with the fields to send.
  5. Save. Submit a test document, then check the receiver and the Webhook Request Log.

Practical example

A courier company's system receives a webhook each time a delivery note is submitted, and starts the delivery job. Another uses an API key to read stock levels onto the shop's website.

Important notes

  • Treat keys like passwords. Regenerate them if they leak, and remove them when a project ends.
  • Use HTTPS addresses only.
  • Mistakes in an API call can change real data. Test on a copy or with a test document.

Common mistakes

  • Using the administrator's keys for an integration.
  • Sending more fields than the receiver needs.

Troubleshooting

If a webhook fails, open its Webhook Request Log for the response from the other system, which usually names the reason.

Next steps

Read Connecting other services.

Was this article helpful?