Skip to main content
POST
/
api
/
v1
/
notifications
/
sample
Send a sample webhook
curl --request POST \
  --url https://api.byblend.com/api/v1/notifications/sample \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_code": "order.shipped.SAMPLE",
  "webhook_url": "https://example.com/webhook"
}
'
import requests

url = "https://api.byblend.com/api/v1/notifications/sample"

payload = {
"event_code": "order.shipped.SAMPLE",
"webhook_url": "https://example.com/webhook"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({event_code: 'order.shipped.SAMPLE', webhook_url: 'https://example.com/webhook'})
};

fetch('https://api.byblend.com/api/v1/notifications/sample', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.byblend.com/api/v1/notifications/sample",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event_code' => 'order.shipped.SAMPLE',
'webhook_url' => 'https://example.com/webhook'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.byblend.com/api/v1/notifications/sample"

payload := strings.NewReader("{\n \"event_code\": \"order.shipped.SAMPLE\",\n \"webhook_url\": \"https://example.com/webhook\"\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))

}
HttpResponse<String> response = Unirest.post("https://api.byblend.com/api/v1/notifications/sample")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event_code\": \"order.shipped.SAMPLE\",\n \"webhook_url\": \"https://example.com/webhook\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.byblend.com/api/v1/notifications/sample")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_code\": \"order.shipped.SAMPLE\",\n \"webhook_url\": \"https://example.com/webhook\"\n}"

response = http.request(request)
puts response.read_body
{
  "event_code": "order.shipped.SAMPLE",
  "payload_preview": {
    "carrier": "USPS",
    "created_at": "2025-07-31T17:13:13.520283",
    "external_id": "my-id-128318AA2",
    "id": "0227d1e5-ba9a-42b5-8fe2-38882aa65708",
    "order_number": "ORD250312003548IAU4",
    "shipped_at": "2025-07-31T17:13:13.520304",
    "service_level": "Ground Advantage",
    "status": "shipped",
    "tracking_number": "9200190347375200504724",
    "tracking_url": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9200190347375200504724",
    "updated_at": "2025-07-31T17:13:13.520304"
  },
  "message": "Sample webhook sent successfully",
  "webhook_url": "https://example.com/webhook"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
event_code
string

Event code for the sample payload. Thee

Example:

"order.shipped.SAMPLE"

webhook_url
string

URL of the your listener URL to receive the webhook

Example:

"https://example.com/webhook"

Response

200 - application/json

Successful response with sample webhook details

event_code
string

Event code as provided

Example:

"order.shipped.SAMPLE"

payload_preview
object

Preview of the webhook payload

message
string
Example:

"Sample webhook sent successfully"

webhook_url
string

URL of the webhook that received the event

Example:

"https://example.com/webhook"