> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hubtalk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Address and request

> The adapter address, request method and body, timeout, envelope keys, and the order of checks.

# Address and request

## Address

Keep sending requests to your old V2 API address: the platform forwards them to the adapter with the same method and body. The adapter itself is available at:

```
https://<platform host>/legacy/v2-mx/entrypoint
```

## Method and body

* Any method works: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS`.
* The body is JSON. It is read regardless of the `Content-Type` header.
* The query string and the `Authorization` header are ignored.

## Timeout

Wait for a response for **at least 60 seconds**. A large `create` can take longer than an ordinary request: all waits before writing starts fit within 50 seconds, and writing a large request takes additional time.

## Request envelope

```json theme={null}
{
  "user": "your_login",
  "pass": "…",
  "type": "create",
  "cname": "morning",
  "start_hour": 10, "start_minute": 0,
  "ending_hour": 20, "ending_minute": 0,
  "try": 2, "speed": 5, "time_hour_betw_spin": 1,
  "flag_ignore_errors": "skip",
  "data": [
    { "phone_number": "5215512345678", "type": "soft_script", "gender_voice": "female", "language": "es", "client_name": "Ana" }
  ]
}
```

| Key | Meaning |
| - | - |
| `user`, `pass` | The adapter account login (case-insensitive) and password. |
| `type` (or `Type`) | The operation: `create`, `delete`, `delete_phone_number`, `details`. Anything else, including `status*`, gets "The request type is incorrect". |
| `data` | A non-empty array. An object is also accepted — its values are then taken in key order. For `create` — rows, for `delete` — IDs, for `delete_phone_number` — numbers, for `details` — `["YYYY-MM-DD"]`. |
| `cname` | Part of the campaign name. An empty value becomes `API`. Up to 255 characters. |
| `start_hour`, `ending_hour`, `start_minute`, `ending_minute` | Hours and minutes of the campaign day. Numbers are read as in V2: the first integer in the value is taken, otherwise 0. `null` means "not passed". Minutes outside 0–59 become 0. |
| `try` | Attempts. 1–30 — as is, more than 30 — becomes 30. 0 or absent — the account default. |
| `speed` | Calls per minute, rounded down to the nearest step in the series 1, 2, 5, 10, 20, 30, 60, 100, 200: 8 becomes 5, 500 becomes 200. 0 or absent — the account default. |
| `time_hour_betw_spin` | Interval between attempts: 1–9 — hours, 10–180 — minutes, more than 180 — 3 hours. 0 or absent — the account default. |
| `flag_ignore_errors` | `"skip"` — rows that fail value checks are dropped instead of rejecting the whole request. |
| `batch_status`, `uniqueID` | Not supported: a non-empty value rejects the whole request. |

## Order of checks

The first failed step responds; the following steps are not run.

| # | Step | Response on rejection |
| - | - | - |
| 1 | Limit per sender address | `{"type":"error", "data":"Too many requests, try again later"}` (added by the platform) |
| 2 | Limit per login | the same |
| 3 | Sign-in; then the stored response to a repeat of the same body, if there is one | `{"type":"error", "data":"Authentication failed"}` |
| 4 | `data` is not empty | `{"type":"error", "data":"No data error"}` |
| 5 | [Hour checks](https://docs.hubtalk.ai/v4/compat-adapter/create.md#hours) | the hour check texts |
| 6 | Operation type | `{"type":"error", "data" : "The request type is incorrect"}` (spaces around the colon — as in V2) |
| 7 | The operation itself | see [`create`](https://docs.hubtalk.ai/v4/compat-adapter/create), [`delete`](https://docs.hubtalk.ai/v4/compat-adapter/delete), [`details`](https://docs.hubtalk.ai/v4/compat-adapter/details) |

A failure on the platform side responds with `{"type":"error", "data":"Internal error, try again later"}` (added by the platform). Retry such a request later.

> [!NOTE]
>
> The response texts reproduce V2 to the character, including extra spaces. If your code compares the whole response body, it will keep working.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.