Wautopilot API

1. After logging in go to https://wautopilot.com/panel/home/api-webhook

2. Generate an API key for your WhatsApp Business API.

API

3. Enter your name and select WhatsApp number..

API

4. This token will be used for authentication.

API

*You will not be able to view this token after the dialog is closed and thus it must be regenerated.

Send Message

Text Message

Sends a service text message

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Authorization: Bearer <YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{ "message":{ "type":"text", "text":"Hello There" }, "recipient":"91XXXXXXXXXX" }'

Arguments:

type: string (required)

text: string (required)

Message you want to send.

recipient: string (required)

Recipient number with country code (without ‘+‘).

Request body example

{ "message":{ "type":"text", "text":"Hello There" }, "recipient":"91XXXXXXXXXX" }

Media Message

Sends a media (image, video, audio, document).

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Authorization: Bearer <YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{ "message":{ "type":"image", "media_id":"729961535887623" }, "recipient":"91XXXXXXXXXX" }'

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Content-Type: application/json' --header 'Authorization: Bearer <YOUR_API_KEY>' --data '{ "message":{ "type": "image", "media_link": "https://________" }, "recipient" : "91XXXXXXXXXX" }''

Arguments

type: string (required)

media_id: string (required)

Media id of the media you want to send.

OR

media_link: string (required)

URL of media. (any downloadable URL)

recipient: string (required)

Recipient number with country code (without ‘+‘).

Request body example (with media id)

{ "message":{ "type":"image", //(image, video, document, audio) "media_id":"729961535887623" }, "recipient":"91XXXXXXXXXX" }

Request body example (with url)

{ "message":{ "type":"image", //(image, video, document, audio) "media_link":"https://media.istockphoto.com/id/1500285927/photo/young-woman-a-university-student-studying-online.jpg?s=2048x2048&w=is&k=20&c=95BgS0lojrWD3QEmbec0nJv2DOHvUO4G6QoXF80S_9Y=" }, "recipient":"91XXXXXXXXXX" }

Location Message

Sends a location message

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Authorization: Bearer <YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{ "message": { "type": "location", "location": { "name": "Central Park", "latitude": "40.785091", "longitude": "-73.968285", "address": "New York, NY 10024, USA" } }, "recipient": "91XXXXXXXXXX" }'

Arguments

type: string (required)

name: string (required)

Name of the place.

latitude: string (required)

Latitude of the place.

longitude: string (required)

Longitude of the place.

address: string (required)

Full address of the place.

recipient: string (required)

Recipient number with country code (without ‘+‘).

Request body example

{ "message": { "type": "location", "location": { "name": "Central Park", "latitude": "40.785091", "longitude": "-73.968285", "address": "New York, NY 10024, USA" } }, "recipient": "91XXXXXXXXXX" }

VCard Message

Sends a contact VCard

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Authorization: Bearer <YOUR_API_KEY>' --header 'Content-Type: application/json' --data-raw '{ "message": { "type": "contacts", "contacts": [{ "name": {"formatted_name": "Dr. John A. Doe Jr.","first_name": "John","last_name": "Doe","middle_name": "Alexander","suffix": "Jr.","prefix": "Dr."},"addresses": [{"street": "1234 Elm Street","city": "Springfield","state": "IL","zip": "62704","country": "USA","country_code": "US","type": "HOME"},{"street": "5678 Oak Avenue","city": "Chicago","state": "IL","zip": "60605","country": "USA","country_code": "US","type": "WORK"}],"birthday": "1985-05-15","emails": [{"email": "john.doe@workemail.com","type": "WORK"},{"email": "john.doe@homeemail.com","type": "HOME"}],"org": {"company": "Doe Industries","department": "Engineering","title": "Senior Engineer"},"phones": [{"phone": "+11234567890","wa_id": "1234567890","type": "WORK"},{"phone": "+10987654321","wa_id": "0987654321","type": "HOME"}],"urls": [{"url": "http://www.doeindustries.com","type": "WORK"},{"url": "http://www.johndoeblog.com","type": "HOME"}]}]}, "recipient": "91XXXXXXXXXX" }'

Arguments

type: string (required)

formatted_name: string (required)

first_name: string (required)

last_name: string (optional)

middle_name: string (optional)

suffix: string (optional)

prefix: string (optional)

addresses: array (optional)

street: string (optional)

city: string (optional)

state: string (optional)

zip: string (optional)

country: string (optional)

country_code: string (optional)

type: string (optional)

birthday: string (optional)

emails: array (optional)

email: string (optional)

type: string (optional)

org: object (optional)

company: string (optional)

department: string (optional)

title: string (optional)

phones: array (optional)

phone: string (optional)

wa_id: string (optional)

type: string (optional)

urls: array (optional)

url: string (optional)

type: string (optional)

recipient: string (required)

Recipient number with country code (without ‘+‘).

Request body example

{ "message": { "type": "contacts", "contacts": [ { "name": { "formatted_name": "Dr. John A. Doe Jr.", "first_name": "John", "last_name": "Doe", "middle_name": "Alexander", "suffix": "Jr.", "prefix": "Dr." }, "addresses": [ { "street": "1234 Elm Street", "city": "Springfield", "state": "IL", "zip": "62704", "country": "USA", "country_code": "US", "type": "HOME" }, { "street": "5678 Oak Avenue", "city": "Chicago", "state": "IL", "zip": "60605", "country": "USA", "country_code": "US", "type": "WORK" } ], "birthday": "1985-05-15", "emails": [ { "email": "john.doe@workemail.com", "type": "WORK" }, { "email": "john.doe@homeemail.com", "type": "HOME" } ], "org": { "company": "Doe Industries", "department": "Engineering", "title": "Senior Engineer" }, "phones": [ { "phone": "+11234567890", "wa_id": "1234567890", "type": "WORK" }, { "phone": "+10987654321", "wa_id": "0987654321", "type": "HOME" } ], "urls": [ { "url": "http://www.doeindustries.com", "type": "WORK" }, { "url": "http://www.johndoeblog.com", "type": "HOME" } ] } ] }, "recipient": "91XXXXXXXXXX" }

Button Message

Sends message with buttons

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Authorization: Bearer <YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{ "message": { "type": "button", "text": "Choose an option:", "buttons": [{"id": "optionone", "text": "Option 1"},{"id": "optiontwo", "text": "Option 2"},{"id": "optionthree", "text": "Option 3"} }, "recipient": "91XXXXXXXXXX" }'

Arguments

type: string (required)

buttons: array (required)

id: string (required) (should be lower case alphanumeric)

text: string (required)

text: string (required)

recipient: string (required)

Recipient number with country code (without ‘+‘).

Request body example

{ "message": { "type": "button", "text": "Choose an option:", "buttons": [ { "id": "optionone", // id must be lowercase alphanumeric "text": "Option 1" }, { "id": "optiontwo", // id must be lowercase alphanumeric "text": "Option 2" }, { "id": "optionthree", // id must be lowercase alphanumeric "text": "Option 3" } ] }, "recipient": "91XXXXXXXXXX" }

List Message

Sends list message.

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Authorization: Bearer <YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{ "message": { "type": "list", "header": "Available Services", "body": "Please choose a service from the list below.", "footer": "Swipe up for more options.", "button_text": "Select Service", "sections": [ {"title": "Financial Services","buttons": [{"id": "serviceone", "text": "Wealth Management"},{"id": "servicetwo", "text": "Tax Planning"}]},{"title": "Technical Support","buttons": [{"id": "servicethree", "text": "Software Installation"},{"id": "servicefour", "text": "Network Setup"}]},{"title": "Customer Care","buttons": [{"id": "servicefive", "text": "Account Issues"},{"id": "servicesix", "text": "Billing Inquiries"}]} ] }, "recipient": "91XXXXXXXXXX" }'

Arguments

type: string (required)

header: string (optional)

body: string (required)

footer: string (optional)

button_text: string (required)

sections: array (required)

title: string (required)

buttons: array (required)

id: string (required)

text: string (required)

recipient: string (required)

Recipient number with country code (without ‘+‘).

Request body example

{ "message": { "type": "list", "header": "Available Services", "body": "Please choose a service from the list below.", "footer": "Swipe up for more options.", "button_text": "Select Service", "sections": [ { "title": "Financial Services", "buttons": [ { "id": "serviceone", // Button ID must be lowercase alphabets only. "text": "Wealth Management" }, { "id": "servicetwo", // Button ID must be lowercase alphabets only. "text": "Tax Planning" } ] }, { "title": "Technical Support", "buttons": [ { "id": "servicethree", // Button ID must be lowercase alphabets only. "text": "Software Installation" }, { "id": "servicefour", // Button ID must be lowercase alphabets only. "text": "Network Setup" } ] }, { "title": "Customer Care", "buttons": [ { "id": "servicefive", // Button ID must be lowercase alphabets only. "text": "Account Issues" }, { "id": "servicesix", // Button ID must be lowercase alphabets only. "text": "Billing Inquiries" } ] } ] }, "recipient": "91XXXXXXXXXX" }

Whatsapp Flow Message

Sends flow Message

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Authorization: Bearer <YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{ "message": { "type": "whatsapp_flow", "header": "Welcome to Our Service", "body": "We are here to assist you. Please start the flow below to continue.", "footer": "Thank you for choosing us.", "flow_id": "1140273103940962", "button_text": "Start Now" }, "recipient": "91XXXXXXXXXX" }'

Arguments

type: string (required)

header: string (optional)

body: string (required)

footer: string (optional)

flow_id: string (required)

Flow id of the flow you want to send.

button_text: string (required)

recipient: string (required)

Recipient number with country code (without ‘+‘).

Request body example

{ "message": { "type": "whatsapp_flow", "header": "Welcome to Our Service", // optional "body": "We are here to assist you. Please start the flow below to continue.", "footer": "Thank you for choosing us.", //optional "flow_id": "1140273103940962", "button_text": "Start Now" }, "recipient": "91XXXXXXXXXX" }

Template Message (with custom message)

Sends a template Message

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Authorization: Bearer <YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{ "message": { "type": "template", "template_id": "703008418565758", "template_name": "bni_first_message", "template_header": {"type": "IMAGE","media_id": "881697986671853"}, "template_body": [ { "custom_text": "User", "phonebook_data": "", "variable_from": "custom_text", "fallback_value": "" }, { "custom_text": "2", "phonebook_data": "", "variable_from": "custom_text", "fallback_value": "" } ] }, "recipient": "91XXXXXXXXXX" }'

Arguments

type: string (required)

template_id: string (required)

template_name: string (required)

template_header.type: string (required)

media_id: string (required when 'type' is 'IMAGE' 'VIDEO' 'AUDIO' 'DOCUMENT')

or

media_link: string (required when 'type' is 'IMAGE' 'VIDEO' 'AUDIO' 'DOCUMENT')

NOTE: Any one of media_id or media_link is required

text: string (required when 'type' is 'TEXT')

template_body: array (required)

variable_from: string(required)

Variable from which the value will be fetched.

custom_text: string (required when 'variable_from' is 'custom_text')

phonebook_data: string (required when 'variable_from' is 'phonebook_data')

fallback_data: string (required when 'variable_from' is 'phonebook_data')

recipient: string (required)

Recipient number with country code (without ‘+‘).

Request body example

{ "message": { "type": "template", "template_id": "703008418565758", "template_name": "bni_first_message", "template_header": { "type": "IMAGE", "media_id": "881697986671853" }, "template_body": [ { "custom_text": "User", "phonebook_data": "", "variable_from": "custom_text", "fallback_value": "" }, { "custom_text": "2", "phonebook_data": "", "variable_from": "custom_text", "fallback_value": "" } ] }, "recipient": "91XXXXXXXXXX" }

Template Message (with phonebook data)

Sends a template Message

Request Example

curl --location 'https://api.wautopilot.com/v1/message/send-message' --header 'Authorization: Bearer <YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{ "message": { "type": "template", "template_id": "703008418565758", "template_name": "bni_first_message", "template_header": {"type": "IMAGE","media_id": "881697986671853"}, "template_body": [ { "custom_text": "", "phonebook_data": "first_name", "variable_from": "phonebook_data", "fallback_value": "User" }, { "custom_text": "", "phonebook_data": "middle_name", "variable_from": "phonebook_data", "fallback_value": "dear" } ] }, "recipient": "91XXXXXXXXXX" }'

Arguments

type: string (required)

template_id: string (required)

template_name: string (required)

template_header.type: string (required)

media_id: string (required when 'type' is 'IMAGE' 'VIDEO' 'AUDIO' 'DOCUMENT')

or

media_link: string (required when 'type' is 'IMAGE' 'VIDEO' 'AUDIO' 'DOCUMENT')

NOTE: Any one of media_id or media_link is required

text: string (required when 'type' is 'TEXT')

template_body: array (required)

variable_from: string(required)

Variable from which the value will be fetched.

custom_text: string (required when 'variable_from' is 'custom_text')

phonebook_data: string (required when 'variable_from' is 'phonebook_data')

fallback_data: string (required when 'variable_from' is 'phonebook_data')

recipient: string (required)

Recipient number with country code (without ‘+‘).

Request body example

{ "message": { "type": "template", "template_id": "703008418565758", "template_name": "bni_first_message", "template_header": { "type": "IMAGE", "media_id": "881697986671853" }, "template_body": [ { "custom_text": "", "phonebook_data": "first_name", "variable_from": "phonebook_data", "fallback_value": "User" }, { "custom_text": "", "phonebook_data": "middle_name", "variable_from": "phonebook_data", "fallback_value": "dear" } ] }, "recipient": "91XXXXXXXXXX" }

Media

List Media

Lists of media

Request Example

curl --location 'https://api.wautopilot.com/v1/media' --header 'Authorization: Bearer <YOUR_API_KEY>' }'

Arguments:

No args required.

Request body example

{ "list": [ { "id": "1064042408267933", "filename": "DP-8049E", "file_length": 922113, "mime_type": "image/jpeg" }, ], "success": true }

Download Media

Download media by media id

Request Example

curl --location 'https://api.wautopilot.com/v1/media/<MEDIA_ID>/download' --header 'Authorization: Bearer <YOUR_API_KEY>' }'

Arguments:

<MEDIA_ID>: string (required)

Template

List templates

Lists of all template registered to meta.

Request Example

curl --location 'https://api.wautopilot.com/v1/templates' --header 'Authorization: Bearer <YOUR_API_KEY>' }'

Arguments:

No args required.

Response body example

{ "templates": [ { "id": "3837455136535795", "name": "product_catalog", "status": "APPROVED", "category": "MARKETING" }, ], "success": true }

Template Details

Details of the template.

Request Example

curl --location 'https://api.wautopilot.com/v1/templates/<TEMPLATE_ID>' --header 'Authorization: Bearer <YOUR_API_KEY>' }'

Arguments:

<TEMPLATE_ID>: string (required)

Response body example

{ "template": { "id": "<TEMPLATE_ID>", "name": "mar_bni_pincode_message", "category": "MARKETING", "allow_category_change": true, "language": "en_US", "components": [ { "type": "BODY", "text": "Good Morning {{1}} , While going through my leads a few days ago, I saw your office is in {{2}} . I visit {{2}} regularly, and would like to do 1-2-1 when I visit next time . Please share your *Google Location of your Business* .", "example": { "body_text": [ [ "Name", "Colony" ] ] } }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Let's Connect" }, { "type": "QUICK_REPLY", "text": "I will connect later" } ] } ] }, "success": true }
Please refer to the meta documentation for more details on the template.

Whatsapp Flows / Forms

List FLows

Lists all the flows registered to meta.

Request Example

curl --location 'https://api.wautopilot.com/v1/flows' --header 'Authorization: Bearer <YOUR_API_KEY>' }'

Arguments:

No args required.

Response body example

{ "flows": [ { "id": "505642542401463", "name": "Digital Marketing Expertise Survey", "status": "PUBLISHED", "categories": [ "LEAD_GENERATION" ] } ], "success": true }

Whatsapp Flow Details

Details of the flow.

Request Example

curl --location 'https://api.wautopilot.com/v1/flows/<FLOW_ID>' --header 'Authorization: Bearer <YOUR_API_KEY>' }'

Arguments:

<FLOW_ID>: string (required)

Response body example

{ "screens": [ { "id": "kindly_share_your_expertise_in_digital_marketing", "title": "Kindly share your expertise in Digital Marketing", "children": [ { "type": "CheckboxGroup", "name": "multiple_choice", "label": "Expert Area", "required": false, "data-source": [ "Social Media Marketing", "Search Engine Marketing", "SEO", "Meta Whatsapp Business API" ] }, { "type": "TextArea", "name": "textarea", "label": "Industries you cater", "required": false, "helper-text": "Kindly specify industries you specialize in generating leads for." }, { "type": "Footer", "label": "Submit", "on-click-action": { "name": "complete", "payload": { "multiple_choice": "{form.multiple_choice}", "textarea": "{form.textarea}" } } } ] } ], "success": true }
Please refer to the meta documentation for more details on the flow.
Logo

Wautopilot

WhatsApp Engagement Platform

Made with ❤️ in India

Get in touch

Stellar Coaching & Consulting

B-502, Sahara Apartment, Plot No. 11,

Sector 6 Dwarka, Dwarka,

New Delhi, Delhi 110075, India

© 2024 Wautopilot, All rights reserved.