Webhooks
Webhooks
Receive real-time notifications for events like completion completion, quota alerts, and more.
⚠️ Plan Required: Webhooks require Pro plan or higher.
Available Events
| Event | Description |
|---|---|
completion.created | New completion started |
completion.completed | Completion finished successfully |
completion.failed | Completion failed |
embedding.created | Embedding created |
agent.run.completed | Agent execution finished |
file.uploaded | File uploaded |
file.processed | File processing complete |
usage.threshold_reached | Quota threshold reached |
account.quota_exceeded | Quota exceeded |
GET
/api/v1/webhooks List Webhooks
Returns a list of webhooks for the organization.
POST
/api/v1/webhooks Create Webhook
Create a new webhook endpoint.
Parameters
| Name | Type | Req | Description | Default |
|---|---|---|---|---|
url | string | Yes | Webhook endpoint URL (HTTPS) | — |
events | array | Yes | Event types to subscribe to | — |
secret | string | No | Signing secret for verification | — |
POST
/api/v1/webhooks/{webhook_id}/test Test Webhook
Send a test event to a webhook.
GET
/api/v1/webhooks/{id} Retrieve Webhook
Retrieve details for a specific webhook by its ID.
PUT
/api/v1/webhooks/{id} Update Webhook
Update the configuration of an existing webhook.
Parameters
| Name | Type | Req | Description | Default |
|---|---|---|---|---|
url | string | Yes | Webhook endpoint URL (HTTPS) | — |
events | array | Yes | Event types to subscribe to | — |
secret | string | No | Signing secret for verification | — |
DELETE
/api/v1/webhooks/{id} Delete Webhook
Permanently delete a webhook by its ID.
Response Examples
{
"id": "wh_abc123def456",
"url": "https://your-app.com/webhook",
"events": ["chat.completion.created", "chat.completion.completed"],
"secret": "whsec_abc123",
"status": "active",
"created_at": 1791815801
}Code Examples
List Webhooks
curl https://api.meedoo.co/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY"Test Webhook
curl -X POST https://api.meedoo.co/api/v1/webhooks/wh_abc123/test \
-H "Authorization: Bearer YOUR_API_KEY"import requests
resp = requests.get(
"https://api.meedoo.co/api/v1/webhooks/wh_abc123",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
print(resp.json())import requests
resp = requests.put(
"https://api.meedoo.co/api/v1/webhooks/wh_abc123",
headers={"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"},
json={"events": ["chat.completion.created", "chat.completion.completed", "file.uploaded"]}
)
print(resp.json())import requests
resp = requests.delete(
"https://api.meedoo.co/api/v1/webhooks/wh_abc123",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
print(f"Status: {resp.status_code}")Create Webhook
curl -X POST https://api.meedoo.co/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhook",
"events": ["chat.completion.completed", "quota.alert"],
"secret": "my_signing_secret"
}'