# Receiving messages

## Inbound messages

In this section, you can find sample messages of every inbound message type supported by the Channels API from an SMS channel. The code snippets in every subsection demonstrate how an SMS message is converted into a Channels API message.

See the following pages to understand more about [retrieving messages](/api/channels-api/api-reference/messaging.md) or [message statuses](/api/channels-api/message-status-and-interactions.md)

### Text message

```json
{
  "id": "96a0b5fa-a986-453d-be5c-3117f989f025",
  "channelId": "614208aa-b153-4d5d-9989-2fddfc0ce4c3",
  "sender": {
    "contact": {
      "id": "32cf5eee-f940-422c-ab8c-5f753aad5efd",
      "identifierKey": "phonenumber",
      "identifierValue": "+31612345678"
    }
  },
  "receiver": {
    "connector": {
      "id": "86cc4dc0-3dc0-41b7-ac43-8ec829ead56f"
    }
  },
  "body": {
    "type": "text",
    "text": {
      "text": "Sample incoming text message"
    }
  },
  "parts": [
    {
      "platformReference": "e8077d803532c0b5937c639b60216938"
    }
  ],
  "status": "delivered",
  "direction": "incoming",
  "lastStatusAt": "2022-12-22T08:32:50.736Z",
  "createdAt": "2022-12-22T08:32:50.736Z",
  "updatedAt": "2022-12-22T08:32:50.736Z"
}
```

### Webhook Callback for Incoming Message

The POST request sent to the webhook subscription URL will have the following structure:

```json
{
    "service": "channels",
    "event": "sms.inbound",
    "payload": {} // object as shown in example above
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/channels-api/supported-channels/programmable-sms/receiving-messages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
