Skip to main content

Webhooks API Reference

Create, manage, and monitor webhooks via the API.

Endpoints Overview

MethodEndpointDescription
GET/v1/webhooksList all webhooks
POST/v1/webhooksCreate a webhook
GET/v1/webhooks/{id}Get webhook details
PUT/v1/webhooks/{id}Update a webhook
DELETE/v1/webhooks/{id}Delete a webhook
POST/v1/webhooks/{id}/testTest a webhook
GET/v1/webhooks/{id}/deliveriesGet delivery history

List Webhooks

Retrieve all webhooks for your account.

Request

GET /v1/webhooks

Query Parameters

ParameterTypeDescription
limitintegerItems per page (max 100)
offsetintegerSkip items
enabledbooleanFilter by status

Example

curl https://api.tagd-ai.com/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"success": true,
"data": [
{
"id": "wh_abc123",
"name": "Tag Updates",
"url": "https://example.com/webhook",
"events": ["tag.created", "tag.updated"],
"enabled": true,
"created_at": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"total": 1,
"limit": 20,
"offset": 0,
"has_more": false
}
}

Create Webhook

Create a new webhook.

Request

POST /v1/webhooks
Content-Type: application/json

Body Parameters

ParameterTypeRequiredDescription
namestringYesWebhook name
urlstringYesEndpoint URL (HTTPS required)
eventsarrayYesEvents to subscribe to
secretstringNoSigning secret
headersobjectNoCustom headers
enabledbooleanNoActive status (default: true)

Available Events

EventDescription
tag.createdNew tag created
tag.updatedTag content changed
tag.deletedTag deleted
tag.viewedTag was accessed
file.uploadedFile added to tag
file.deletedFile removed
qr.generatedQR code generated
qr.scannedQR code scanned

Example

curl -X POST https://api.tagd-ai.com/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Webhook",
"url": "https://api.example.com/tagd-webhook",
"events": ["tag.created", "tag.updated", "tag.deleted"],
"secret": "your-webhook-secret",
"headers": {
"X-Custom-Header": "custom-value"
}
}'

Response

{
"success": true,
"data": {
"id": "wh_xyz789",
"name": "Production Webhook",
"url": "https://api.example.com/tagd-webhook",
"events": ["tag.created", "tag.updated", "tag.deleted"],
"enabled": true,
"secret": "your-webhook-secret",
"created_at": "2024-01-15T10:30:00Z"
}
}

Get Webhook

Retrieve webhook details.

Request

GET /v1/webhooks/{id}

Example

curl https://api.tagd-ai.com/v1/webhooks/wh_xyz789 \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"success": true,
"data": {
"id": "wh_xyz789",
"name": "Production Webhook",
"url": "https://api.example.com/tagd-webhook",
"events": ["tag.created", "tag.updated", "tag.deleted"],
"enabled": true,
"secret": "your-webhook-secret",
"headers": {
"X-Custom-Header": "custom-value"
},
"stats": {
"total_deliveries": 150,
"successful": 148,
"failed": 2,
"last_delivery_at": "2024-01-15T14:30:00Z"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T12:00:00Z"
}
}

Update Webhook

Update webhook configuration.

Request

PUT /v1/webhooks/{id}
Content-Type: application/json

Body Parameters

All parameters optional:

ParameterTypeDescription
namestringWebhook name
urlstringEndpoint URL
eventsarrayEvents to subscribe to
secretstringSigning secret
headersobjectCustom headers
enabledbooleanActive status

Example

curl -X PUT https://api.tagd-ai.com/v1/webhooks/wh_xyz789 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'

Delete Webhook

Remove a webhook.

Request

DELETE /v1/webhooks/{id}

Example

curl -X DELETE https://api.tagd-ai.com/v1/webhooks/wh_xyz789 \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"success": true,
"message": "Webhook deleted successfully"
}

Test Webhook

Send a test event to the webhook.

Request

POST /v1/webhooks/{id}/test
Content-Type: application/json

Body Parameters

ParameterTypeDescription
eventstringEvent type to simulate

Example

curl -X POST https://api.tagd-ai.com/v1/webhooks/wh_xyz789/test \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"event": "tag.created"
}'

Response

{
"success": true,
"data": {
"delivery_id": "del_test123",
"status": "success",
"response_code": 200,
"response_time_ms": 245
}
}

Get Delivery History

View webhook delivery attempts.

Request

GET /v1/webhooks/{id}/deliveries

Query Parameters

ParameterTypeDescription
limitintegerItems per page
offsetintegerSkip items
statusstringFilter: success, failed

Example

curl https://api.tagd-ai.com/v1/webhooks/wh_xyz789/deliveries \
-H "Authorization: Bearer YOUR_API_KEY"

Response

{
"success": true,
"data": [
{
"id": "del_abc123",
"event": "tag.created",
"status": "success",
"response_code": 200,
"response_time_ms": 156,
"attempt": 1,
"delivered_at": "2024-01-15T14:30:00Z",
"payload": {
"event": "tag.created",
"data": {...}
}
}
],
"pagination": {
"total": 150,
"limit": 20,
"offset": 0,
"has_more": true
}
}

Retry Failed Delivery

Retry a failed webhook delivery.

Request

POST /v1/webhooks/{id}/deliveries/{delivery_id}/retry

Example

curl -X POST https://api.tagd-ai.com/v1/webhooks/wh_xyz789/deliveries/del_abc123/retry \
-H "Authorization: Bearer YOUR_API_KEY"

Webhook Limits

PlanMax Webhooks
Pro5
EnterpriseUnlimited

Error Responses

400 Bad Request

{
"success": false,
"error": {
"code": "invalid_url",
"message": "Webhook URL must use HTTPS"
}
}

402 Payment Required

{
"success": false,
"error": {
"code": "webhook_limit_reached",
"message": "Maximum webhooks reached for your plan"
}
}

Next Steps