API Access

POST Send

To connect Automata to your CRM or automation tools like Zapier/Make, you should use our API. Direct integrations with CRMs and automation tools is available for Premium subscribers.

To obtain the API endpoint, login to your dashboard.

Navigate to the Integrations page and click on API Integration to expand the settings. Click on either "WhatsApp" or "iMessage" to reveal the hidden API endpoint URL for the corresponding protocol.

API URL

The API endpoint URL will be of this format:

https://api.getautomata.app/api/send/{{key_id}}/{{protocol}}

  1. key_id: This is your API key
  2. protocol: The messaging protocol to send the message with
⚠️

Your API endpoint URL is unique to you. Do not share it! Anyone with the URL will be able to add messages to your message queue.

To add messages to your message queue, send a POST request with the following body:

  1. phoneNumber - Required.

    • If phoneNumber does not include +XXX country code, we assume (+1) US country code. Contact us if you'd like to change this default assumption.
    • To send messages to group chats, this should be the group chat's id. Use this endpoint to obtain the ids of your group chats.
  2. message - Required. String message to be sent.

  3. schedule - Optional. Numeric UNIX timestamp in milliseconds. If this field is entered, the message will not be sent until the scheduled date/time.

For example:

curl
--request POST '{YOUR ENDPOINT URL}'
--header 'Content-Type: application/json'
--data '{
"phoneNumber":"{PHONE NUMBER OR IMESSAGE EMAIL}",
"message":"{MESSAGE}",
"schedule": 1675737671000
}'

If successful, the endpoint will respond with:

{
"id": "{{automata message id}}",
"status": "Added to queue"
}

GET Group

Endpoint format: https://api.getautomata.app/api/group/{{key_id}}/{{protocol}}

  1. key_id: This is your API key
  2. protocol: The messaging protocol to send the message with

Example:

curl
--request GET '{YOUR ENDPOINT URL}'

Example response:

{
"data": [
{
"id": "120363047322461111",
"name": "Group chat's name",
"metadata": {
"owner": "Owner phone number",
"subjectOwner": "Subject owner phone number",
"desc": "Description",
"descOwner": "Description owner",
"restrict": 0,
"announce": 0,
"size": 3,
"participants": "List of objects with participant IDs",
"inviteCode": "Invite code"
}
},
...
]
}