SDK (@phosra/sdk)
import { PhosraClient } from "@phosra/sdk";
const phosra = new PhosraClient({
baseUrl: "https://phosra-api-sandbox-production.up.railway.app/api/v1",
accessToken: process.env.PHOSRA_API_KEY,
});
const result = await phosra.webhooks.test("8a1b2c3d-4e5f-4a6b-9c8d-1e2f3a4b5c6d");
console.log(result);curl -sS -X POST "https://phosra-api-sandbox-production.up.railway.app/api/v1/webhooks/8a1b2c3d-4e5f-4a6b-9c8d-1e2f3a4b5c6d/test" \
-H "Authorization: Bearer $PHOSRA_API_KEY"
import os, requests
BASE = "https://phosra-api-sandbox-production.up.railway.app/api/v1"
res = requests.post(
f"{BASE}/webhooks/8a1b2c3d-4e5f-4a6b-9c8d-1e2f3a4b5c6d/test",
headers={"Authorization": f"Bearer {os.environ['PHOSRA_API_KEY']}"},
)
print(res.status_code, res.json())
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := "https://phosra-api-sandbox-production.up.railway.app/api/v1"
req, _ := http.NewRequest("POST", base+"/webhooks/8a1b2c3d-4e5f-4a6b-9c8d-1e2f3a4b5c6d/test", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("PHOSRA_API_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(out))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://phosra-api-sandbox-production.up.railway.app/api/v1/webhooks/{webhookID}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://phosra-api-sandbox-production.up.railway.app/api/v1/webhooks/{webhookID}/test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://phosra-api-sandbox-production.up.railway.app/api/v1/webhooks/{webhookID}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "1c7e9a34-2d68-4b05-93f1-6a0c8e4d7b29",
"webhook_id": "d41c8f2a-90b7-4e63-a15c-8f0e2b7d3946",
"event": "policy.updated",
"payload": {},
"response_code": 0,
"success": true,
"attempts": 0,
"next_retry_at": "2026-07-06T04:40:00Z",
"created_at": "2026-06-18T14:32:07Z"
}{
"error": "Bad Request",
"message": "child_name is required",
"code": 400
}{
"error": "Unauthorized",
"message": "missing or invalid Authorization header",
"code": 401
}{
"error": "Forbidden",
"message": "not a member of this family",
"code": 403
}{
"error": "Too Many Requests",
"message": "rate limit exceeded",
"code": 429
}{
"error": "Internal Server Error",
"message": "internal error",
"code": 500
}Webhooks
Send a test delivery
Send a test delivery to a webhook
POST
/
webhooks
/
{webhookID}
/
test
SDK (@phosra/sdk)
import { PhosraClient } from "@phosra/sdk";
const phosra = new PhosraClient({
baseUrl: "https://phosra-api-sandbox-production.up.railway.app/api/v1",
accessToken: process.env.PHOSRA_API_KEY,
});
const result = await phosra.webhooks.test("8a1b2c3d-4e5f-4a6b-9c8d-1e2f3a4b5c6d");
console.log(result);curl -sS -X POST "https://phosra-api-sandbox-production.up.railway.app/api/v1/webhooks/8a1b2c3d-4e5f-4a6b-9c8d-1e2f3a4b5c6d/test" \
-H "Authorization: Bearer $PHOSRA_API_KEY"
import os, requests
BASE = "https://phosra-api-sandbox-production.up.railway.app/api/v1"
res = requests.post(
f"{BASE}/webhooks/8a1b2c3d-4e5f-4a6b-9c8d-1e2f3a4b5c6d/test",
headers={"Authorization": f"Bearer {os.environ['PHOSRA_API_KEY']}"},
)
print(res.status_code, res.json())
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := "https://phosra-api-sandbox-production.up.railway.app/api/v1"
req, _ := http.NewRequest("POST", base+"/webhooks/8a1b2c3d-4e5f-4a6b-9c8d-1e2f3a4b5c6d/test", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("PHOSRA_API_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(out))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://phosra-api-sandbox-production.up.railway.app/api/v1/webhooks/{webhookID}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://phosra-api-sandbox-production.up.railway.app/api/v1/webhooks/{webhookID}/test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://phosra-api-sandbox-production.up.railway.app/api/v1/webhooks/{webhookID}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "1c7e9a34-2d68-4b05-93f1-6a0c8e4d7b29",
"webhook_id": "d41c8f2a-90b7-4e63-a15c-8f0e2b7d3946",
"event": "policy.updated",
"payload": {},
"response_code": 0,
"success": true,
"attempts": 0,
"next_retry_at": "2026-07-06T04:40:00Z",
"created_at": "2026-06-18T14:32:07Z"
}{
"error": "Bad Request",
"message": "child_name is required",
"code": 400
}{
"error": "Unauthorized",
"message": "missing or invalid Authorization header",
"code": 401
}{
"error": "Forbidden",
"message": "not a member of this family",
"code": 403
}{
"error": "Too Many Requests",
"message": "rate limit exceeded",
"code": 429
}{
"error": "Internal Server Error",
"message": "internal error",
"code": 500
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Test delivery result
Unique identifier for this resource.
Identifier of the webhook.
Event type that triggered this delivery (e.g. policy.updated).
The event payload delivered to the endpoint, matching the webhook event schema.
HTTP status code returned by the subscriber endpoint; null if unreachable.
Whether the delivery received a 2xx response from the subscriber.
Number of delivery attempts made so far, including retries.
RFC 3339 timestamp.
RFC 3339 timestamp of when the resource was created.
⌘I