POST
/v1/webhooks/{id}/testPosts one signed {"type": "webhook.test", "invoiceId": null, "event": null} to this webhook now and answers what the receiver said. It is not retried and not listed among the deliveries.
Path parameters
- idstring (uuid)Required
Response
A 200 answer carries these fields.
- statusinteger or nullRequired
- errorstring or nullRequired
Status codes
| Status | Meaning |
|---|---|
200 |
What the receiver answered. status is null, with error, when no answer came. |
401 |
No usable credential was sent (invalid_credentials). |
404 |
This company has no live webhook with this id (unknown_webhook). The same answer is given for a stopped one, another company’s, or an invalid id. |
POST
/v1/webhooks/{id}/testExample
curl -X POST https://api.certinvo.com/v1/webhooks/$WEBHOOK_ID/test \
-H "Authorization: Bearer $CERTINVO_API_KEY"const webhookId = '3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a'
const response = await fetch(`https://api.certinvo.com/v1/webhooks/${webhookId}/test`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
},
})
console.log(response.status, await response.json())import os
import requests
webhook_id = "3f0c2a5e-8d1b-4c7a-9e2f-6b5d4a3c2b1a"
response = requests.post(
f"https://api.certinvo.com/v1/webhooks/{webhook_id}/test",
headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}"},
)
print(response.status_code, response.text)200
application/json
{
"status": 0,
"error": "string"
}Success response