Picky Assist Help Desk
Main WebsiteBlogFacebook Community
Picky Assist Help Desk
Picky Assist Help Desk
  • Welcome To Picky Assist 🙏
  • Setting Up Guide
    • Sending First Message
    • Connecting Channels
      • WhatsApp Web Automation to Official API Migration Guide 2024
      • Connecting WhatsApp Web Automation
      • Connecting Facebook Messenger
        • Introduction
        • Getting Start
        • Guidelines & Compliances
        • Messenger Link
      • Connecting WhatsApp Official
        • Introduction
        • Dashboard
        • Profile
        • Templates
      • Connecting WhatsApp Cloud API
      • WhatsApp Official Managed Service
      • Connecting Instagram
      • Phone Bridge (Call Blaze)
      • Connecting SMTP
      • Connecting Amazon SES
      • Connecting Sendgrid
      • Connecting Additional WhatsApp Numbers
      • Porting WhatsApp Number to Picky Assist
      • WhatsApp Official Message Delivery Issues & Solutions
    • Working With Prebuilt CRM Modules
      • Introduction
      • Onboarding
      • Modules
        • Leads
        • Deals
        • Meetings
        • Company
        • Support Cases
        • System Modules
          • Contacts
          • Notes
          • Task
          • Call Logs
          • Tags
          • Activity Logs
      • Automations
        • Workflows
        • Chatbots
        • Funnels
        • Connectors
        • Scheduler
        • Other Prebuilt Features
      • Reports and Dashboard
      • Mandatory Preconditions for Using Prebuilt
      • Testing Prebuilt
    • Managing Organization
    • Setting Up Teambox
      • Introduction
      • Routing Rules
      • Teambox
      • Inbox View
      • Organization Hierarchy
      • Analytics
    • Setting Up Smart Replies
      • Introduction
      • Train Module
        • Training Bot Introduction
        • Topics / Categories
        • Intent & Context
        • Question Variations
        • Uploading Bulk Questions
        • Reply with Media Files
        • Personalising Replies
        • Smart Actions
        • Direct URL
        • Fall Back Response
        • Small Talks
        • Testing the Bot
        • Publishing Bot
      • ChatGPT Integration
      • Learn Module
      • Stats Module
      • Deep Linking
      • Settings
    • Smart Reply V2
      • Introduction
      • ChatGPT Integration
      • Train Module
        • Training Bot Introduction
        • Topics / Categories
        • Intent & Context
        • Question Variation
        • Uploading Bulk Questions
        • Reply with Media Files
        • Personalizing Replies
        • Smart Actions
        • Direct URL
        • Fall Back Response
        • Small Talks
        • Publishing Bot
      • Learn Module
      • Stats Module
      • Deep Linking
      • Settings
    • Setting Up Broadcaster
      • Introduction
      • Creating a Campagin
      • Sending Message to WhatsApp Groups
      • Reports
      • Broadcaster V2
        • Introduction
        • Creating Campaign
        • Reports
    • Setting Up Sequence
      • Introduction
      • Creating New Sequence
      • Sequence Stats
      • Subscribe & Unsubscribe
      • Disabling Sequence Message
    • Setting Up Reminder
    • Setting Up Mobile App
    • Setting Up Connector
      • Introduction
      • Getting Started
      • Steps
        • Introduction
        • Filters
        • Delay
        • Iterator
        • Stats
      • Actions
      • Formatter
        • Date & Time
        • Counter
        • Math Calculation
        • Data Parser
        • Convert File
        • Line Items
      • Building Mini App
      • Email Parser
      • Data Storage
      • Simulate Test
      • Connector Logs
    • Email Builder
    • Setting Up Flow Builder
      • Fundamentals (Must Read)
      • Basic Terminology (Must Read)
      • Guide to Building an Effective Chatbot (Must Read)
      • Create, Manage, Test & Publish Flows
      • Triggering a Chatbot Flow
      • Steps
        • Introduction (Must Read)
        • Send Message
        • Ask A Question
        • Filter
        • Save Data
        • Actions
        • Check WhatsApp Session
        • Delay
        • Smart Delay
        • Formatter
        • Splitter
        • Data Lookup
        • Trigger HTTP API
        • Webhook
        • Apps
        • Match Keywords
        • Route to Chatbot
        • End
      • Saving Data into CRM
      • Analytics
      • Integrations
      • Flow Builder logs and conversational logs
      • Chatbot Best Practices, Ideas & FAQ
    • Setting up Modular CRM
      • Fundamentals (Must Read)
      • Guide to Building and Implementing a Modular CRM (Must Read)
      • Create & Manage Data Modules
      • CRM Macro Buttons
      • Adding Records into CRM
      • Data View & Manage Records
      • Task
      • Workflows
      • Funnels
      • Data Import
      • Integrations
    • Setting Up Scheduler
    • Media Gallery
    • Quick Replies
    • Opt-out Settings
    • Blacklist
    • Global Variables
    • Setting Up Ad-On's
      • Setting Up WhatsMail
      • Setting Up Zendesk
      • Setting Up Zapier
      • Setting Up Zoho CRM
        • Getting Started
        • Working with Extension
        • Integrating with Zoho Workflow
        • Lead Assignment Rules
        • Integrating into Custom Modules
        • Connecting Multiple WhatsApp Numbers into Zoho CRM
        • Integrating WhatsApp with Zoho CRM Mobile App
        • Keyboard Shortcuts
      • Setting Up Facebook Lead Adform
      • Facebook Lead Ad form V2
      • Setting Up WhatsApp Web
      • Setting Up Pabbly Connect
      • Setting Up ChatGPT App
    • Google Chrome Extensions
      • Extension for Sending WhatsApp Messages from any Webpage
      • Chrome Extension V2
      • Extension for Zoho CRM & Teambox
    • Managing Profile
      • Two Factor Aunthentication
      • Login History
      • Delete Account
    • Quick Rollout Guide
      • WhatsApp Official Account
    • Developers & Partners Guide for Deep Integration of Picky Assist
  • API Documentation V2
    • Introduction
    • Quick Start Guide 🏃
    • Global Webhook
      • How Webhook Works
      • Webhook Variables
      • Configuring Webhook URL
      • Webhook Request & Response
      • Getting the Conversation Context
      • Testing Your Webhook
    • Event Webhook
      • How Event Webhook Works
      • Event Webhook Variables
      • Configuring Event Webhook URL
      • Event Webhook Sample Request & Response
    • Push API
      • Introduction
      • API Variables
      • Sending Single Message - Push
      • Sending Dynamic Messages – Push
      • Sending Media Attachments – Push
      • Sending Interactive List & Buttons
      • Sending Stickers
      • Sending Bulk Messages - Push
      • Sending Contacts
      • Sending Location
      • Sending WhatsApp Template Messages
        • Introduction
        • Sending WhatsApp Template Text Messages
        • Sending WhatsApp Template Image
        • Sending WhatsApp Template Document
        • Sending WhatsApp Interactive Buttons
        • Sending WhatsApp Limited Time Offer Templates
      • Sending Message to Groups
      • Sending SMS Using SIM Card
      • Sending Message to Facebook Messenger
      • Normal Post Method
      • Delivery Reports
      • Push API Must Read Instructions
      • Testing API Requests
    • WhatsApp Template API
      • Introduction
      • API Variables
      • Template Request API
      • Template Status API
      • Languages
      • Guidelines
    • WhatsApp Group API
      • Introduction
      • API Variables
      • Create Group
      • Set Group Permission
      • Add Group Admin
      • Add Group Members
      • Fetch Group Details
      • Update Group Info
      • Remove Group Members / Admin
      • Generate New Invite Link
      • Group Delete Actions
    • WhatsApp Settings API's
      • WhatsApp Profile API
      • 2 Step Verification
      • WhatsApp Status Update
      • WhatsApp Contact & Group Fetching
    • Device Manage API’s
      • Fetching Device Status API
      • Device Commands API’s
      • WhatsApp Automation Server Status API
    • Account API
      • Fetch Balance
    • Project Management API
      • Introduction
      • Create Project
      • Get Project Details
      • Set / Update Webhook
      • Create API Token
      • Manage API Token
      • Change Billing Plan
      • Fetch Account Balance
      • Country Code & Timezones
    • References
      • Status & Error Codes
      • Most Frequent Issues & Solutions
      • Formating & Sending Emojis 😊
      • Postman Collection for Picky Assist API's
      • High Volume Messaging Bots - WhatsApp
    • Sample Codes
      • PHP
      • Python
      • Node JS
      • Ruby
      • Java
      • ASP.NET Using C#
      • Javascript
      • Go
      • Swift
      • C
      • C#
      • Objective C
  • General Guidelines
    • Billing
    • Adding Money Into Account
    • Rate Limits
    • Character Limits WhatsApp
    • Best Practices for Media Handling
    • Roadmap
    • Features In the Early Beta Version
  • Changelog
    • 2021
      • February 2021
      • March 2021
      • April 2021
      • May 2021
      • June 2021
    • 2020
      • February 2020
      • March 2020
      • April 2020
      • May 2020
      • June 2020
      • September 2020
      • October 2020
    • 2019
      • November 2019
      • October 2019
      • August 2019
      • September 2019
Powered by GitBook
On this page
  • Webhook Trigger Methods
  • JSON Method
  • Query String Method (deprecated)

Was this helpful?

  1. API Documentation V2
  2. Global Webhook

Webhook Request & Response

Get Started with Sample Request & Response

PreviousConfiguring Webhook URLNextGetting the Conversation Context

Last updated 2 years ago

Was this helpful?

Webhook Trigger Methods

JSON Method

In this method you will get data as JSON , you need to specify to push the data in JSON method while setting up Webhook URL

POST https://yourdomain.com/webhook

The “message-in” variable data is URL encoded so you need to decode the same.

Receiving Message with Text & Media

{
	"number": "963587413",
	"message-in": "test",
	"type": "2",
	"application": "1",
	"unique-id": "5642",
	"project-id": "27",
	"media-url": "https://upload.wikimedia.org/wikipedia/commons/5/57/PT05_ubt.jpeg",
	"custom-variable": "test"
}

Receiving Message with Multiple Contacts

Not Support in Phone Automation

{ 
   "number":"963587413",
   "type":"7",
   "application":"8",
   "unique-id":"5642",
   "project-id":"27",
   "contact":[ 
      { 
         "city":null,
         "country":"USA",
         "country_code":"in",
         "state":"Kerala",
         "street":null,
         "address_type":"Home",
         "zip":null,
         "email":"test@gmail.com",
         "first_name":"Test",
         "last_name":"User",
         "phone":"+91 99s999 00111",
         "phone_type":"Mobile",
         "contact_image":""
      },
      { 
         "city":null,
         "country":"India",
         "country_code":"in",
         "state":"Kerala",
         "street":null,
         "address_type":"Home",
         "zip":null,
         "email":"contact@gmail.com",
         "first_name":"User",
         "last_name":"Test",
         "phone":"+91 9888d8 00222",
         "phone_type":"Mobile",
         "contact_image":""
      }
   ]
}

Receiving Message with Location

Not Supported in Phone Automation

{ 
   "number":"96343587413",
   "type":"7",
   "application":"8",
   "unique-id":"5642",
   "project-id":"27",
   "Location":{ 
      "lat":81.5094267351303,
      "long":6.969892978668,
      "name":"Tourism Maldives",
      "address":"Tourism Maldives Magazine, USA",
      "url":"http://pickyassist.com/"
   }
}

Receiving Quoted Reply Messages In WhatsApp Interactive Buttons

Not Supported in Phone Automation

{
  "number": "91940055074",
  "message-in": "Not+Sure",
  "message_in_raw": "Not Sure",
  "type": 9,
  "application": "8",
  "unique-id": "52363299",
  "project-id": "10129",
  "direction": 0,
  "name": "Picky",
  "context-msg-id": "30486936",
  "payload": "confirmbutton"
}

Receiving List Message & Button Clicks

Supported only in WhatsApp Official

{
   "number":"93436707768",
   "message-in":"choice1",
   "message_in_raw":"choice1",
   "type":1,
   "application":8,
   "unique-id":"70946012",
   "project-id":"14192",
   "direction":0,
   "context-msg-id":"41668446",
   "interactive":{
      "type":1,
      "id":"ref1",
      "description":"choice description1"
   }
}

Receiving Message With Referral Details

Supported only in WhatsApp Official, you will receive referral details in "referral" array when a user clicks the "WhatsApp"" call to action buttons and sends a messages, this helps you to identify the source of the referral and measure the effectiveness of the engagement ratio

{
  "number": "919446XXXXXX",
  "message-in": "test",
  "message_in_raw": "test",
  "type": 1,
  "application": 8,
  "unique-id": "70946012",
  "project-id": "14192",
  "direction": 0,
  "referral": {
    "headline":”Our new product”,
    "body": "Test message",
    "source_type": "ad",
    "source_id":”3432324XXXXXXXX”,
    "source_url": "http://pickyassist.com",
    "image": "https://fb/image"
  }
}

JSON Sample Response for Text Messages

If you wish to give instant reply back then give response in JSON format

{
	"message-out": "Test Instant Reply Back",
	"delay": "0",
	"type": "1",
	"reference_number": "Your Internal Reference Number",
}

JSON Sample Response With Media Files

For phone automation sending media file takes longer time and make use of Auto Click method, so please make use of the media sending feature only if needed

{
	"message-out": "Test Instant Reply Back",
	"delay": "0",
	"media-url": "https://upload.wikimedia.org/wikipedia/commons/5/57/PT05_ubt.jpeg",
	"application": "0",
	"type": "2"
}

JSON Sample Response With Multiple Contacts

Not supported in phone automation, multiple contacts must pass as an array.

{ 
   "type":"7",
   "application":"8",
   "contact":[ 
      { 
         "city":null,
         "country":"USA",
         "country_code":"us",
         "state":"Deleware",
         "street":null,
         "address_type":"Home",
         "zip":null,
         "email":"test@gmail.com",
         "first_name":"Test",
         "last_name":"User",
         "phone":"+1 129999 00111",
         "phone_type":"Mobile",
         "contact_image":""
      },
      { 
         "city":null,
         "country":"India",
         "country_code":"in",
         "state":"Kerala",
         "street":null,
         "address_type":"Home",
         "zip":null,
         "email":"contact@gmail.com",
         "first_name":"User",
         "last_name":"Test",
         "phone":"+91 98888 00222",
         "phone_type":"Mobile",
         "contact_image":""
      }
   ]
}

JSON Sample Response With Location

Not supported in phone automation, locations values need to pass in array

{ 
   "type":"5",
   "application":"8",
   "location":{ 
      "lat":18.5094267351303,
      "long":76.969892978668,
      "name":"Tourism Maldives",
      "address":"Tourism Maldives Magazine, Delaware"
   }
}

The response must be in JSON format else reply will not sent to the user and no need to url encode the message-out variable.

Query String Method (deprecated)

In this method data will be posted as query parameter through URL as shown below, this is the default method

Query String method is deprecated on 30 March 2020 and no new updates will be pushed to this method.

POST -> https://yourdomain.com/webhook?number=963587413&message-in=test&type=1&application=1&unique-id=5672&project-id=27&media-url="https://upload.wikimedia.org/wikipedia/commons/5/57/PT05_ubt.jpeg&custom-variable=test

JSON Sample Response for Text Messages

If you wish to give instant reply back then give response in JSON format

{
  "message-out": "Test Instant Reply Back;",
  "delay": "0"
}

JSON Sample Response With Media Files

This will use broadcast api and takes 10 seconds to send a message

{
	"message-out": "Test Instant Reply Back;",
	"delay": 0,
	"media-url": " https://upload.wikimedia.org/wikipedia/commons/5/57/PT05_ubt.jpeg ",
	"application": "0"
}

The response must be in JSON format else reply will not sent to the user and no need to url encode the message-out variable.

The “message-in” variable data is URL encoded so you need to decode the same.

Online Tools
Online Tools
JSON Method
Query String Method