---
title: "API Overview"
description: "Get started with the Gleap admin REST API, including authentication, request headers and queries made on behalf of your team."
url: https://docs.gleap.ai/en/articles/716-api-overview
collection: "Getting Started"
updated: 2026-11-01
language: en
---

# API Overview

Get started with the Gleap admin REST API, including authentication, request headers and queries made on behalf of your team.

This section provides an overview of how to use the Gleap API, including authentication and querying.

## Two server-side APIs

Gleap ships two server-side APIs — this page documents the **admin REST API**, where everything happens **as your team**: tickets you create belong to the project, replies you post are teammate replies.

To build your own support experience on top of Gleap — creating conversations and sending messages **as the end customer** from your backend, with every event pushed back to you — use the [Conversations API (server-to-server)](https://gleap-developer-docs.gleap.help/en/articles/718-overview) instead.

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p></p></th><th colspan="1" rowspan="1"><p>Admin REST API (this page)</p></th><th colspan="1" rowspan="1"><p><a target="_blank" rel="noopener noreferrer nofollow" class="linktype-link link" data-linktype="link" href="https://gleap-developer-docs.gleap.help/en/articles/718-overview">Conversations API</a></p></th></tr><tr><td colspan="1" rowspan="1"><p>Acts as</p></td><td colspan="1" rowspan="1"><p>Your team</p></td><td colspan="1" rowspan="1"><p>The end customer</p></td></tr><tr><td colspan="1" rowspan="1"><p>Use for</p></td><td colspan="1" rowspan="1"><p>Automation, reporting, syncing tickets &amp; contacts</p></td><td colspan="1" rowspan="1"><p>Headless support: your own chat UI, backend-to-backend</p></td></tr><tr><td colspan="1" rowspan="1"><p>Auth</p></td><td colspan="1" rowspan="1"><p><code>Authorization: Bearer &lt;API key&gt;</code> + <code>Project</code> header</p></td><td colspan="1" rowspan="1"><p><code>Authorization: Bearer &lt;service-account token&gt;</code></p></td></tr><tr><td colspan="1" rowspan="1"><p>Events</p></td><td colspan="1" rowspan="1"><p>—</p></td><td colspan="1" rowspan="1"><p><a target="_blank" rel="noopener noreferrer nofollow" class="linktype-link link" data-linktype="link" href="https://gleap-developer-docs.gleap.help/en/articles/723-realtime-stream">Realtime stream</a> (recommended) + <a target="_blank" rel="noopener noreferrer nofollow" class="linktype-link link" data-linktype="link" href="https://gleap-developer-docs.gleap.help/en/articles/722-webhooks-and-events">signed webhooks</a></p></td></tr><tr><td colspan="1" rowspan="1"><p>Spec</p></td><td colspan="1" rowspan="1"><p>—</p></td><td colspan="1" rowspan="1"><p><a target="_blank" rel="noopener noreferrer nofollow" class="linktype-link link" data-linktype="link" href="https://api.gleap.io/s2s-openapi.json">OpenAPI</a></p></td></tr></tbody></table>

## Base URL

All API requests should be made to your region's API host, followed by `/v3`:

```javascript
https://api.gleap.io/v3
```

The API host depends on the [data region](https://gleap-developer-docs.gleap.help/en/articles/711-data-regions) of your project:

<table style="min-width: 50px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>Data region</p></th><th colspan="1" rowspan="1"><p>API host</p></th></tr><tr><td colspan="1" rowspan="1"><p>EU (default)</p></td><td colspan="1" rowspan="1"><p><code>https://api.gleap.io</code></p></td></tr><tr><td colspan="1" rowspan="1"><p>US</p></td><td colspan="1" rowspan="1"><p><code>https://api.us.gleap.ai</code></p></td></tr></tbody></table>

> **Info:** The examples on this page use the EU host. If your project lives in another region, replace `https://api.gleap.io` with your region's host. API tokens are per project and only valid in the project's region.

## Authentication

The Gleap API uses Bearer token authentication along with a project identifier header.

### Getting your API Key and Project ID

1.  Navigate to your [Gleap dashboard](https://app.gleap.ai)
    
2.  Go to **Settings → Developer → API keys**
    
3.  Generate your API key
    
4.  Your **Project ID** is also displayed on this page
    

![API-key settings in the Pied Piper demo project. No credential is shown.](https://staticfiles.gleap.io/p613b5dd730aed737108f87ab/AXlC479te5W6nbAhjmqVlUbybb3GqsppOIL772hkA6pSBKCseMDgMHtxIkDBQ1fW9IF8RZNQFKL.png)

> **Warning:** Keep your API key secure and never expose it in client-side code or public repositories.

### Required Headers

Include both headers in every API request:

```javascript
Authorization: Bearer YOUR_API_KEY
Project: YOUR_PROJECT_ID
```

**Example request:**

```bash
curl -X GET https://api.gleap.io/v3/tickets \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Project: YOUR_PROJECT_ID" \
  -H "Content-Type: application/json"
```

## Querying

All find endpoints (GET requests that return lists of resources) support querying on any property that exists on the document.

### Discovering Available Properties

To see which attributes are available on a document, fetch a single document first:

```bash
curl -X GET https://api.gleap.io/v3/tickets/TICKET_ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Project: YOUR_PROJECT_ID"
```

This will return the full document structure showing all available properties you can query on.

### Query Examples

#### Exact Match

Query for tickets with a specific status:

```javascript
GET https://api.gleap.io/v3/tickets?status=OPEN
```

Query for tickets assigned to a specific user:

```javascript
GET https://api.gleap.io/v3/tickets?processingUser=user123
```

#### Date Range Queries

Query using comparison operators (`>=`, `<=`, `>`, `<`) for date fields:

```javascript
GET https://api.gleap.io/v3/tickets?createdAt>=2025-09-01T00:00:00.000Z&createdAt<=2025-09-01T23:00:00.000Z
```

This example fetches all tickets created on September 1st, 2025 (between 00:00:00 and 23:00:00 UTC).

**Date format:** Use ISO 8601 format: `YYYY-MM-DDTHH:mm:ss.sssZ`

#### Combining Multiple Query Parameters

You can combine multiple query parameters using `&`:

```javascript
GET https://api.gleap.io/v3/tickets?status=OPEN&priority=HIGH&createdAt>=2025-01-01T00:00:00.000Z
```

This returns all open tickets with high priority created after January 1st, 2025.

#### Multiple Values

Query for documents matching any of several values:

```javascript
GET https://api.gleap.io/v3/tickets?status=OPEN,DONE,INPROGRESS
```

## Rate Limits

The API enforces rate limits to ensure fair usage. Limits are applied per API key:

-   **Most endpoints:** 1000 requests per 60 seconds
    
-   **Ticket endpoints** (`POST /tickets`, `POST /tickets/compose`, `GET /tickets`, `GET /tickets/search`, `GET /tickets/extendedsearch`, `GET /tickets/by-session-query`): 200 requests per 60 seconds
    

These are the Team limits. On the October 2026 plans, Pro allows three times as many requests (3,000 and 600) and Enterprise ten times (10,000 and 2,000); see [Plans and AI pricing](https://gleap-developer-docs.gleap.help/en/articles/713-plans-and-ai-pricing#api-and-mcp-limits). Starter has no API access (Team and up).

If you exceed the rate limit, you'll receive a `429 Too Many Requests` response with a `Retry-After` header telling you how many seconds to wait before retrying.

## Related

- [API Samples](https://docs.gleap.ai/en/articles/717-api-samples.md)
