Webhooks
Send test delivery
POSTs a signed webhook.test payload to a saved subscription URL. Does not create delivery
audit rows. Uses a 10 s timeout and sets header X-Webhook-Delivery: test.
How to call — POST {server}/api/v1/business/webhooks/test with X-API-Key and body { "webhookId": "<id>" }.
POST
/
api
/
v1
/
business
/
webhooks
/
test
Send test delivery
curl --request POST \
--url https://api-stage.ugift.me/api/v1/business/webhooks/test \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"webhookId": "65d3f4a5b6c7d89012345678"
}
'import requests
url = "https://api-stage.ugift.me/api/v1/business/webhooks/test"
payload = { "webhookId": "65d3f4a5b6c7d89012345678" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhookId: '65d3f4a5b6c7d89012345678'})
};
fetch('https://api-stage.ugift.me/api/v1/business/webhooks/test', 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-stage.ugift.me/api/v1/business/webhooks/test",
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([
'webhookId' => '65d3f4a5b6c7d89012345678'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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-stage.ugift.me/api/v1/business/webhooks/test"
payload := strings.NewReader("{\n \"webhookId\": \"65d3f4a5b6c7d89012345678\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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-stage.ugift.me/api/v1/business/webhooks/test")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhookId\": \"65d3f4a5b6c7d89012345678\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stage.ugift.me/api/v1/business/webhooks/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhookId\": \"65d3f4a5b6c7d89012345678\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"payload": {
"type": "webhook.test",
"sentAt": "2025-04-11T08:15:00.000Z",
"data": {
"message": "This is a test delivery from UGiftMe. Your endpoint should return HTTP 2xx within 10 seconds.",
"exampleOrderId": "ord_example_123"
}
},
"statusCode": 200,
"errorMessage": "<string>"
}Authorizations
Your UGiftMe API key for authentication.
Format: Secure API key (e.g., <your-api-key>)
Required: All endpoints require this header
Example: X-API-Key: <your-api-key>
Body
application/json
Id of a webhook subscription you own
Example:
"65d3f4a5b6c7d89012345678"
Response
Test delivery attempt result
Whether your endpoint returned HTTP 2xx
Show child attributes
Show child attributes
Example:
{
"type": "webhook.test",
"sentAt": "2025-04-11T08:15:00.000Z",
"data": {
"message": "This is a test delivery from UGiftMe. Your endpoint should return HTTP 2xx within 10 seconds.",
"exampleOrderId": "ord_example_123"
}
}
HTTP status from your endpoint, if a response was received
Example:
200
Present when ok is false
⌘I
Send test delivery
curl --request POST \
--url https://api-stage.ugift.me/api/v1/business/webhooks/test \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"webhookId": "65d3f4a5b6c7d89012345678"
}
'import requests
url = "https://api-stage.ugift.me/api/v1/business/webhooks/test"
payload = { "webhookId": "65d3f4a5b6c7d89012345678" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhookId: '65d3f4a5b6c7d89012345678'})
};
fetch('https://api-stage.ugift.me/api/v1/business/webhooks/test', 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-stage.ugift.me/api/v1/business/webhooks/test",
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([
'webhookId' => '65d3f4a5b6c7d89012345678'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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-stage.ugift.me/api/v1/business/webhooks/test"
payload := strings.NewReader("{\n \"webhookId\": \"65d3f4a5b6c7d89012345678\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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-stage.ugift.me/api/v1/business/webhooks/test")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhookId\": \"65d3f4a5b6c7d89012345678\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-stage.ugift.me/api/v1/business/webhooks/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhookId\": \"65d3f4a5b6c7d89012345678\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"payload": {
"type": "webhook.test",
"sentAt": "2025-04-11T08:15:00.000Z",
"data": {
"message": "This is a test delivery from UGiftMe. Your endpoint should return HTTP 2xx within 10 seconds.",
"exampleOrderId": "ord_example_123"
}
},
"statusCode": 200,
"errorMessage": "<string>"
}