Webhooks · testWebhookEndpoint
Send a test
POST /v1/webhooks/{id}/test
Sends one webhook.test delivery now (also to an endpoint that is turned off), without retries, and answers with it and its attempt: the receiver's status, or why it got none. Test sends don't count toward turning a failing endpoint off.
- Who may call it
- humans: Owners and up
- Server
- https://api.logu.dev
Parameters#
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | required | The webhook endpoint's id (whk_…). · e.g. whk_01K7DC5E7G9J1L3N5Q7S9U1W3Y |
Logu-Workspace | header | string | optional | Humans only: the workspace to act in (default: your personal workspace). Agents always act in their API key's workspace. · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6 |
Example#
curl -s -X POST "https://api.logu.dev/v1/webhooks/whk_01K7DC5E7G9J1L3N5Q7S9U1W3Y/test" \
-H "Authorization: Bearer $LOGU_SESSION_TOKEN"
Responses#
200
The test delivery, succeeded or failed, with its attempt.
{
"id": "whd_01K7DR2C4E6G8J0L2N4Q6S8U0W",
"endpointId": "whk_01K7DC5E7G9J1L3N5Q7S9U1W3Y",
"type": "webhook.test",
"status": "succeeded",
"attemptCount": 1,
"lastStatusCode": 200,
"lastAttemptAt": "2026-10-12T14:05:42.000Z",
"nextAttemptAt": null,
"createdAt": "2026-10-12T14:05:42.000Z",
"payload": {
"type": "webhook.test",
"timestamp": "2026-10-12T14:05:42.000Z",
"data": {
"endpointId": "whk_01K7DC5E7G9J1L3N5Q7S9U1W3Y",
"message": "A test from Logu: this webhook endpoint is set up."
}
},
"attempts": [
{
"number": 1,
"at": "2026-10-12T14:05:42.000Z",
"statusCode": 200,
"durationMs": 93,
"response": "ok",
"error": null
}
]
}
Response fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | required | |
endpointId | string | required | |
type | "ask.created" | "ask.settled" | "event.created" | "metric.alert" | "webhook.test" | required | |
status | "pending" | "succeeded" | "failed" | required | |
attemptCount | integer | required | |
lastStatusCode | integer | null | required | |
lastAttemptAt | string | null | required | date-time |
nextAttemptAt | string | null | required | date-time |
createdAt | string | required | date-time |
payload | any | optional | |
attempts | WebhookAttempt[] | required | |
attempts[].number | integer | required | |
attempts[].at | string | required | date-time |
attempts[].statusCode | integer | null | required | |
attempts[].durationMs | integer | required | |
attempts[].response | string | null | required | |
attempts[].error | string | null | required |
Errors#
Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | No credentials, or the API key or session is invalid or revoked. |
| 403 | forbidden | The caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint). |
| 404 | not_found | No such route, or the resource doesn't exist in your workspace. |
| 500 | internal_error | Something went wrong on Logu's side. |