Webhooks

Subscribe to Webhooks

To subscribe to webhooks for all businesses a Biz Owner has access to send an authenticated POST request to the https://api.yelp.com/v3/webhooks.

Note: Currently only leads_event webhooks are supported (NEW_EVENT, CONSUMER_PHONE_NUMBER_OPT_IN_EVENT, CONSUMER_PHONE_NUMBER_OPT_OUT_EVENT).

A webhook subscription will have a default expiration date of 14 days. To ensure no loss of data, it is recommended you unsubscribe and subscribe again at least an hour before the expiration date and time.

post/

Request

  • Base URL
    https://api.yelp.com
  • Auth
    HTTP bearer

Request body application/x-www-form-urlencoded

webhook_urlstring uri required

The URL to which the webhook events will be sent.

webhook_type'leads_event' required

The type of webhook event to subscribe to.

restricted_business_idsstring[]

An optional list of business IDs to restrict the webhook subscription to. If not provided, the webhook will be subscribed to events for all businesses the Biz Owner has access to. The maximum limit is 50 items.

Example request

{
  "webhook_url": "https://example.com/webhook/123",
  "webhook_type": "leads_event",
  "restricted_business_ids": [
    "w-WAiKJe__oZV13M34pTFw"
  ]
}

Response

200 OK - Webhook successfully subscribed

webhook_idstring

The unique identifier for the webhook subscription.

expiration_datestring

The date and time when the webhook subscription will expire. (ISO 8601 format)

Changes

No recorded changes to this operation across all 1 revision of this API.