Register a URL to receive webhooks
curl --request POST \
--url http://127.0.0.1:44010/v1/webhooks/endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks/taramiz"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com/webhooks/taramiz'})
};
fetch('http://127.0.0.1:44010/v1/webhooks/endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://127.0.0.1:44010/v1/webhooks/endpoints"
payload = { "url": "https://example.com/webhooks/taramiz" }
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 := "http://127.0.0.1:44010/v1/webhooks/endpoints"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks/taramiz\"\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": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "live",
"url": "<string>",
"description": "<string>",
"status": "active",
"secret_prefix": "<string>",
"previous_secret_expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"secret": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}API Reference
Register a URL to receive webhooks
Needs the crypto:webhooks:manage scope. The URL must be https on a public host name or address. It is sent a signed webhook.test event first and is saved only if it answers with a 2xx status, so a mistyped URL is caught now. The signing secret is in the answer once and cannot be shown again: store it. Each account may have at most 5 active endpoints per environment.
POST
/
v1
/
webhooks
/
endpoints
Register a URL to receive webhooks
curl --request POST \
--url http://127.0.0.1:44010/v1/webhooks/endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks/taramiz"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com/webhooks/taramiz'})
};
fetch('http://127.0.0.1:44010/v1/webhooks/endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://127.0.0.1:44010/v1/webhooks/endpoints"
payload = { "url": "https://example.com/webhooks/taramiz" }
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 := "http://127.0.0.1:44010/v1/webhooks/endpoints"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks/taramiz\"\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": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "live",
"url": "<string>",
"description": "<string>",
"status": "active",
"secret_prefix": "<string>",
"previous_secret_expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"secret": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Body
application/json
Response
The endpoint, with its signing secret.

