API Reference
Webhooks API
Manage project webhook endpoints and understand webhook payload structure and delivery behavior.
GET
/projects/{project_id}/webhooks
List webhooks
Returns all webhooks for a project, sorted by newest first. This endpoint is not paginated.
No request parameters.
Returns
A webhooks array.
Endpoint
https://api.nicedata.ai/v1/projects/{project_id}/webhooks
Example request
curl https://api.nicedata.ai/v1/projects/{project_id}/webhooks
-H "Authorization: Bearer nd_live_abc123..."
Example response
{
"webhooks": [
{
"id": "019d9999-abcd-7890-ef01-234567890abc",
"event_type": "document.processed",
"target_url": "https://example.com/webhooks/nicedata",
"name": "Production",
"active": true,
"created_at": "2026-03-25T14:35:00Z"
}
]
}
GET
/projects/{project_id}/webhooks/{webhook_id}
Retrieve webhook
Returns a single webhook by ID.
No request parameters.
Returns
A webhook object. The signing secret is not returned.
Endpoint
https://api.nicedata.ai/v1/projects/{project_id}/webhooks/{webhook_id}
Example request
curl https://api.nicedata.ai/v1/projects/{project_id}/webhooks/{webhook_id}
-H "Authorization: Bearer nd_live_abc123..."
Example response
{
"webhook": {
"id": "019d9999-abcd-7890-ef01-234567890abc",
"event_type": "document.processed",
"target_url": "https://example.com/webhooks/nicedata",
"name": "Production",
"active": true,
"created_at": "2026-03-25T14:35:00Z"
}
}
POST
/projects/{project_id}/webhooks
Create webhook
Creates a project webhook. Each project can have up to 10 webhooks.
| Parameter | Type | Description |
|---|---|---|
name |
string, required | Display name. |
event_type |
string, required | One of document.processed or document.failed. |
target_url |
string, required | HTTPS URL to receive deliveries. Private/internal hosts are rejected. |
active |
boolean, optional | Whether deliveries are enabled. Defaults to true. |
Returns
The created webhook object, including signing_secret. The secret is not returned again.
Endpoint
https://api.nicedata.ai/v1/projects/{project_id}/webhooks
Example request
curl https://api.nicedata.ai/v1/projects/{project_id}/webhooks \
-X POST \
-H "Authorization: Bearer nd_live_abc123..." \
-H "Content-Type: application/json" \
-d '{"name":"Production","event_type":"document.processed","target_url":"https://example.com/webhooks/nicedata"}'
Example response
{
"webhook": {
"id": "019d9999-abcd-7890-ef01-234567890abc",
"event_type": "document.processed",
"target_url": "https://example.com/webhooks/nicedata",
"name": "Production",
"active": true,
"created_at": "2026-03-25T14:35:00Z",
"signing_secret": "a1b2c3d4e5f6..."
}
}
PATCH
/projects/{project_id}/webhooks/{webhook_id}
Update webhook
Updates webhook properties.
| Parameter | Type | Description |
|---|---|---|
name |
string, optional | New display name. |
event_type |
string, optional | One of document.processed or document.failed. |
target_url |
string, optional | New HTTPS delivery URL. |
active |
boolean, optional | Enable or disable deliveries. |
Returns
The updated webhook object.
Endpoint
https://api.nicedata.ai/v1/projects/{project_id}/webhooks/{webhook_id}
Example request
curl https://api.nicedata.ai/v1/projects/{project_id}/webhooks/{webhook_id} \
-X PATCH \
-H "Authorization: Bearer nd_live_abc123..." \
-H "Content-Type: application/json" \
-d '{"name":"Production disabled","active":false}'
Example response
{
"webhook": {
"id": "019d9999-abcd-7890-ef01-234567890abc",
"event_type": "document.processed",
"target_url": "https://example.com/webhooks/nicedata",
"name": "Production disabled",
"active": false,
"created_at": "2026-03-25T14:35:00Z"
}
}
DELETE
/projects/{project_id}/webhooks/{webhook_id}
Delete webhook
Permanently deletes a webhook.
No request parameters.
Returns
No content.
Endpoint
https://api.nicedata.ai/v1/projects/{project_id}/webhooks/{webhook_id}
Example request
curl https://api.nicedata.ai/v1/projects/{project_id}/webhooks/{webhook_id} \
-X DELETE \
-H "Authorization: Bearer nd_live_abc123..."
Example response
204 No Content