# Fetch Logs

## Get Logs

<mark style="color:blue;">`GET`</mark> `https://api.oneroute.io/api/public`/logs?page\[size]=10\&page\[number]=1

This endpoint allows you to fetch logs

#### Query Parameters

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>page[size]</td><td>number</td><td>page limit</td><td>true</td></tr><tr><td>page[number]</td><td>number</td><td>page number</td><td>true</td></tr><tr><td>id</td><td>string</td><td>id of the log</td><td>false</td></tr><tr><td>campaign_id</td><td>string</td><td>campaign id</td><td>false</td></tr><tr><td>identifier</td><td>string</td><td>identifier</td><td>false</td></tr></tbody></table>

#### Headers

| Name   | Type   | Description                 |
| ------ | ------ | --------------------------- |
| apiKey | string | API Key for authentication. |

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

````json
```json
{
    "count": 7,
    "data": [
        {
            "id": "acebf1b3-4df0-408b-971d-b533296ff0e6",
            "externalId": "123488990267",
            "status": "delivered",
            "reason": null,
            "from": "234790097862",
            "to": "+2348752653027",
            "units": 0,
            "delivered_time": null,
            "createdAt": "2024-11-04T16:01:57.385Z",
            "campaign_id": "f1005383-7d8d-4351-b3cb-f0063ce10557",
            "identifier": "f1005383-7d8d-4351"
        }
    ],
    "currentPage": 1,
    "totalPage": 1,
    "message": "logs data",
    "success": true
}
```
````

{% endtab %}

{% tab title="401 " %}

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

{% endtab %}
{% endtabs %}
