> For the complete documentation index, see [llms.txt](https://docs.oneroute.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oneroute.io/sms-api/sms-api/fetch-sms-messages.md).

# Fetch SMS Messages

<mark style="color:blue;">`GET`</mark> `https://api.oneroute.io/api/public/channel/id/sms`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | String | channel id  |

#### Query Parameters

| Name                                            | Type   | Description                                                                 |
| ----------------------------------------------- | ------ | --------------------------------------------------------------------------- |
| status (Optional)                               | String | status of the messages to fetch. Must be delivered, pending or undelivered. |
| page\[size]<mark style="color:red;">\*</mark>   | String | the limit of messages per page                                              |
| page\[number]<mark style="color:red;">\*</mark> | String | page to load e.g 1, 2                                                       |

#### Headers

| Name                                     | Type   | Description |
| ---------------------------------------- | ------ | ----------- |
| apikey<mark style="color:red;">\*</mark> | String | API key     |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "data": [
        {
            "id": "8d06688b-a050-4c40-89df-9ae0df36cb2c",
            "phone": null,
            "identifier": "support",
            "medium": "EMAIL",
            "credentials": {
                "email": "support@mail.oneroute.io",
                "emailDomain": "mail.oneroute.io"
            },
            "description": "Email Account to Sendgrid",
            "name": "support@mail.oneroute.io",
            "type": "CUSTOM",
            "provider": null,
            "country": "NG",
            "env": "LIVE",
            "status": "ACTIVE",
            "webhookUrl": null,
            "createdAt": "2021-07-16T07:56:41.226Z",
            "updatedAt": "2021-07-16T07:56:41.226Z"
      }
    ],
    "message": "Channels fetched successfully",
    "success": true
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    "data": null,
    "message": "Invalid API Key",
    "success": false
}
```

{% endtab %}
{% endtabs %}
