POST
/
webhooks
/
subscriptions
Create Webhook Subscription
curl --request POST \
  --url https://jmpy.me/api/v1/webhooks/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_type": "<string>",
  "target_url": "<string>",
  "short_code": "<string>",
  "qr_code_id": "<string>",
  "filters": {}
}
'
Create a new webhook subscription. When events of the specified event_type occur, a POST request containing the event data will be sent to the target_url.
Plan Restrictions: Webhook access is subject to plan limits. If the user plan does not support webhooks, this endpoint returns a 403 Feature Disabled error.

Request Body

Required Parameters

event_type
string
required
The type of event to subscribe to. Must be one of:
  • link.clicked: Dispatched when a short URL is clicked.
  • link.clicked.unique: Dispatched when a short URL is clicked by a unique visitor.
  • link.clicked.utm: Dispatched when a short URL with UTM parameters is clicked.
  • qr.scanned: Dispatched when a QR code is scanned.
  • qr.scanned.unique: Dispatched when a QR code is scanned by a unique visitor.
  • link.created: Dispatched when a new short URL is created.
  • qr.created: Dispatched when a new QR code is generated.
target_url
string
required
The destination URL where webhook POST payloads will be sent. Must be a valid public HTTPS URL.

Optional Parameters

short_code
string
Optional filter. If provided, the subscription will only dispatch link.clicked events for this specific short code.
qr_code_id
string
Optional filter. If provided, the subscription will only dispatch qr.scanned events for this specific QR code UUID.
filters
object
An object specifying custom filtering criteria to restrict which events are dispatched. Supported filter keys:
  • campaign_id (string): Filter by Marketing Campaign UUID.
  • url_type (array of strings): Filter by link types (e.g. ["standard", "branded", "subdomain"]).
  • branded_domain (array of strings): Filter by specific branded domains.
  • subdomain (array of strings): Filter by specific subdomains.
  • is_dynamic (boolean): Only dispatch for dynamic links.
  • is_password_protected (boolean): Only dispatch for password/passcode protected links.
  • has_utm_params (boolean): Only dispatch if the link includes UTM tracking parameters.
  • tags (array of strings): Only dispatch if the link contains all these tags.
  • is_expiring (boolean): Only dispatch for links with configured expiration date/time.
  • custom_alias (boolean): Only dispatch for links that use a custom short alias instead of a randomly generated one.