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.
The API endpoint URL will be of this format:
https://api.getautomata.app/api/send/{{key_id}}/{{protocol}}
key_id
: This is your API keyprotocol
: 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:
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.
- If
message
- Required. String message to be sent.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}}
key_id
: This is your API keyprotocol
: 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" } }, ... ]}