Skip to main content
POST
/
webhooks
/
clerk
Clerk webhook handler
curl --request POST \
  --url https://api.dualship.run/webhooks/clerk \
  --header 'Content-Type: application/json' \
  --header 'svix-id: <svix-id>' \
  --header 'svix-signature: <svix-signature>' \
  --header 'svix-timestamp: <svix-timestamp>' \
  --data '
{
  "data": [
    123
  ],
  "type": "<string>"
}
'
import requests

url = "https://api.dualship.run/webhooks/clerk"

payload = {
"data": [123],
"type": "<string>"
}
headers = {
"svix-id": "<svix-id>",
"svix-timestamp": "<svix-timestamp>",
"svix-signature": "<svix-signature>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {
'svix-id': '<svix-id>',
'svix-timestamp': '<svix-timestamp>',
'svix-signature': '<svix-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({data: [123], type: '<string>'})
};

fetch('https://api.dualship.run/webhooks/clerk', 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.dualship.run/webhooks/clerk",
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([
'data' => [
123
],
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"svix-id: <svix-id>",
"svix-signature: <svix-signature>",
"svix-timestamp: <svix-timestamp>"
],
]);

$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.dualship.run/webhooks/clerk"

payload := strings.NewReader("{\n \"data\": [\n 123\n ],\n \"type\": \"<string>\"\n}")

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

req.Header.Add("svix-id", "<svix-id>")
req.Header.Add("svix-timestamp", "<svix-timestamp>")
req.Header.Add("svix-signature", "<svix-signature>")
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.dualship.run/webhooks/clerk")
.header("svix-id", "<svix-id>")
.header("svix-timestamp", "<svix-timestamp>")
.header("svix-signature", "<svix-signature>")
.header("Content-Type", "application/json")
.body("{\n \"data\": [\n 123\n ],\n \"type\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.dualship.run/webhooks/clerk")

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

request = Net::HTTP::Post.new(url)
request["svix-id"] = '<svix-id>'
request["svix-timestamp"] = '<svix-timestamp>'
request["svix-signature"] = '<svix-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": [\n 123\n ],\n \"type\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "received": true
}
{
"code": "BAD_REQUEST",
"error": "invalid request parameters"
}
{
"code": "UNAUTHORIZED",
"error": "unauthorized"
}
{
"code": "INTERNAL_ERROR",
"error": "internal server error"
}

Headers

svix-id
string
required

Svix webhook ID

svix-timestamp
string
required

Svix webhook timestamp

svix-signature
string
required

Svix webhook signature

Body

application/json

Webhook event payload

data
integer[]
type
string

Response

Webhook received

Webhook processing response

received
boolean
Example:

true