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

# About the Customer Chat API

> Interact with Text conversations from the customer's perspective.

The Customer Chat API lets you build custom chat experiences for your end users. Use it to create fully branded chat interfaces, embed chat into your own app, or connect your customers to Text from any surface.

## Web API basics

The Web API works like a standard REST API — you send a request, you get a response. Communication happens over **XHR requests**, making it easier to implement than the RTM API and a good fit for stateless integrations.

If you need a persistent, real-time connection instead — for example, to build a live custom chat interface — use the RTM API instead. Keep in mind that compared to RTM, Web API responses may have a slight delay.

<h2 id="request-pagination">
  Pagination
</h2>

Pagination is a mechanism that allows splitting the database output into more manageable chunks of data. Based on the `limit` and `sort_order` parameters, pagination is able to decide how many records will be returned at once and whether it should fetch the oldest or the latest data first.

Any filters that could be applied should be provided in the first pagination request. In the response, you'll get the `next_page_id` and `previous_page_id` parameters. You should make the subsequent request using one of these parameters as `page_id`, depending on the direction of iteration: forward or backward.

The `filters`, `limit`, and `sort_order` parameters can't be provided along with `page_id`.

The maximum duration of the `page_id` parameter before it expires is one month.
