Create a webhook endpoint
curl --request POST \
--url https://api.panoqore.example/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"topics": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', topics: ['<string>']})
};
fetch('https://api.panoqore.example/v1/webhook-endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.panoqore.example/v1/webhook-endpoints"
payload = {
"url": "<string>",
"topics": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.panoqore.example/v1/webhook-endpoints"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"topics\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"topics": [
"<string>"
],
"health": "HEALTHY",
"delivered": "<string>",
"failed": "<string>",
"pending": "<string>",
"p95Ms": "<string>",
"failedByHour": [
"<string>"
],
"lastFailureAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"secret": "<string>"
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}Webhooks
Create a webhook endpoint
A signed test event is sent first; the endpoint is saved only if it answers 2xx.
Scope: webhooks:manage.
POST
/
v1
/
webhook-endpoints
Create a webhook endpoint
curl --request POST \
--url https://api.panoqore.example/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"topics": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', topics: ['<string>']})
};
fetch('https://api.panoqore.example/v1/webhook-endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.panoqore.example/v1/webhook-endpoints"
payload = {
"url": "<string>",
"topics": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.panoqore.example/v1/webhook-endpoints"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"topics\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"topics": [
"<string>"
],
"health": "HEALTHY",
"delivered": "<string>",
"failed": "<string>",
"pending": "<string>",
"p95Ms": "<string>",
"failedByHour": [
"<string>"
],
"lastFailureAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"secret": "<string>"
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}{
"error": {
"code": "INSUFFICIENT_FUNDS",
"message": "<string>",
"details": {},
"request_id": "<string>"
}
}Authorizations
An API key, pk_live_… or pk_test_….
Body
application/json
Response
OK
whe_…
an event type, a group like entry.*, or *
FAILING: something failed or needed a retry in the last 24 hours
IDLE: nothing sent yet
Available options:
HEALTHY, FAILING, IDLE The last 24 hours. A 64-bit integer, written as a string.
gave up after the last retry A 64-bit integer, written as a string.
waiting for a first try or a retry A 64-bit integer, written as a string.
A 64-bit integer, written as a string.
24 buckets, oldest first: deliveries that failed or needed a retry
A 64-bit integer, written as a string.
only in the answer to CreateEndpoint