Outzap - API

Outzap API – Queue Messages for Sending

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.

Endpoint

POST https://outzapapi.azurewebsites.net/api/request_messages

Headers

  • Token: Provide the authentication token.

  • Org: Provide the organization ID.

Request Body (JSON)

The request body is a JSON array containing message objects:

ParameterTypeRequiredDescription
Source_IdString✅ YesYour internal ID for the message.
Campaign_IdString❌ NoCampaign ID for internal tracking.
Lead_IdString❌ NoLead ID for internal tracking.
Account_IdString❌ NoAccount/Company/Client ID for internal tracking.
Contact_IdString❌ NoContact person ID for internal tracking.
Deal_IdString❌ NoBusiness deal ID for internal tracking.
CorrespondentString✅ YesRecipient’s phone number in the format +5511944443333 or +551144443333.
MessageString✅ YesMessage text or attachment caption. Messages with audio attachments ignore this field.
TimeStampString✅ YesDate and time in the format YYYY-MM-DDTHH:MM:SSZ. Used to order messages.
Attachment_UrlString❌ NoAttachment 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 either Message or Attachment_Url to be considered valid.

Example Request

[
  {
    "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"
  }
]

Example Error Response

{
  "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
    }
  ]
}

Example Success Response

{
  "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.

Information