cURL
curl -X PATCH https://api.neuraldraft.io/v1/webhook-endpoints/whe_2NgcaXxFqLPo \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"events":["order.paid","order.fulfilled","order.created","blog_post.published"]}'await nd.webhooks.endpoints.update("whe_2NgcaXxFqLPo", {
events: ["order.paid", "order.fulfilled", "order.created", "blog_post.published"],
});
requests.patch("https://api.neuraldraft.io/v1/webhook-endpoints/whe_2NgcaXxFqLPo",
headers={"Authorization": f"Bearer {key}"},
json={"events":["order.paid","order.fulfilled","order.created","blog_post.published"]})
<?php
$client->patch('webhook-endpoints/whe_2NgcaXxFqLPo', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['events' => ['order.paid','order.fulfilled','order.created','blog_post.published']],
]);
{
"id": "whe_2NgcaXxFqLPo",
"url": "<string>",
"events": [
"blog_post.published"
],
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"last_delivery_status": "success",
"last_delivery_at": "2023-11-07T05:31:56Z"
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}Webhooks
Update a webhook endpoint
PATCH
/
webhook-endpoints
/
{id}
cURL
curl -X PATCH https://api.neuraldraft.io/v1/webhook-endpoints/whe_2NgcaXxFqLPo \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"events":["order.paid","order.fulfilled","order.created","blog_post.published"]}'await nd.webhooks.endpoints.update("whe_2NgcaXxFqLPo", {
events: ["order.paid", "order.fulfilled", "order.created", "blog_post.published"],
});
requests.patch("https://api.neuraldraft.io/v1/webhook-endpoints/whe_2NgcaXxFqLPo",
headers={"Authorization": f"Bearer {key}"},
json={"events":["order.paid","order.fulfilled","order.created","blog_post.published"]})
<?php
$client->patch('webhook-endpoints/whe_2NgcaXxFqLPo', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['events' => ['order.paid','order.fulfilled','order.created','blog_post.published']],
]);
{
"id": "whe_2NgcaXxFqLPo",
"url": "<string>",
"events": [
"blog_post.published"
],
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"last_delivery_status": "success",
"last_delivery_at": "2023-11-07T05:31:56Z"
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Path Parameters
Example:
"whe_2NgcaXxFqLPo"
Body
application/json
Minimum array length:
1All webhook event topics emitted by the platform.
Available options:
blog_post.published, blog_post.translated, social_post.published, social_post.failed, order.created, order.paid, order.fulfilled, order.cancelled, order.refunded, booking.confirmed, booking.cancelled, booking.completed, content.changed, image.generated, connect.account_updated Response
Updated.
Example:
"whe_2NgcaXxFqLPo"
All webhook event topics emitted by the platform.
Available options:
blog_post.published, blog_post.translated, social_post.published, social_post.failed, order.created, order.paid, order.fulfilled, order.cancelled, order.refunded, booking.confirmed, booking.cancelled, booking.completed, content.changed, image.generated, connect.account_updated Available options:
success, failed, pending, null