Skip to main content
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);
{
  "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"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

webhookID
string<uuid>
required

Response

Test delivery result

id
string<uuid>

Unique identifier for this resource.

webhook_id
string<uuid>

Identifier of the webhook.

event
string

Event type that triggered this delivery (e.g. policy.updated).

payload
object

The event payload delivered to the endpoint, matching the webhook event schema.

response_code
integer | null

HTTP status code returned by the subscriber endpoint; null if unreachable.

success
boolean

Whether the delivery received a 2xx response from the subscriber.

attempts
integer

Number of delivery attempts made so far, including retries.

next_retry_at
string<date-time> | null

RFC 3339 timestamp.

created_at
string<date-time>

RFC 3339 timestamp of when the resource was created.