Update a webhook
curl --request PATCH \
--url https://dashboard.perkstar.co.uk/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"card_id": "<string>",
"description": "<string>",
"is_active": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
events: [],
card_id: '<string>',
description: '<string>',
is_active: true
})
};
fetch('https://dashboard.perkstar.co.uk/api/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dashboard.perkstar.co.uk/api/v1/webhooks/{id}"
payload = {
"url": "<string>",
"events": [],
"card_id": "<string>",
"description": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dashboard.perkstar.co.uk/api/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'events' => [
],
'card_id' => '<string>',
'description' => '<string>',
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"url": "<string>",
"description": "<string>",
"events": [
"customer.enrolled"
],
"card_id": "<string>",
"mode": "all",
"verification_mode": "client_hmac",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Empty means subscribe to every event.
Stable dotted wire-format name for an outbound event.
customer.enrolled, customer.unenrolled, customer.anonymized, customer.group_changed, wallet.installed, card.scanned, card.expired, referral.created, transaction.created, coupon.redeemed, reward.redeemed, tier.changed, ticket.purchased, ticket.cancelled, ticket.refunded, gift.purchased, gift.redeemed, multipass.purchased, membership.purchased, membership.renewed, membership.cancelled, feedback.submitted, automation.fired, broadcast.sent, booking.created, booking.confirmed, booking.attended, booking.no_show, booking.cancelled, webhook.test Set null to clear the card filter.
Filter delivery by live/test activity before creating an outbound attempt. all preserves the default generic-webhook behaviour.
all, live, test May be repeated unchanged; changing it returns HTTP 409. Delete and recreate the subscription instead.
client_hmac, server_attested Response
OK
Empty means subscribe to every event.
Stable dotted wire-format name for an outbound event.
customer.enrolled, customer.unenrolled, customer.anonymized, customer.group_changed, wallet.installed, card.scanned, card.expired, referral.created, transaction.created, coupon.redeemed, reward.redeemed, tier.changed, ticket.purchased, ticket.cancelled, ticket.refunded, gift.purchased, gift.redeemed, multipass.purchased, membership.purchased, membership.renewed, membership.cancelled, feedback.submitted, automation.fired, broadcast.sent, booking.created, booking.confirmed, booking.attended, booking.no_show, booking.cancelled, webhook.test Optional card filter applied before a delivery is created. Null receives matching events from every card.
Filter delivery by live/test activity before creating an outbound attempt. all preserves the default generic-webhook behaviour.
all, live, test Immutable authenticity contract. client_hmac exposes the signing
secret once so the receiver verifies the exact raw body.
OAuth-only server_attested keeps that secret inside Perkstar and
verifies the parsed event through the delivery-verification endpoint.
client_hmac, server_attested Was this page helpful?
curl --request PATCH \
--url https://dashboard.perkstar.co.uk/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"card_id": "<string>",
"description": "<string>",
"is_active": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
events: [],
card_id: '<string>',
description: '<string>',
is_active: true
})
};
fetch('https://dashboard.perkstar.co.uk/api/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dashboard.perkstar.co.uk/api/v1/webhooks/{id}"
payload = {
"url": "<string>",
"events": [],
"card_id": "<string>",
"description": "<string>",
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dashboard.perkstar.co.uk/api/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'events' => [
],
'card_id' => '<string>',
'description' => '<string>',
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<string>",
"url": "<string>",
"description": "<string>",
"events": [
"customer.enrolled"
],
"card_id": "<string>",
"mode": "all",
"verification_mode": "client_hmac",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"message": "<string>",
"code": "<string>",
"param": "<string>"
}
}
