Webhook Integration Samples

Deprecated doc version

Please follow the link to find the up-to-date one.

Mixpanel

Use case

Send events data from Journey to Mixpanel

Prerequisites

Webhook for ingestion API (https://developer.mixpanel.com/reference/events):

URL example

https://api.mixpanel.com/import?strict=1&project_id=XXXXXXX

Headers

Authorization: Basic UHVzaHdvb3NVTTWlrcjROZUE=
Content-Type: application/json

Data example

[
  {
    "event": "PW_ApplicationOpen",
    "properties": {
        "time": "{{point:48ae746b-0f54-47db-b96c-1f082e110ff4;event:PW_ApplicationOpen;attribute:datetime}}",
        "distinct_id": "{{device:hwid}}",
        "$insert_id": "48ae746b-0f54-47db-b96c-1f082e110ff4",
        "device_type": "{{point:48ae746b-0f54-47db-b96c-1f082e110ff4;event:PW_ApplicationOpen;attribute:device_type}}",
        "application_version": "{{point:48ae746b-0f54-47db-b96c-1f082e110ff4;event:PW_ApplicationOpen;attribute:application_version}}",
        "timezone": "{{tag:Timezone}}",
        "name": "{{tag:Name}}"
    }
  }
]

Amplitude

Use case

Send events data from Journey to Amplitude

Prerequisites

  • Amplitude Account

Webhook for Ingestion API (https://developers.amplitude.com/docs/http-api-v2#request-format):

URL

https://api.amplitude.com/2/httpapi

Headers

Accept: */*
Content-Type: application/json

Data example

{
  "api_key": "c506ffde6db9xxxxxxa50120e22ec5",
  "events": [
    {
      "user_id": "{{device:user_id}}",
      "device_id": "{{device:hwid}}",
      "event_type": "PW_ApplicationOpen",
      "user_properties": {"timezone": "{{tag:Timezone}}", "sdk_version": "{{tag:SDK Version}}"},
      "country": "{{tag:Country}}"
    }
  ]
}

Slack

Use case

Trigger Slack messages from Journey

Prerequisites

  • Slack Account

URL example

https://pushwoosh.slack.com/apps/XXXXXXXX-incoming-webhooks

Headers

Content-Type: application/json

Data example

{
  "text": "Hi there :smile:",
  "username": "John Doe"
}

Zapier

Use case

Send data to Zapier which can further be used in Zapier automation across 4000+ apps.

Prerequisites

  • Zapier Account

URL example

https://hooks.zapier.com/hooks/catch/XXXXXXX/xxxxxxx

Headers

Content-Type: application/json

Data example

{
  "hwid": "{{device:hwid}}",
  "sdk": "{{tag:SDK Version}}"
}

You can test webhooks with Zapier easily

Twillio (SMS)

Use Case

Send SMS from Journey

Prerequisites

  • Twillio Account (access to TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN)

  • Phone number purchased

URL example

https://api.twilio.com/2010-04-01/Accounts/\$TWILIO_ACCOUNT_SID/Messages.json

Headers

Content-Type: application/x-www-form-urlencoded
Authorization: Basic.... // Encode TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN with https://www.blitter.se/utils/basic-authentication-header-generator/ to get Authenticate value

Data example

From=%2B18646511557&To=%2B15852826356&Body=...

Last updated