Skip to main content
POST
Send Message

Sending Messages:

  • Group Chats: The agent’s phone number must first be added to the group chat before messages can be sent.
  • Individual Chats: A user must initiate the conversation with the agent’s phone number before the agent can send messages.
NPM Package https://www.npmjs.com/package/a1base-api

Sending Text Messages

Sending Media Messages

Individual Media Message

To send an image to an individual:

Using the Universal Endpoint

You can also use the newer universal endpoint for both text and media messages:

Supported Media Types

The API supports these media types:
  • image: For images (JPG, PNG, etc.)
  • video: For video files
  • audio: For audio files
  • document: For documents (PDF, DOC, etc.)

Important Notes

  • The media_url must be a publicly accessible URL where the media file can be downloaded.
  • The caption field is optional. You can send media without a caption if desired.
  • Make sure your media files are in formats supported by WhatsApp.
  • There are size limits for different media types:
    • Images: Generally up to 5MB
    • Videos: Generally up to 16MB
    • Audio: Generally up to 16MB
    • Documents: Generally up to 100MB
  • The from number must be a WhatsApp-enabled number that your account has permission to use.
  • The to number for individual messages must be a valid WhatsApp number.

Authorizations

X-API-Key
string
header
required
X-API-Secret
string
header
required

Headers

X-API-Key
string
required
X-API-Secret
string
required

Path Parameters

accountId
string
required

Account ID

Body

application/json
content
string
required

Message body text

from
string
required

Sender phone number

to
string
required

Recipient phone number

service
enum<string>
required

Messaging service to use

Available options:
whatsapp,
telegram
attachment_uri
string

Optional file/media attachment

Response

Message sent successfully

to
string
from
string
body
string
status
enum<string>
Available options:
queued,
sent
date_created
string<date-time>