Yotpo Events

App-level and store-level webhooks

Each event is characterized by a tenant type, which signifies the proprietor of the event data. Events that occur at the store level, such as the accumulation of loyalty points or the dispatch of an SMS, are linked with the store tenant type. Partners can subscribe to store events for the stores that have installed their apps.

Events pertaining to the disconnection of the application fall under the application tenant type. Only the application itself can subscribe to its own application events.

This structure ensures the accuracy and relevance of the event data.

  • When you subscribe to app-level webhooks, you need to insert only your application ID. The subscription is once per application ID.
  • When you subscribe to store-level webhooks, you need to insert both the app ID and the specific store ID. You need to subscribe to each store separately.

Webhook headers

Headers use key-value parameters that are sent as part of the webhook request.
A standard header contains a key-value pair that can be added to a webhook.

Yotpo’s webhooks include 4 types of headers:

  1. X-Yotpo-Webhooks-Tenant-Type : The tenant type of the event (store or application)
  2. X-Yotpo-Webhooks-Tenant-Id : The ID of the tenant - depending on the tenant, this field is either store_id(_app_key) or _application_id
  3. WebhookMessageId : A unique ID for the event. This helps catch duplicate events
  4. x-yotpo-webhooks-event-type: Specifies the event type that triggered the webhook, allowing quick identification of the event without parsing the payload

Yotpo SMS & Email events

The following webhook events are available:

SMS events

Webhook event name (topic)TriggerTenant typeTenant ID
communication.sms.subscribed.v1Triggered when a user subscribes to SMS communicationsStorestore_id
communication.sms.unsubscribed.v1Triggered when a user unsubscribes from SMS communicationsStorestore_id
communication.sms.sent.v1Triggered when an SMS message is sent to a userStorestore_id
communication.sms.clicked.v1Triggered when a user clicks a link in an SMS messageStorestore_id
{
  "event_name": "communication.sms.subscribed.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source": "api",
  "sub_source": "rndm_app",
  "accepts_sms_marketing": true,
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}
{
  "event_name": "communication.sms.unsubscribed.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source": "api",
  "accepts_sms_marketing": false,
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}
{
  "event_name": "communication.sms.sent.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source_name": "part_of_flow",
  "flow_id": 1019753,
  "campaign_id": null,
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}
{
  "event_name": "communication.sms.clicked.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source_name": "part_of_campaign",
  "campaign_id": null,
  "flow_id": 1411137,
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671" 
  }
}

Email events

Webhook event name (topic)TriggerTenant typeTenant ID
communication.email.subscribed.v1Triggered when a user subscribes to email communicationsStorestore_id
communication.email.unsubscribed.v1Triggered when a user unsubscribes from email communicationsStorestore_id
communication.email.list_update.v1Triggered when a user email list is updatedStorestore_id
communication.email.sent.v1Triggered when an email is sent to a subscriberStorestore_id
communication.email.delivered.v1Triggered when an email is successfully delivered to a subscriber's inboxStorestore_id
communication.email.opened.v1Triggered when a user opens an emailStorestore_id
communication.email.clicked.v1Triggered when a user clicks a link in an emailStorestore_id
communication.email.bounced.v1Triggered when an email bouncesStorestore_id
{
  "event_name": "communication.email.subscribed.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source": "api",
  "sub_source": "yotpo",
  "accepts_email_marketing": true,
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671" 
  }
}
{
  "event_name": "communication.email.unsubscribed.v1",
  "timestamp": "2024-01-15T11:57:54",
  "accepts_email_marketing": false,
  "source_name": "rndm_campaigns",
  "source_id": "Loyalty Anniversary",
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}
{
  "event_name": "communication.email.list_update.v1",
  "timestamp": "2024-01-15T11:57:54",
  "list_id": "2822364",
  "action": "remove",
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}
{
  "event_name": "communication.email.sent.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source_name": "communication_flows",
  "source_id": "2822364",
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}
{
  "event_name": "communication.email.delivered.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source_name": "communication_flows",
  "source_id": "2822364",
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}
{
  "event_name": "communication.email.opened.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source_name": "communication_campaigns",
  "source_id": "2822364",
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}
{
  "event_name": "communication.email.clicked.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source_name": "communication_campaigns",
  "source_id": "2822364",
  "clicked_url": "https://testing.com/homepage?utm_campaign=yotpo",
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}
{
  "event_name": "communication.email.bounced.v1",
  "timestamp": "2024-01-15T11:57:54",
  "source_name": "communication_campaigns",
  "source_id": "2822364",
  "customer": {
    "external_id": 7144482046187,
    "first_name": "Tom",
    "last_name": "Smith",
    "email": "[email protected]",
    "phone": "+14155552671"
  }
}

App uninstall

Webhook event name (topic)TriggerTenant typeTenant ID
integrations.applications.disconnected.v3Triggered when a merchant clicks on the "disconnect" button within the integration page in Yotpo or after they click uninstall within your product and you delete the access token using this endpoint.applicationapplication_id
{
  "topic": "integrations.applications.disconnected.v3",
  "name": "Application disconnected",
  "store": "STORE_APP_KEY",
  "product_lines": "[Reviews]"
}

📘

More events coming soon!

Additional events for Yotpo's products will soon be added.