This API allows you to request the sending of a list of WhatsApp messages containing text, audio, images, and attachments.
Attachments are used by providing a download link.
POST https://outzapapi.azurewebsites.net/api/request_messages
Token: Provide the authentication token.
Org: Provide the organization ID.
The request body is a JSON array containing message objects:
Parameter | Type | Required | Description |
---|---|---|---|
Source_Id | String | ✅ Yes | Your internal ID for the message. |
Campaign_Id | String | ❌ No | Campaign ID for internal tracking. |
Lead_Id | String | ❌ No | Lead ID for internal tracking. |
Account_Id | String | ❌ No | Account/Company/Client ID for internal tracking. |
Contact_Id | String | ❌ No | Contact person ID for internal tracking. |
Deal_Id | String | ❌ No | Business deal ID for internal tracking. |
Correspondent | String | ✅ Yes | Recipient’s phone number in the format +5511944443333 or +551144443333 . |
Message | String | ✅ Yes | Message text or attachment caption. Messages with audio attachments ignore this field. |
TimeStamp | String | ✅ Yes | Date and time in the format YYYY-MM-DDTHH:MM:SSZ . Used to order messages. |
Attachment_Url | String | ❌ No | Attachment URL. It is recommended to use Azure Blobs, AWS S3, or similar. Ensure proper CORS configuration. |
Note: A message must have at least
Source_Id
and eitherMessage
orAttachment_Url
to be considered valid.
[
{
"Source_Id": "YourInternalMsgID100001",
"Campaign_Id": "CampaignID001",
"Lead_Id": null,
"Account_Id": null,
"Contact_Id": null,
"Deal_Id": null,
"Correspondent": "+553199109555",
"Message": "Hello Fritz! Listen to the audio below.",
"TimeStamp": "2024-08-29T12:00:00Z"
},
{
"Source_Id": "YourInternalMsgID100002",
"Campaign_Id": "CampaignID001",
"Lead_Id": null,
"Account_Id": null,
"Contact_Id": null,
"Deal_Id": null,
"Correspondent": "+553199109555",
"Message": "",
"TimeStamp": "2024-08-29T12:00:01Z",
"Attachment_Url": "https://outzap.blob.core.windows.net/attachments/audio.mp3"
}
]
{
"Message": "No valid messages found",
"Success": false,
"Data": [
{
"Source_Id": "YourInternalMsgID100001",
"Campaign_Id": "CampaignID001",
"Lead_Id": null,
"Account_Id": null,
"Contact_Id": null,
"Deal_Id": null,
"Correspondent": "+553199109555",
"Message": null,
"TimeStamp": "2024-08-29T12:00:00Z",
"Status": "Error",
"Result": "Invalid message",
"Phone": "+5514920004814",
"Id": "9b1b5ac8-63cb-41ea-bd27-af16474bf9ac",
"Agent": "Outzap API",
"CallBackStatus": 1,
"Attachment_Url": null,
"Attachment_Extn": null,
"Attachment_Type": null
}
]
}
{
"Message": "Message request successfully received",
"Success": true,
"Data": [
{
"Source_Id": "YourInternalMsgID100001",
"Campaign_Id": "CampaignID001",
"Lead_Id": null,
"Account_Id": null,
"Contact_Id": null,
"Deal_Id": null,
"Correspondent": "+553199109555",
"Message": "Hello Fritz! Listen to the audio below.",
"TimeStamp": "2024-08-29T12:00:00Z",
"Status": "On Queue",
"Phone": "+5514920004814",
"Id": "8a54a49b-1f99-4800-a6ea-34b68830dff2",
"Agent": "Outzap API",
"CallBackStatus": 1,
"Attachment_Url": null,
"Attachment_Extn": null,
"Attachment_Type": null
},
{
"Source_Id": "YourInternalMsgID100002",
"Campaign_Id": "CampaignID001",
"Lead_Id": null,
"Account_Id": null,
"Contact_Id": null,
"Deal_Id": null,
"Correspondent": "+553199109555",
"Message": "",
"TimeStamp": "2024-08-29T12:00:01Z",
"Attachment_Url": "https://outzap.blob.core.windows.net/attachments/audio.mp3",
"Status": "On Queue",
"Phone": "+5514920004814",
"Id": "e095feb1-2242-454d-9691-683fe24c1f07",
"Agent": "Outzap API",
"CallBackStatus": 1,
"Attachment_Extn": "mp3",
"Attachment_Type": "audio/mpeg"
}
]
}
Through technological solutions, Outsmart helps companies improve their sales and enhance their competitive advantage. Contact our consultants and expand your business.