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

# Introduction

> Understand general concepts, response codes, and authentication strategies.

## Base URL

The Usertour API is built on **REST** principles. We enforce **HTTPS** in every request to improve data security, integrity, and privacy. The API does not support **HTTP**.

All requests contain the following base URL:

```
https://api.usertour.io
```

## Authentication

To authenticate you need to add an Authorization header with the contents of the header being `Bearer ak_123456789` where `ak_123456789` is your [API Key](https://app.usertour.io/project/1/settings/api).

```
Authorization: Bearer ak_123456789
```

## Response codes

Usertour uses standard HTTP codes to indicate the success or failure of your requests.

In general, `2xx` HTTP codes correspond to success, `4xx` codes are for user-related failures, and `5xx` codes are for infrastructure issues.

| Status | Description                               |
| ------ | ----------------------------------------- |
| `200`  | Successful request.                       |
| `400`  | Check that the parameters were correct.   |
| `401`  | The API key used was missing.             |
| `403`  | The API key used was invalid.             |
| `404`  | The resource was not found.               |
| `429`  | The rate limit was exceeded.              |
| `5xx`  | Indicates an error with Usertour servers. |

<Note>Check [**Error Codes**](/api-reference/errors) for a comprehensive breakdown of all possible API errors.</Note>

## Rate limit

The API implements two protection mechanisms to ensure service stability:

1. **Request Rate Limiter**
   * Enforces per-account request limits per minute
   * Rate limits vary based on your subscription plan (see [Pricing](https://www.usertour.io/pricing))
   * Exceeding the limit returns HTTP 429 (Too Many Requests)

2. **Concurrency Limiter**
   * Controls simultaneous active requests
   * Implements request queuing when at high capacity
   * Queue timeout: 15 seconds
   * Returns HTTP 503 (Service Unavailable) if queued too long
   * Note: This is a rare occurrence as we maintain sufficient capacity to minimize queuing

<Note>For optimal integration, implement proper error handling for both 429 and 503 responses. Consider implementing retry logic with exponential backoff when receiving these status codes.</Note>
