Create a Webhook endpoint
curl --request POST \
--url https://api.heyrafiki.space/v1/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: []})
};
fetch('https://api.heyrafiki.space/v1/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.heyrafiki.space/v1/webhook_endpoints"
payload = {
"url": "<string>",
"events": []
}
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.heyrafiki.space/v1/webhook_endpoints"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": []\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>",
"object": "webhook_endpoint",
"url": "<string>",
"events": [
"<string>"
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"disabled_at": "2023-11-07T05:31:56Z",
"signing_secret": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}Create a Webhook endpoint
Registers an endpoint and returns its signing secret once. Requires webhooks:write.
POST
/
webhook_endpoints
Create a Webhook endpoint
curl --request POST \
--url https://api.heyrafiki.space/v1/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: []})
};
fetch('https://api.heyrafiki.space/v1/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.heyrafiki.space/v1/webhook_endpoints"
payload = {
"url": "<string>",
"events": []
}
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.heyrafiki.space/v1/webhook_endpoints"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"events\": []\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>",
"object": "webhook_endpoint",
"url": "<string>",
"events": [
"<string>"
],
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"disabled_at": "2023-11-07T05:31:56Z",
"signing_secret": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"docs": "<string>"
}
}Authorizations
bearerAuthapiKeyAuth
A sandbox or production secret key.
Body
application/json
Maximum string length:
2048Required array length:
1 - 16 elementsAvailable options:
sandbox.ping, preauthorization.requested, preauthorization.approved, preauthorization.denied, preauthorization.expired, claim.submitted, claim.information_requested, claim.resubmitted, claim.approved, claim.partially_approved, claim.denied, claim.settled, remittance.reconciled Response
The Webhook endpoint was created
Maximum string length:
100Pattern:
^whe_[A-Za-z0-9_-]+$Allowed value:
"webhook_endpoint"Available options:
active, disabled Last modified on August 10, 2026
Was this page helpful?

