Set up and manage webhooks
France onlyLearn how to create, verify, and manage webhook subscriptions for the AFNOR connector API. Webhooks allow you to receive real-time notifications about document events without repeatedly polling the API.
Prerequisites
- Banqup permissions
- The AFNOR connector is installed in the Banqup Store.
Step 1: Create a webhook subscription
Register a listener endpoint to receive real-time notifications when documents matching your subscription are processed.
You can configure up to 10 webhooks per space.
Endpoint: /network/documents/spaces/connectors/afnor/v1/webhooks
Header parameters:
Request-Id(optional): Client-generated unique identifier used to trace logs across requests.Organization-Id: ThespaceIdof the Jefacture space.
Requires a JSON request body.
callbackUrl: The URL where webhook notifications are sent.flowDirection: The document flow direction to monitor.flowTypes: The document types to monitor.
curl -L 'https://{{serverURL}}/network/documents/spaces/connectors/afnor/v1/webhooks' \
-H 'Request-Id: 4803c35e-d132-4d4a-a29a-9da5f583b89a' \
-H 'Organization-Id: 60debf1a-e348-46a2-8e28-36403f83b022' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-d '{
"callbackUrl": "https://your-app.example.com/webhooks/afnor",
"flowDirection": "In",
"flowTypes": [
"SupplierInvoice"
]
}'
Successful response:
Save both the webhookId and the generated signingKey. You need the signing key to validate the Afnor-Signature header on incoming webhook events.
{
"webhookId": "6bf9fa3c-704e-44c7-8dd4-e76d0800c324",
"signingKey": "jsXizLtzADbksSH5kJ1+U4N6/nkOVOOKCEjLm7TwMqI=",
"createdAt": "2026-08-25T12:11:41.280443742Z"
}
Step 2: Validate webhook notifications
When the AFNOR connector sends a webhook notification, it includes an Afnor-Signature header. Use the signing key returned when you created the subscription to verify that the notification was sent by the AFNOR connector and has not been modified.
Your webhook endpoint should:
- Receive the webhook request.
- Read the
Afnor-Signatureheader. - Validate the signature using the signing key associated with the
webhookId. - Process the notification only after the signature has been successfully validated.
- Return the appropriate HTTP response to acknowledge receipt.
Keep the signing key secure. Do not expose it in client-side code, logs, or publicly accessible configuration.
Step 3: Retrieve webhook subscriptions
List the webhook subscriptions configured for a Jefacture space.
Endpoint: /network/documents/spaces/connectors/afnor/v1/webhooks
Header parameters:
Request-Id(optional)Organization-Id
curl -L 'https://{{serverURL}}/network/documents/spaces/connectors/afnor/v1/webhooks' \
-H 'Request-Id: 4803c35e-d132-4d4a-a29a-9da5f583b89a' \
-H 'Organization-Id: 60debf1a-e348-46a2-8e28-36403f83b022' \
-H 'Authorization: Bearer YOUR_TOKEN'
Successful response:
{
"count": 1,
"webhooks": [
{
"webhookId": "6bf9fa3c-704e-44c7-8dd4-e76d0800c324",
"callbackUrl": "https://your-app.example.com/webhooks/afnor",
"signingKey": "jsXizLtzADbksSH5kJ1+U4N6/nkOVOOKCEjLm7TwMqI=",
"flowTypes": [
"SupplierInvoice"
],
"flowDirection": "In",
"createdAt": "2026-08-25T12:11:41.280443742Z"
}
]
}
Step 4: Remove a webhook subscription
Endpoint: /network/documents/spaces/connectors/afnor/v1/webhooks/{webhookId}
Path parameter:
webhookId
Header parameters:
Request-Id(optional)Organization-Id
curl -L -X DELETE 'https://{{serverURL}}/network/documents/spaces/connectors/afnor/v1/webhooks/{webhookId}' \
-H 'Request-Id: 4803c35e-d132-4d4a-a29a-9da5f583b89a' \
-H 'Organization-Id: 60debf1a-e348-46a2-8e28-36403f83b022' \
-H 'Authorization: Bearer YOUR_TOKEN'
Successful response:
The webhook subscription is deleted successfully.