Test mode
Drive the test-mode simulator on purpose. Test keys only.
Endpoints
Simulate a customer message
https://api.saei.automize.sa/v1/test/inbound_messages- Scope:
messages:send - Test keys only
As if a customer had just written to you. Fires message.received to your test endpoints and opens the simulated 24-hour window for that number. Test keys only.
Request body
fromstringrequiredThe customer number the message comes from, in E.164.
tostringoptionaltypestringoptionalOne of
textbutton_replytextobjectoptionalChild fields (1)
bodystringoptional
button_replyobjectoptionalChild fields (2)
idstringoptionaltitlestringoptional
profile_namestringoptional
Response fields201· The simulated inbound message.
idstringrequiredUnique id. Opaque: store it as a string of up to 64 characters.
object"message"requiredlivemodebooleanrequireddirectionstringrequiredoutboundfor messages you send,inboundfor customer messages.One of
outboundinboundchannelstringrequiredOne of
whatsappinstagrammessengerfromstring | nulloptionalSender, in E.164 for WhatsApp.
tostring | nulloptionalRecipient, in E.164 for WhatsApp.
typestringrequiredWhat kind of content the message carries.
textobjectoptionalChild fields (1)
bodystringoptional
templateobjectoptionalChild fields (4)
namestringoptionallanguagestringoptionalvariablesobjectoptionalbodystringoptional
imageobjectoptionalMedia messages carry
link(ormedia_id),caption,filenameandmime_typewhen known.videoobjectoptionalaudioobjectoptionaldocumentobjectoptionalstickerobjectoptionallocationobjectoptionalcontactsarrayoptionalinteractiveobjectoptionalWhat you sent (
type,body,buttons…), or for a customer's tap,reply: {id, title}.reactionobjectoptionalstatusstringrequiredaccepted→sent→delivered→read, orfailed. Customer messages arereceived. Status changes arrive as webhook events.One of
acceptedsentdeliveredreadfailedreceivederrorobject | nulloptionalWhy delivery failed, when
statusisfailed.Child fields (3)
codestring | nulloptionaltitlestring | nulloptionalmessagestring | nulloptional
referencestring | nulloptionalYour own reference, echoed back from the send request and in every event.
conversation_idstring | nulloptionalprovider_message_idstring | nulloptionalWhatsApp's own message id (wamid).
contactobject | nulloptionalChild fields (1)
namestring | nulloptional
contextobject | nulloptionalFor a reply, the message being replied to.
Child fields (1)
provider_message_idstringoptional
created_atstring | nullrequiredupdated_atstring | nulloptional
Errors this can return2
- 422parameter_missingMissing parameter
- 422parameter_invalidInvalid parameter
Try it
curl -X POST https://api.saei.automize.sa/v1/test/inbound_messages \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "+966500000004",
"type": "text",
"text": {
"body": "مرحبا، أين طلبي؟"
},
"profile_name": "Sara"
}'The simulated inbound message.
{
"id": "msg_48213",
"object": "message",
"livemode": false,
"direction": "outbound",
"channel": "whatsapp",
"from": "+966112345678",
"to": "+966501234567",
"type": "text",
"text": {
"body": "string"
},
"template": {
"name": "string",
"language": "string",
"variables": {},
"body": "string"
},
"image": {},
"video": {},
"audio": {},
"document": {},
"sticker": {},
"location": {},
"contacts": [],
"interactive": {},
"reaction": {},
"status": "accepted",
"error": {
"code": "string",
"title": "string",
"message": "string"
},
"reference": "string",
"conversation_id": "string",
"provider_message_id": "string",
"contact": {
"name": "string"
},
"context": {
"provider_message_id": "string"
},
"created_at": "2026-10-01T09:30:00Z",
"updated_at": "2026-10-01T09:30:00Z"
}Force a message status
https://api.saei.automize.sa/v1/test/messages/{id}/status- Scope:
messages:send - Test keys only
Move a test message to sent, delivered, read or failed now and fire the matching event. Statuses only move forward. Test keys only.
Path parameters
idstringrequiredThe object's id.
Request body
statusstringrequiredOne of
sentdeliveredreadfailederror_codestringoptionalerror_messagestringoptional
Response fields200· The message with its new status.
idstringrequiredUnique id. Opaque: store it as a string of up to 64 characters.
object"message"requiredlivemodebooleanrequireddirectionstringrequiredoutboundfor messages you send,inboundfor customer messages.One of
outboundinboundchannelstringrequiredOne of
whatsappinstagrammessengerfromstring | nulloptionalSender, in E.164 for WhatsApp.
tostring | nulloptionalRecipient, in E.164 for WhatsApp.
typestringrequiredWhat kind of content the message carries.
textobjectoptionalChild fields (1)
bodystringoptional
templateobjectoptionalChild fields (4)
namestringoptionallanguagestringoptionalvariablesobjectoptionalbodystringoptional
imageobjectoptionalMedia messages carry
link(ormedia_id),caption,filenameandmime_typewhen known.videoobjectoptionalaudioobjectoptionaldocumentobjectoptionalstickerobjectoptionallocationobjectoptionalcontactsarrayoptionalinteractiveobjectoptionalWhat you sent (
type,body,buttons…), or for a customer's tap,reply: {id, title}.reactionobjectoptionalstatusstringrequiredaccepted→sent→delivered→read, orfailed. Customer messages arereceived. Status changes arrive as webhook events.One of
acceptedsentdeliveredreadfailedreceivederrorobject | nulloptionalWhy delivery failed, when
statusisfailed.Child fields (3)
codestring | nulloptionaltitlestring | nulloptionalmessagestring | nulloptional
referencestring | nulloptionalYour own reference, echoed back from the send request and in every event.
conversation_idstring | nulloptionalprovider_message_idstring | nulloptionalWhatsApp's own message id (wamid).
contactobject | nulloptionalChild fields (1)
namestring | nulloptional
contextobject | nulloptionalFor a reply, the message being replied to.
Child fields (1)
provider_message_idstringoptional
created_atstring | nullrequiredupdated_atstring | nulloptional
Errors this can return2
- 422parameter_invalidInvalid parameter
- 404resource_missingNot found
Try it
curl -X POST https://api.saei.automize.sa/v1/test/messages/msg_test_01j9x3k2m4n5p6q7r8s9t0v1w2/status \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "failed",
"error_code": "131026"
}'The message with its new status.
{
"id": "msg_48213",
"object": "message",
"livemode": false,
"direction": "outbound",
"channel": "whatsapp",
"from": "+966112345678",
"to": "+966501234567",
"type": "text",
"text": {
"body": "string"
},
"template": {
"name": "string",
"language": "string",
"variables": {},
"body": "string"
},
"image": {},
"video": {},
"audio": {},
"document": {},
"sticker": {},
"location": {},
"contacts": [],
"interactive": {},
"reaction": {},
"status": "accepted",
"error": {
"code": "string",
"title": "string",
"message": "string"
},
"reference": "string",
"conversation_id": "string",
"provider_message_id": "string",
"contact": {
"name": "string"
},
"context": {
"provider_message_id": "string"
},
"created_at": "2026-10-01T09:30:00Z",
"updated_at": "2026-10-01T09:30:00Z"
}