Skip to main content

Turn Events API

The events API allows you to send external events to Turn, they will be displayed in the chat history.

note

Currently the only supported event type is external message but this will be expanded in the future to allow more types.

External Message Example

To send a external message to Turn, do the following request:

$ curl -X POST "https://whatsapp.turn.io/v1/events" \
-H "Authorization: Bearer token" \
-H "Content-Type: application/json" \
-H "accept: application/vnd.v1+json"
-d '
{
"event_type": "external_message",
"urn": "+16315551003",
"timestamp": 1555493466000,
"event_id": "1111117",
"details": {
"content": "Hi how are you?",
"direction": "inbound",
"from_addr": "+16315551003"
}
}'