API reference
Send a sample signed post.published event to a URL before saving a subscription.
https://api.betterpost.dev/v1/notifications/testNothing is saved and the test is not retried. The sample uses the real headers and payload format but is signed with a temporary secret, so it checks reachability and parsing, not signature verification.
| Field | Type | Required | Description |
|---|---|---|---|
channel | string | Yes | "webhook". |
webhook.url | string | Yes | Public https URL to send the sample to. |
profileId | string or null | No | Copied into the sample's profileId. |
curl -s -X POST https://api.betterpost.dev/v1/notifications/test \
-H "x-access-key: $BETTERPOST_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "channel": "webhook", "webhook": { "url": "https://app.example.com/webhooks/betterpost" } }'200 OK
{
"success": true,
"message": "Test event delivered (HTTP 200). The sample is signed with a temporary secret, so its signature can't be verified with a saved subscription secret."
}The request itself succeeds even when the endpoint does not: success is then false and message says why,
for example Test event was not accepted: the endpoint responded with HTTP 500. ... or
Test event could not be delivered: no response from the endpoint. ....
| Status | Code | When |
|---|---|---|
200 | The test was attempted. Check success. | |
400 | validation_error | webhook.url is missing, or an unknown field was sent. |
400 | invalid_url | The URL is not https or not public. |
400 | channel_not_supported | channel is email. |
401 | unauthorized | Missing or unknown API key. |
429 | rate_limited | More than 120 requests per minute. |
404 | not_found | profileId does not exist in this project. |