Whatsapp Media
Reach users globally on the world's most popular messaging platform to send messages in any format as you need. This Whatsapp Media messsage can only be sent to the users after they initiated the chat.
Image
The request contains form data with target phone number, image and the caption.
Request
Curl Example
curl --location --request POST 'https://api.motict.com/v1/wa/message' \
--header 'Authorization: api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"from": "+628123456789",
"to": "+628123456781",
"recipient_type": "individual",
"type": "image",
"image": {
"link": "https://link.to.image.com/image.jpg",
"caption": "Hi John Doe, How was your day?"
}
}'
Parameters
Name | Type | Required | Description |
---|---|---|---|
api_key | String | Yes | API key credential will be provided by Motict team. |
from | String | Yes |
Your Whatsapp business phone number. Phone numbers are in E.164 format (e.g., +6285123456790) |
to | String | Yes |
Target phone number. Phone numbers are in E.164 format (e.g., +6285123456790) |
recipient_type | String | No | Default: individual |
type | String | Yes | Type of message |
image.link | String | Yes | Image URL (https). |
image.caption | String | No | Caption text should be send to the user. |
Response
The response contains JSON body with message status whether the request is success or error. And also the message id that has been sent to the user.
Body
{
"message": "success",
"data": {
"id": "80ea2c2a-b3dc-439c-bf1a-496bb927e7a3"
}
}
Parameters
Name | Type | Description |
---|---|---|
id | String | Whatsaap Message ID will be used as call identifier for each request |
message | String | Success or error message. For error response, check Error section for mor details |
Video
The request contains form data with target phone number and video.
Request
Curl Example
curl --location --request POST 'https://api.motict.com/v1/wa/message' \
--header 'Authorization: api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"from": "+628123456789",
"to": "+628123456781",
"recipient_type": "individual",
"type": "video",
"video": {
"link": "https://link.to.video.com/video.mp4"
}
}'
Parameters
Name | Type | Required | Description |
---|---|---|---|
api_key | String | Yes | API key credential will be provided by Motict team. |
from | String | Yes |
Your Whatsapp business phone number. Phone numbers are in E.164 format (e.g., +6285123456790) |
to | String | Yes |
Target phone number. Phone numbers are in E.164 format (e.g., +6285123456790) |
recipient_type | String | No | Default: individual |
type | String | Yes | Type of message |
video.link | String | Yes | Video URL (https). |
Response
The response contains JSON body with message status whether the request is success or error. And also the message id that has been sent to the user.
Body
{
"message": "success",
"data": {
"id": "80ea2c2a-b3dc-439c-bf1a-496bb927e7a3"
}
}
Parameters
Name | Type | Description |
---|---|---|
id | String | Whatsaap Message ID will be used as call identifier for each request |
message | String | Success or error message. For error response, check Error section for mor details |
Audio
The request contains form data with target phone number and audio.
Request
Curl Example
curl --location --request POST 'https://api.motict.com/v1/wa/message' \
--header 'Authorization: api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"from": "+628123456789",
"to": "+628123456781",
"recipient_type": "individual",
"type": "audio",
"audio": {
"link": "https://link.to.audio.com/audio.mp3"
}
}'
Parameters
Name | Type | Required | Description |
---|---|---|---|
api_key | String | Yes | API key credential will be provided by Motict team. |
from | String | Yes |
Your Whatsapp business phone number. Phone numbers are in E.164 format (e.g., +6285123456790) |
to | String | Yes |
Target phone number. Phone numbers are in E.164 format (e.g., +6285123456790) |
recipient_type | String | No | Default: individual |
type | String | Yes | Type of message |
audio.link | String | Yes | Audio URL (https). |
Response
The response contains JSON body with message status whether the request is success or error. And also the message id that has been sent to the user.
Body
{
"message": "success",
"data": {
"id": "80ea2c2a-b3dc-439c-bf1a-496bb927e7a3"
}
}
Parameters
Name | Type | Description |
---|---|---|
id | String | Whatsaap Message ID will be used as call identifier for each request |
message | String | Success or error message. For error response, check Error section for mor details |
Document
The request contains form data with target phone number and document.
Request
Curl Example
curl --location --request POST 'https://api.motict.com/v1/wa/message' \
--header 'Authorization: api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"from": "+628123456789",
"to": "+628123456781",
"recipient_type": "individual",
"type": "document",
"document": {
"link": "https://link.to.document.com/document.pdf"
}
}'
Parameters
Name | Type | Required | Description |
---|---|---|---|
api_key | String | Yes | API key credential will be provided by Motict team. |
from | String | Yes |
Your Whatsapp business phone number. Phone numbers are in E.164 format (e.g., +6285123456790) |
to | String | Yes |
Target phone number. Phone numbers are in E.164 format (e.g., +6285123456790) |
recipient_type | String | No | Default: individual |
type | String | Yes | Type of message |
document.link | String | Yes | Document URL (https). |
Response
The response contains JSON body with message status whether the request is success or error. And also the message id that has been sent to the user.
Body
{
"message": "success",
"data": {
"id": "80ea2c2a-b3dc-439c-bf1a-496bb927e7a3"
}
}
Parameters
Name | Type | Description |
---|---|---|
id | String | Whatsaap Message ID will be used as call identifier for each request |
message | String | Success or error message. For error response, check Error section for mor details |