# Get Outgoing Call Logs API

## Endpoint Description

<mark style="color:green;">`GET`</mark> [`https://outgoing-call.alohaa.ai/v1/external/click-2-call-logs`](https://outgoing-call.alohaa.ai/v1/external/click-2-call-logs)

## Parameters

#### Request Headers

<table><thead><tr><th>Field</th><th width="219">Value</th><th>Description</th><th>Mandatory</th></tr></thead><tbody><tr><td>Content-Type</td><td>application/json</td><td>Specifies the content type of the request.</td><td>Yes</td></tr><tr><td>x-metro-api-key</td><td>*************************</td><td>API key for authentication purposes.</td><td>Yes</td></tr></tbody></table>

#### Request Body

<table><thead><tr><th width="162">Field</th><th width="171">Data Type</th><th width="292">Description</th><th>Mandatory</th></tr></thead><tbody><tr><td>page_no</td><td>String</td><td>Page number of the logs to retrieve.</td><td>Yes</td></tr><tr><td>page_size</td><td>String</td><td>Number of log entries per page.</td><td>Yes</td></tr><tr><td>caller_number</td><td>Array</td><td>Filter logs by a specific caller number.</td><td>Yes</td></tr></tbody></table>

## Sample Request

{% tabs %}
{% tab title="Request Header" %}

```
{
  "x-metro-api-key": "****************"
}
```

{% endtab %}

{% tab title="Request Body" %}

```
{
    page_no: 1,
    page_size: 1
}

```

{% endtab %}
{% endtabs %}

## Responses

#### Success Response

```
{
  "success": true,
  "response": {
    "call_logs": [
      {
        "_id": "638f17f1ec14ecda91544aek",
        "organisation_id": "259150fd-6c5a-4886-9eb7-901690b9f024",
        "agent_name": "Rama",
        "caller_number": "XXXXXX0073",
        "receiver_number": "XXXXXX3906",
        "did_number": "XXXXXXXX8150",
        "call_duration": 9,
        "recording_url": "https://doosra-ivr-voicemails.s3.ap-south-1.amazonaws.com/ten20_infomedia/DIA63e48bbectsczjopi.mp3",
        "created_at": "2023-02-09T05:59:26.267Z",
        "updated_at": "2023-02-09T05:59:26.267Z",
        "status": "answered"
      }
    ],
    "metadata": {
      "total": 232,
      "query": {
        "page_no": 1,
        "page_size": 1
      }
    }
  }
}
```

#### Failure Response

```
{
  "success": false,
  "error": {
    "code": 1022,
    "reason": "Organisation does not exist"
  }
}
```

## Error Codes

| Code | Description                 |
| ---- | --------------------------- |
| 1022 | Organisation does not exist |


---

# 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.alohaa.ai/alohaa-docs/api/get-outgoing-call-logs-api.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.
