# Fetch Channels

## Fetch Whatsapp Channels

<mark style="color:blue;">`GET`</mark> `https://api.oneroute.io/api/public/channels/whatsapp`

This endpoint allows you to fetch Whatsapp channels.

#### Query Parameters

| Name              | Type   | Description                                                          |
| ----------------- | ------ | -------------------------------------------------------------------- |
| name (Optional)   | string | name of the channel to fetch                                         |
| status (Optional) | string | status of the channels to fetch, must be ACTIVE, INACTIVE or PENDING |

#### Headers

| Name   | Type   | Description             |
| ------ | ------ | ----------------------- |
| apiKey | string | API Authentication Key. |

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

```
{
    "data": [
        {
            "id": "8ec725db-7fb8-45db-a7ae-6b3e266f9653",
            "phone": "234XXXXXXXX",
            "identifier": null,
            "medium": "WHATSAPP",
            "credentials": null,
            "description": null,
            "name": "234XXXXXXXX",
            "type": "DEFAULT",
            "country": "NG",
            "status": "ACTIVE",
            "createdAt": "2020-11-09T16:49:40.803Z",
            "updatedAt": "2020-09-11T16:49:40.803Z",
            "firm_id": "e9e46626-0093-4bf6-a657-2a824567d801",
            "provider_config_id": "c9cba1b0-3249-421d-9906-2c99eac972c0"
        },
        {
            "id": "e0c51d87-e22e-4fad-bf05-e848dccdbe37",
            "phone": "234XXXXXXXX",
            "identifier": "234XXXXXXXX",
            "medium": "WHATSAPP",
            "description": "360Dialog Channel",
            "name": "2348178773120",
            "type": "CUSTOM",
            "country": "NG",
            "status": "ACTIVE",
            "createdAt": "2021-06-15T16:18:48.977Z",
            "updatedAt": "2021-06-15T16:34:32.022Z",
            "firm_id": "e9e46626-0093-4bf6-a657-2a824567d801",
            "provider_config_id": "888d7695-0ea8-49b5-a83d-81ce9efeb2c3"
        }
    ],
    "message": "Chanels fetched successfully",
    "success": true
}
```

{% endtab %}

{% tab title="401 " %}

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

{% endtab %}
{% endtabs %}
