Messages

Create message

Create an inbound customer message. If `conversation.id` is provided the message is appended to that conversation; otherwise a new conversation is created on the channel given by `conversation.type` (email / sms / web_chat). For email, threading uses RFC 5322 References / In-Reply-To headers passed via `message.email`. The AI agent processes the message and any reply is delivered through Applied's native channel (Postmark for email, Twilio for SMS, WebSocket for web chat) — never through a ticketing connector.

POST/v2026-04/messages/

Usage

Start from this cURL example and add filters as needed.

cURL
curl -X POST https://core.appliedlabs.ai/v2026-04/messages/ \
  -H "Authorization: Bearer <api-token>" \
  -H "X-Shop-Id: 66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10" \
  -H "Content-Type: application/json" \
  --data '{
  "contact": {
    "email": "support@example.com",
    "name": "",
    "phone": "string"
  },
  "conversation": {
    "agent_contact": "string",
    "direction": "inbound",
    "id": "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10",
    "intent_id": "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10",
    "topic_id": "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10",
    "type": "email",
    "user_id": "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10"
  },
  "message": {
    "attachments": [
      "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10"
    ],
    "content": "string",
    "email": {
      "bcc": [
        {
          "email": "support@example.com",
          "name": ""
        }
      ],
      "cc": [
        {
          "email": "support@example.com",
          "name": ""
        }
      ],
      "in_reply_to": "",
      "references": [
        "string"
      ],
      "subject": ""
    },
    "format": "TEXT",
    "remote_id": "string",
    "timestamp": "2026-04-07T14:30:00Z"
  }
}'

Authorizations

Authorizationstringheaderrequired

Send your Applied API key as Authorization: Bearer AL.... Create the key in the Applied dashboard and keep it on your server.

Header parameters

X-Shop-Idstring · uuidrequired

The shop whose data you want to read.

Body

required
contactobjectrequired
contact.emailstring · email | null
contact.namestring
contact.phonestring | null
conversationobjectrequired
conversation.agent_contactstring | null

The support email or phone the inbound message was sent to. Used to resolve which Agent handles the conversation. Required for email and sms types; omit for web_chat.

conversation.directionenum<string>required
inbound
conversation.idstring · uuid | null
conversation.intent_idstring · uuid | null
conversation.topic_idstring · uuid | null
conversation.typeoneOf
emailsmsweb_chat
conversation.user_idstring · uuid | null
messageobjectrequired
message.attachmentsarray
message.contentstringrequired
message.emailobject

Optional email-specific headers attached to message.email.

message.formatallOf
TEXTMARKDOWNHTML
message.remote_idstring | null
message.timestampstring · date-time | null
Generated Exampleapplication/json
{
  "contact": {
    "email": "support@example.com",
    "name": "",
    "phone": "string"
  },
  "conversation": {
    "agent_contact": "string",
    "direction": "inbound",
    "id": "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10",
    "intent_id": "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10",
    "topic_id": "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10",
    "type": "email",
    "user_id": "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10"
  },
  "message": {
    "attachments": [
      "66e4c4d2-34e8-4f85-8f51-84b6ed7b5f10"
    ],
    "content": "string",
    "email": {
      "bcc": [
        {
          "email": "support@example.com",
          "name": ""
        }
      ],
      "cc": [
        {
          "email": "support@example.com",
          "name": ""
        }
      ],
      "in_reply_to": "",
      "references": [
        "string"
      ],
      "subject": ""
    },
    "format": "TEXT",
    "remote_id": "string",
    "timestamp": "2026-04-07T14:30:00Z"
  }
}

Response

The existing message that matched the dedup key.

agent_idstring · uuid | nullrequired
contact_idstring · uuid | nullrequired
contentstring
conversation_idstring · uuid | nullrequired
created_atstring · date-time
formatenum<string>

How the message content is formatted.

TEXTRICH_TEXTHTMLMARKDOWN
idstring · uuidrequired
remote_idstring | null
remote_platformstring | null
rolestring
statusoneOf

Delivery status for outbound messages.

PENDINGDELIVEREDFAILEDHIDDEN
textstring
ticket_idstring · uuid | nullrequired
typeenum<string>

Whether the message is customer-facing or internal only.

InternalExternal
updated_atstring · date-timerequired
user_idstring · uuid | nullrequired
{
  "agent_id": "33333333-3333-4333-8333-333333333333",
  "contact_id": "11111111-1111-4111-8111-111111111111",
  "content": "Participant individual American range attorney role.",
  "conversation_id": "55555555-5555-4555-8555-555555555555",
  "created_at": "2026-04-07T14:30:00Z",
  "format": "TEXT",
  "id": "66666666-6666-4666-8666-666666666666",
  "remote_id": "msg_3667beus",
  "remote_platform": "zendesk",
  "role": "assistant",
  "status": "DELIVERED",
  "text": "Participant individual American range attorney role.",
  "ticket_id": "77777777-7777-4777-8777-777777777777",
  "type": "External",
  "updated_at": "2026-04-07T15:12:00Z",
  "user_id": "44444444-4444-4444-8444-444444444444"
}