# Call Hangup API - Number Masking

## Endpoint Description

<mark style="color:green;">`POST`</mark> [`https://incoming-call.alohaa.ai/v1/external/call/hangup`](https://incoming-call.alohaa.ai/v1/external/call/hangup)

## Parameters

#### Request Headers

<table><thead><tr><th>Field</th><th width="383">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>Field</th><th width="170">Data Type</th><th>Description</th><th>Mandatory</th></tr></thead><tbody><tr><td>call_id</td><td>string</td><td>Unique identifier of the call</td><td>Yes</td></tr></tbody></table>

{% hint style="info" %}
**Good to know:** "call\_id" is a unique ID shared with the client when Alohaa servers send an API request for a receiver number.
{% endhint %}

## Sample Request

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

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

{% endtab %}

{% tab title="Request Body" %}

```
{
  "call_id": "e1ffd143-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

{% endtab %}
{% endtabs %}

## Responses

#### Success Response

```
{
  "success": true,
  "response": {
    "call_id": "e1ffd143-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  }
}
```

#### Failure Response

```
{
  "success": false,
  "error": {
    "code": 1040,
    "reason": "Call details not found"
  }
}
```

## Error Codes

| Code |                                                               |
| ---- | ------------------------------------------------------------- |
| 1000 | Internal Server Error. Something went wrong!                  |
| 1002 | Invalid api key id                                            |
| 1009 | Invalid schema or Missing Data sent                           |
| 1040 | There is not active call running with the referenced call\_id |


---

# 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/call-hangup-api-number-masking.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.
