> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/inbox/inbox-api/reference/making-requests.md).

# Making requests

Base URL, authentication headers, formats, pagination, errors and limits.

## Base URL

Each Inbox has its own address. All endpoints live under `/api/v1/`:

```
https://your-stack.inbox.getchat.360dialog.io/api/v1/
```

You find the address by opening the Inbox from the Hub. Every number has its own Inbox, on its own servers and database, so its data stays separate from every other Inbox.

All requests must use HTTPS.

## Authentication

Every request carries a user token:

```
Authorization: Token <token>
```

The channel API key (`D360-Api-Key`) is not supported. To create a user and get its token, see [Authentication](/docs/inbox/inbox-api/authentication.md).

## Formats

Send request bodies as JSON with `Content-Type: application/json`. Form-encoded and multipart bodies are also accepted; use multipart to upload files. Responses are JSON.

## Pagination

List endpoints return pages:

```json
{
  "count": 276,
  "next": "https://your-stack.inbox.getchat.360dialog.io/api/v1/messages/?wa_id=4915112345678&limit=20&offset=20",
  "previous": null,
  "results": []
}
```

Use `limit` and `offset` to move through pages. For messages, page with `before_time` instead: new messages keep arriving while you read, which shifts offsets but not timestamps.

## Status codes

| Code  | Meaning                                                                                                       |
| ----- | ------------------------------------------------------------------------------------------------------------- |
| `200` | Success                                                                                                       |
| `201` | Created                                                                                                       |
| `202` | Accepted — a message was queued; it is not delivered yet                                                      |
| `400` | Something is wrong with the request; the `reason` field says what                                             |
| `403` | Not signed in, or your user has no permission for this chat                                                   |
| `423` | The message queue is full                                                                                     |
| `452` | The contact does not exist (on `GET /messages/`), or the timestamp is in the future (on `/mark_as_received/`) |
| `453` | The conversation window has closed; only a template can be sent                                               |
| `503` | The message gateway could not be reached; retry after a few seconds                                           |

Before retrying a `503` on a send, read the chat's messages: a request that timed out may still have queued the message.

## Limits

* Each Inbox keeps up to 1.5 million messages. When it is full, the oldest messages are removed first
* Search covers up to 1 million messages


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/inbox/inbox-api/reference/making-requests.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
