Skip to main content
PUT
/
v2
/
webhooks
/
{webhookId}
Update Webhook Information
curl --request PUT \
  --url https://api.loyalty.dog/v2/webhooks/{webhookId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "sharedSecret": "<string>",
  "allPassTemplates": true,
  "allowedTemplates": [
    "5eb7cf5a86d9755df3a6c593"
  ],
  "allEventTypes": true,
  "allowedEvents": []
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

JWT access token obtained from POST /v2/token.

Headers

authorization
string | null

Path Parameters

webhookId
required
Required string length: 24
Pattern: ^[0-9a-f]{24}$
Example:

"5eb7cf5a86d9755df3a6c593"

Body

application/json

The webhook creation payload

Attributes: url (str): The webhook URL sharedSecret (str | None, optional): A random string to handshake to verify the URL and hmac the event payload data. Defaults to None allowedTemplates (List[PydanticObjectId] | None, optional): A list ID of the allowed templates. Defaults to None allowedEvents (List[WebhookEventType] | None, optional): A list of allowed webhook types. Defaults to None

url
string<uri>
required
Required string length: 1 - 2083
sharedSecret
string | null
Minimum string length: 8
allPassTemplates
boolean | null
allowedTemplates
string[] | null
Required string length: 24
Pattern: ^[0-9a-f]{24}$
allEventTypes
boolean | null
allowedEvents
(enum<string> | string)[] | null
Available options:
pass.created,
pass.updated,
pass.downloaded,
pass.installed,
pass.deleted,
registration.created,
registration.deleted,
scan.performed,
webhook.verify,
transaction.completed,
loyalty.activity.performed,
loyalty.activity.reward.redeemed,
loyalty.activity.points.redeemed,
loyalty.activity.offer.received,
loyalty.activity.offer.redeemed,
loyalty.activity.offer.expired,
loyalty.activity.voucher.received,
loyalty.activity.voucher.redeemed,
loyalty.activity.voucher.expired,
loyalty.activity.points.changed,
loyalty.activity.email.added,
loyalty.activity.phone.added,
loyalty.activity.customer.referred,
loyalty.activity.custom.field.added,
loyalty.activity.card.installed,
loyalty.activity.card.scanned,
loyalty.customer.created,
loyalty.customer.updated,
loyalty.customer.deleted

Response

Successful Response