Flock Connect Contact API


APIs to create campaigns with individual WhatsApp users. Each API is used to create a campaing for different message types (Image, text, video, URL and documents).

Overview

Parameters 'token','message','title' and 'number_details' are mandatory parameters.

- token: Unique access token provided to the user at sign-up.
- message: Raw text intended to send.
- title: Title of the Flock Connect campaign.
- number_details: List of numbers with the user’s name to send the campaign to.

Optional parameters

- file: image/video/any file type to be sent.
- metadata content: image and title with URLs.

Response Status Code

- 200: Success
- 400: Failure. (Missing parameters/wrong file formats)
POST Image
https://aiyolabs.com/api/create-campaign/contact/image

An API to send images to users in a particular campaign.

BODY

{
	"token": "5bebaee99cf858690b41dc74",
	"message": "Sample text message.",
	"title": "Sample Campaign Title"
“number_details”:
[{"name":"Arjun","phone":"919534785974"},
 {"name":"Nishant","phone":"918892043629"}],
"image": "ImageFile.jpg"
}
POST Text Message
https://aiyolabs.com/api/create-campaign/contact/text

An API to send text message to users in a particular campaign.

BODY

{
	"token": "5bebaee99cf858690b41dc74",
	"message": "Sample text message.",
	"title": "Sample Campaign Title"
“number_details”:
[{"name":"Arjun","phone":"919534785974"},
 	{"name":"Nishant","phone":"918892043629"}]
}
POST Video
https://aiyolabs.com/api/create-campaign/contact/video

An API to send videos to users in a particular campaign

BODY

{
	"token": "5bebaee99cf858690b41dc74",
	"message": "Sample text message.",
	"title": "Sample Campaign Title"
“number_details”:
[{"name":"Arjun","phone":"919534785974"},
 	{"name":"Nishant","phone":"918892043629"}],
"video": "VideoFile.mp4"
}
POST Document
https://aiyolabs.com/api/create-campaign/contact/file

An API to send files to users in a particular campaign.

BODY

{
	"token": "5bebaee99cf858690b41dc74",
	"message": "Sample Text Message",
	"title": "Sample Campaign Title"
“number_details”:
[{"name":"Arjun","phone":"919534785974"},
 	{"name":"Nishant","phone":"918892043629"}],
"file": "File.pdf"
}
Example Request
Default

Example Response
200
{
  "success": 1
}


Example Request
Default
curl --request POST \
  --url https://aiyolabs.com/api/create-campaign/contact/text \
  --data '{
	"token": "5bebaee99cf858690b41dc74",
	"message": "Sample text message.",
	"title": "Sample Campaign Title"
“number_details”:
[{"name":"Arjun","phone":"919534785974"},
 	{"name":"Nishant","phone":"918892043629"}]
}
'

Example Response
200
{
  "success": 1
}


Example Request
Default
curl --request POST \
  --url https://aiyolabs.com/api/create-campaign/contact/link \
  --data '{
	"token": "5bebaee99cf858690b41dc74",
	"message": "Sample text message.",
	"title": "Sample Campaign Title"
“number_details”:
[{"name":"Arjun","phone":"919534785974"},
 	{"name":"Nishant","phone":"918892043629"}],
"image": "ImageFile.jpg"
            "link": "www.someurllink.com"
"link_title": "Sample Website"

}
'

Example Response
200
{
  "success": 1
}


Example Request
Default

Example Response
200
{
  "success": 1
}


Example Request
Default
curl --request POST \
  --url https://aiyolabs.com/api/create-campaign/contact/file \
  --data '{
	"token": "5bebaee99cf858690b41dc74",
	"message": "Sample Text Message",
	"title": "Sample Campaign Title"
“number_details”:
[{"name":"Arjun","phone":"919534785974"},
 	{"name":"Nishant","phone":"918892043629"}],
"file": "File.pdf"
}
'

Example Response
200
{
  "success": 1
}