Send an event
curl --request POST \
--url https://hooksnode.com/p/{sourceId} \
--header 'Content-Type: application/json' \
--data '
{
"event": "order.paid",
"order_id": "9311"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({event: 'order.paid', order_id: '9311'})
};
fetch('https://hooksnode.com/p/{sourceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://hooksnode.com/p/{sourceId}"
payload = {
"event": "order.paid",
"order_id": "9311"
}
headers = {"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://hooksnode.com/p/{sourceId}"
payload := strings.NewReader("{\n \"event\": \"order.paid\",\n \"order_id\": \"9311\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"status": "accepted",
"callback_id": 1042,
"enqueued": 2
}Ingest
Send an event
Send an event to a webhook or WhatsApp source. No API key is needed. The body can be up to 4 MiB and is stored byte for byte.
POST
/
p
/
{sourceId}
Send an event
curl --request POST \
--url https://hooksnode.com/p/{sourceId} \
--header 'Content-Type: application/json' \
--data '
{
"event": "order.paid",
"order_id": "9311"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({event: 'order.paid', order_id: '9311'})
};
fetch('https://hooksnode.com/p/{sourceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://hooksnode.com/p/{sourceId}"
payload = {
"event": "order.paid",
"order_id": "9311"
}
headers = {"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://hooksnode.com/p/{sourceId}"
payload := strings.NewReader("{\n \"event\": \"order.paid\",\n \"order_id\": \"9311\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}{
"status": "accepted",
"callback_id": 1042,
"enqueued": 2
}Headers
A unique key for this event. A second event with the same key in the same project is not stored.
Maximum string length:
255Example:
"order_9311_paid"
Required when signing is on for the source. sha256= and the hex HMAC-SHA256 of the raw body.
Example:
"sha256=5d41402abc4b2a76b9719d911017c592"
Path Parameters
The source ID. The default source of a project has the project ID.
Example:
"2mJ8kQ4vXw9aB3cD5eF7gH1iK0L"
Body
application/json
The body is of type object.