---
title: How to set up webhooks with the API
description: "Set up Qvalia webhooks for your own account with the Account API: create the subscription, add a signing secret and choose outbound authentication."
---

[Skip to content](https://knowledge.qvalia.com/set-up-webhooks-api#main-content)

- [English](https://knowledge.qvalia.com/set-up-webhooks-api)
- [Svenska](https://knowledge.qvalia.com/sv/satt-upp-webhooks-api)

English

Show submenu for translations

[![Qvalia Logo New Blue transparent.png\]](https://knowledge.qvalia.com/hs-fs/hubfs/Qvalia%20Logo%20New%20Blue%20transparent.png?height=24&name=Qvalia%20Logo%20New%20Blue%20transparent.png)](https://qvalia.com/)

Open main navigation

Close main navigation

- - [English](https://knowledge.qvalia.com/set-up-webhooks-api)
    - [Svenska](https://knowledge.qvalia.com/sv/satt-upp-webhooks-api)

  English
  
  Show submenu for translations
- [Go to qvalia.com](https://qvalia.com/pricing/)

[Go to qvalia.com](https://qvalia.com/pricing/)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge base](https://knowledge.qvalia.com/?hsLang=en)
2. [Integrations](https://knowledge.qvalia.com/integrations?hsLang=en)

# How to set up webhooks with the API

## Create a webhook subscription for your own account with the Account API, add a signing secret and choose how Qvalia authenticates against your endpoint.

Webhooks are set up through the API. You need a plan with API access (Connect Medium or higher) and an API key for the account. Start in the test environment at api-test.qvalia.com, then repeat the setup in production at api.qvalia.com.

### Step 1: Create the subscription

Send `PUT /account/{accountRegNo}/webhook/configure` with your endpoint URL and the event types you want:

```
{
  "url": "https://example.com/qvalia/webhooks",
  "types": ["new_document", "document_delivery", "document_delayed", "document_error"]
}
```

The endpoint must use HTTPS. An account has one webhook subscription. Read it with `GET` and remove it with `DELETE` on the same path.

### Step 2: Add a signing secret

A signing secret lets you verify that each delivery comes from Qvalia. The secret is shown only once, in the response where it is created, so store it securely right away. Create or rotate a secret with `POST /account/{accountRegNo}/webhook/{webhookId}/secret`. During a rotation the old and new secrets overlap, 24 hours by default, so you can switch without missing deliveries. If a secret has leaked, rotate it with no overlap.

### Step 3: Set outbound authentication (optional)

If your endpoint requires authentication, set it with `POST /account/{accountRegNo}/webhook/{webhookId}/auth`. Supported methods are OAuth 2.0 with client credentials, an API key sent in a header, and basic authentication with a password of at least 16 characters.

### Step 4: Test the setup

Send a test invoice in the test environment and check that your endpoint receives the events and answers with a 2xx status within 10 seconds. The transaction status endpoint lists each webhook attempt under metadata.webhooks\_dispatched.

### Related articles

- [How webhooks work in Qvalia](https://knowledge.qvalia.com/webhooks-overview?hsLang=en)
- [How to verify webhook deliveries and handle missed events](https://knowledge.qvalia.com/verify-webhook-deliveries?hsLang=en)
- [Getting started with the Qvalia API](https://knowledge.qvalia.com/how-to-integrate-qvalia-to-erp-systems?hsLang=en)
- [Webhook API reference at api.qvalia.io](https://api.qvalia.io/api-documentation/apis/account-api/webhook-api)

- [General](https://knowledge.qvalia.com/general?hsLang=en#main-content)

    - [Peppol](https://knowledge.qvalia.com/general?hsLang=en#peppol)
- [Partner](https://knowledge.qvalia.com/partner?hsLang=en)
- [Logs and monitoring](https://knowledge.qvalia.com/logs-and-monitoring?hsLang=en)
- [Integrations](https://knowledge.qvalia.com/integrations?hsLang=en)
- [Invoice management](https://knowledge.qvalia.com/invoice-management?hsLang=en)
- [Order management](https://knowledge.qvalia.com/order-management?hsLang=en)
- [Data management](https://knowledge.qvalia.com/data-management?hsLang=en)
- [Security and compliance](https://knowledge.qvalia.com/security-and-compliance?hsLang=en)
- [Account](https://knowledge.qvalia.com/account?hsLang=en)
- [Troubleshooting](https://knowledge.qvalia.com/troubleshooting?hsLang=en)

[![Chill listening crop-3](https://knowledge.qvalia.com/hs-fs/hubfs/Qvalia%20Logo%20New%20Blue%20transparent.png?width=107&height=24&name=Qvalia%20Logo%20New%20Blue%20transparent.png "Chill listening crop-3")](https://qvalia.com/)

Knowledge base

Copyright © 2025, Qvalia