cURL
curl -X POST https://api.neuraldraft.io/v1/webhook-endpoints \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"url":"https://hooks.lakesideyoga.uk/neural-draft","events":["order.paid","order.fulfilled","blog_post.published"]}'
const ep = await nd.webhooks.endpoints.create({
url: "https://hooks.lakesideyoga.uk/neural-draft",
events: ["order.paid", "order.fulfilled", "blog_post.published"],
});
console.log(ep.signing_secret); // store immediately
r = requests.post("https://api.neuraldraft.io/v1/webhook-endpoints",
headers={"Authorization": f"Bearer {key}"},
json={"url":"https://hooks.lakesideyoga.uk/neural-draft","events":["order.paid","order.fulfilled","blog_post.published"]})
secret = r.json()["signing_secret"]
<?php
$ep = json_decode((string) $client->post('webhook-endpoints', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['url'=>'https://hooks.lakesideyoga.uk/neural-draft','events'=>['order.paid','order.fulfilled','blog_post.published']],
])->getBody(), true);
{
"id": "whe_2NgcaXxFqLPo",
"url": "https://hooks.lakesideyoga.uk/neural-draft",
"events": [
"order.paid",
"order.fulfilled",
"blog_post.published"
],
"is_active": true,
"signing_secret": "whsec_OmtQ9X5gTzUv7sR1kBhJnAeYpV2cDfWiM3oP",
"last_delivery_status": null,
"last_delivery_at": null,
"created_at": "2026-04-19T10:30:00Z"
}{
"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/validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields failed validation.",
"code": "validation_failed",
"instance": "req_2Nh4PqRsTuVw",
"errors": {
"customer_email": [
"The customer email field must be a valid email address."
],
"starts_at": [
"The starts at field must be a date after now."
]
}
}Webhooks
Create a webhook endpoint
The response includes the signing secret in plaintext. Store it immediately — subsequent reads return only the masked preview. Verify all incoming webhook bodies with HMAC-SHA256 using this secret.
POST
/
webhook-endpoints
cURL
curl -X POST https://api.neuraldraft.io/v1/webhook-endpoints \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"url":"https://hooks.lakesideyoga.uk/neural-draft","events":["order.paid","order.fulfilled","blog_post.published"]}'
const ep = await nd.webhooks.endpoints.create({
url: "https://hooks.lakesideyoga.uk/neural-draft",
events: ["order.paid", "order.fulfilled", "blog_post.published"],
});
console.log(ep.signing_secret); // store immediately
r = requests.post("https://api.neuraldraft.io/v1/webhook-endpoints",
headers={"Authorization": f"Bearer {key}"},
json={"url":"https://hooks.lakesideyoga.uk/neural-draft","events":["order.paid","order.fulfilled","blog_post.published"]})
secret = r.json()["signing_secret"]
<?php
$ep = json_decode((string) $client->post('webhook-endpoints', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['url'=>'https://hooks.lakesideyoga.uk/neural-draft','events'=>['order.paid','order.fulfilled','blog_post.published']],
])->getBody(), true);
{
"id": "whe_2NgcaXxFqLPo",
"url": "https://hooks.lakesideyoga.uk/neural-draft",
"events": [
"order.paid",
"order.fulfilled",
"blog_post.published"
],
"is_active": true,
"signing_secret": "whsec_OmtQ9X5gTzUv7sR1kBhJnAeYpV2cDfWiM3oP",
"last_delivery_status": null,
"last_delivery_at": null,
"created_at": "2026-04-19T10:30:00Z"
}{
"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/validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields failed validation.",
"code": "validation_failed",
"instance": "req_2Nh4PqRsTuVw",
"errors": {
"customer_email": [
"The customer email field must be a valid email address."
],
"starts_at": [
"The starts at field must be a date after now."
]
}
}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.
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
Created (with secret).
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 HMAC-SHA256 secret used to sign every delivery from this
endpoint. Returned only at creation. Use it to verify the
X-Neural-Draft-Signature header on incoming requests.
Example:
"whsec_OmtQ9X5gTzUv7sR1kBhJnAeYpV2cDfWiM3oP"
Available options:
success, failed, pending, null