Create a webhook endpoint
POST
/v1/webhook-endpoints
const url = 'https://api.validationcheck.net/v1/webhook-endpoints';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com/webhooks/validationcheck","events":["credits.low","credits.depleted"],"description":"example","format":"json"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.validationcheck.net/v1/webhook-endpoints \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://example.com/webhooks/validationcheck", "events": [ "credits.low", "credits.depleted" ], "description": "example", "format": "json" }'Returns the signing secret once. Verify each delivery’s VC-Signature header with it.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
string
Example
https://example.com/webhooks/validationcheckevents
required
Array
Example
[ "credits.low", "credits.depleted"]description
string
format
Defaults to slack or discord for their incoming-webhook URLs, json otherwise.
string
Responses
Section titled “Responses”Created
Media typeapplication/json
object
success
required
boolean
data
required
object
id
required
string
url
required
string
description
required
string | null
events
required
Event types, or [“*”] for all.
Array<string>
format
required
Json: signed JSON payload. slack / discord: a chat message for an incoming-webhook URL.
string
status
required
string
disabled_reason
required
“failing” when turned off after a day of failed deliveries.
string | null
created_at
required
string
secret
required
Signs every delivery (VC-Signature). Shown only when created or rotated.
string
Example
{ "success": true, "data": { "id": "we_3f9c…", "format": "json", "status": "enabled" }}Error
Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
message
required
string
docs_url
required
string format: uri
request_id
required
string
Example
{ "success": false, "error": { "code": "INVALID_REQUEST" }}Error
Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
message
required
string
docs_url
required
string format: uri
request_id
required
string
Example
{ "success": false, "error": { "code": "INVALID_REQUEST" }}Error
Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
message
required
string
docs_url
required
string format: uri
request_id
required
string
Example
{ "success": false, "error": { "code": "INVALID_REQUEST" }}Error
Media typeapplication/json
object
success
required
boolean
error
required
object
code
required
string
message
required
string
docs_url
required
string format: uri
request_id
required
string
Example
{ "success": false, "error": { "code": "INVALID_REQUEST" }}