Simulate an inbound email
Request
curl -X POST "https://api.iotabot.com/v1/test/inbound" \
-H "Authorization: Bearer $IOTABOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "email",
"from": "customer@example.com",
"name": "Priya Sharma",
"subject": "Order #1042",
"text": "Where is my order?"
}'Response · 201
{
"data": {
"livemode": false,
"conversation": {
"id": "6a4bc1…",
"object": "conversation",
"channel": "email",
"status": "open",
"mode": "ai",
"subject": "Order #1042"
},
"message": {
"id": "6a4bc2…",
"object": "message",
"direction": "inbound",
"text": "Hi, where is my order #1042?",
"status": "received",
"type": "email",
"html": "<p>Hi, where is my order #1042?</p>",
"html_raw": "<div dir=\"ltr\"><p>Hi, where is my order #1042?</p></div>",
"email": {
"subject": "Order #1042",
"mailbox": "support@acme.com",
"customer": "priya@example.com",
"message_id": "<CAF3kq1x@mail.gmail.com>",
"thread_id": "<CAF3kq1x@mail.gmail.com>",
"from": "priya@example.com",
"to": [
"support@acme.com"
],
"cc": [],
"in_reply_to": null,
"references": null
}
}
}
}Errors
test_key_requiredchannel_not_allowedwebsite_not_allowed
