curl --request POST \
--url https://api.dev.purplelabelmd.com/v1/webhooks/registrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Brand-Id: <x-brand-id>' \
--data '
{
"event_types": [],
"url": "<string>"
}
'import requests
url = "https://api.dev.purplelabelmd.com/v1/webhooks/registrations"
payload = {
"event_types": [],
"url": "<string>"
}
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Brand-Id': '<x-brand-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({event_types: [], url: '<string>'})
};
fetch('https://api.dev.purplelabelmd.com/v1/webhooks/registrations', 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.dev.purplelabelmd.com/v1/webhooks/registrations",
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([
'event_types' => [
],
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Brand-Id: <x-brand-id>"
],
]);
$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.dev.purplelabelmd.com/v1/webhooks/registrations"
payload := strings.NewReader("{\n \"event_types\": [],\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.dev.purplelabelmd.com/v1/webhooks/registrations")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event_types\": [],\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/webhooks/registrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_types\": [],\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"brand_id": "<string>",
"client_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"event_types": [
"journey.prospect.captured.v1"
],
"registration_id": "<string>",
"secret_set": true,
"url": "<string>"
},
"secret": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}Register a webhook endpoint (signing secret shown once)
Registers an endpoint to receive deliveries for the event types you select. The registration is scoped to your client and brand automatically — no request field chooses them. The response returns an HMAC signing secret one time only: store it now to verify delivery signatures, because it is never shown again in any read, log, event, or error. The target must be an https URL.
curl --request POST \
--url https://api.dev.purplelabelmd.com/v1/webhooks/registrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Brand-Id: <x-brand-id>' \
--data '
{
"event_types": [],
"url": "<string>"
}
'import requests
url = "https://api.dev.purplelabelmd.com/v1/webhooks/registrations"
payload = {
"event_types": [],
"url": "<string>"
}
headers = {
"X-Brand-Id": "<x-brand-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Brand-Id': '<x-brand-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({event_types: [], url: '<string>'})
};
fetch('https://api.dev.purplelabelmd.com/v1/webhooks/registrations', 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.dev.purplelabelmd.com/v1/webhooks/registrations",
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([
'event_types' => [
],
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Brand-Id: <x-brand-id>"
],
]);
$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.dev.purplelabelmd.com/v1/webhooks/registrations"
payload := strings.NewReader("{\n \"event_types\": [],\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Brand-Id", "<x-brand-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.dev.purplelabelmd.com/v1/webhooks/registrations")
.header("X-Brand-Id", "<x-brand-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event_types\": [],\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/webhooks/registrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Brand-Id"] = '<x-brand-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_types\": [],\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"brand_id": "<string>",
"client_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"enabled": true,
"event_types": [
"journey.prospect.captured.v1"
],
"registration_id": "<string>",
"secret_set": true,
"url": "<string>"
},
"secret": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}Authorizations
Per-client API key (M2M). Presented as Authorization: Bearer <key>.
Headers
Opaque brand id (brd_...). Validated to belong to the resolved client (§2).
^brd_[A-Za-z0-9][A-Za-z0-9_-]*$Accepted on mutations; carried in trusted context, enforced in a later WI.
Body
a non-empty, duplicate-free selection from the event-type catalog
1The set of event-type names a webhook endpoint can subscribe to. Additive within v0 — new types may be added over time; existing ones are stable.
journey.prospect.captured.v1, journey.intake.submitted.v1, journey.eligibility.evaluated.v1, journey.evaluation.deferred.v1, journey.evaluation.resumed.v1, journey.identity.bound.v1, journey.case.opened.v1, journey.payment.succeeded.v1, journey.identity.verified.v1, journey.visit.completed.v1, journey.labs.skipped.v1, journey.rx.transmitted.v1, journey.shipment.shipped.v1, journey.shipment.delivered.v1, journey.checkin.completed.v1, journey.step.abandoned.v1, onboarding.client.started.v1, onboarding.step.started.v1, onboarding.step.assigned.v1, onboarding.step.completed.v1, onboarding.step.nudged.v1, onboarding.step.escalated.v1, onboarding.agreement.executed.v1, onboarding.completion.gate_ready.v1, onboarding.completion.e2e_result.v1, onboarding.client.completed.v1 the delivery target: an absolute https URL, with no embedded credentials and no fragment.
2048Response
created — the ONLY response ever carrying the secret
the creation response — the ONLY message that ever carries the secret
A registration as returned by reads. The signing secret is not included and is never readable after creation — secret_set: true attests that one exists.
Show child attributes
Show child attributes
the generated HMAC signing secret (psig_…), shown once. Store it now — it is held server-side and never returned again.