Skip to main content
POST
/
api
/
v1
/
organizations
/
{orgId}
/
webhooks
/
{id}
/
test
Send Test Event
curl --request POST \
  --url https://api.bunship.com/api/v1/organizations/{orgId}/webhooks/{id}/test \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.bunship.com/api/v1/organizations/{orgId}/webhooks/{id}/test"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.bunship.com/api/v1/organizations/{orgId}/webhooks/{id}/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.bunship.com/api/v1/organizations/{orgId}/webhooks/{id}/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;
}
package main

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

func main() {

url := "https://api.bunship.com/api/v1/organizations/{orgId}/webhooks/{id}/test"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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.bunship.com/api/v1/organizations/{orgId}/webhooks/{id}/test")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.bunship.com/api/v1/organizations/{orgId}/webhooks/{id}/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
{
  "success": true,
  "data": {
    "id": "del_abc123",
    "webhookId": "wh_abc123",
    "event": "test",
    "statusCode": 200,
    "deliveredAt": "2024-01-15T10:00:01Z"
  }
}
Sends a test webhook event to the specified endpoint. Use this to verify that your endpoint is correctly configured and responding to deliveries.

Auth

Requires a valid Bearer token. User must be a member of the organization.

Path Parameters

orgId
string
required
Organization identifier.
id
string
required
Webhook endpoint identifier.

Response

Returns the delivery result including the response status code from the target endpoint.
{
  "success": true,
  "data": {
    "id": "del_abc123",
    "webhookId": "wh_abc123",
    "event": "test",
    "statusCode": 200,
    "deliveredAt": "2024-01-15T10:00:01Z"
  }
}

Example

curl -X POST https://api.bunship.com/api/v1/organizations/org_cld2abc123def456/webhooks/wh_abc123/test \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."