> For the complete documentation index, see [llms.txt](https://help.gleantap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.gleantap.com/settings/api.md).

# API

Get your API credentials, connect AI assistants like Claude and ChatGPT, and find the full developer documentation for the Gleantap API.

Gleantap has a REST API for building integrations with your account. Use it to read contacts, events, and campaign results, or to push in contacts, events, and messages. It also powers AI assistants like Claude and ChatGPT through the Gleantap MCP server.

The full developer documentation is at [**developers.gleantap.com**](https://developers.gleantap.com). This page covers what most people need: where to find your credentials and where to go next.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Build an integration</strong></td><td>v3 API reference: authentication, every endpoint, and examples.</td><td><a href="https://developers.gleantap.com">https://developers.gleantap.com</a></td></tr><tr><td><strong>Connect an AI assistant</strong></td><td>Use Gleantap from Claude, ChatGPT, and other AI tools. No code needed.</td><td><a href="/use-gleantap-with-ai-assistants.md">Use Gleantap with AI Assistants</a></td></tr><tr><td><strong>Maintaining an older integration?</strong></td><td>The v2 (legacy) API reference.</td><td><a href="https://developers.gleantap.com/v2">https://developers.gleantap.com/v2</a></td></tr></tbody></table>

## Find your API credentials

**Step 1.** Open Gleantap and click **Settings** in the top-right menu, then open the **API** tab.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2F8vBqZnOwpHSem9qptL8S%2FScreenshot%202023-10-02%20at%203.37.26%20PM.png?alt=media&#x26;token=e413510c-22c4-4248-89af-3cff37b90766" alt=""><figcaption></figcaption></figure>

**Step 2.** Your credentials are listed in a table. If the table is empty, click **Generate New Key**.

<figure><img src="https://312952119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFKpjLzPT7iDAWD0tQXo%2Fuploads%2FpYOO0r2VaG0CHJPs3a6l%2FKVpM5YUElQ7fTBE6Qdg71iR8X8k2cyQhDw%20(1).png?alt=media&#x26;token=a659d298-dce7-4d21-a3a1-db828e88e731" alt=""><figcaption></figcaption></figure>

The table has two values:

| Column         | What it is             | Used by                                                                                                           |
| -------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **API Key**    | Your account ID        | v2 API only (`X-API-KEY` header)                                                                                  |
| **API Secret** | Your secret credential | **v3 API** (`Authorization: Bearer <API Secret>`), MCP connections that use a key, and v2 (`X-SECRET-KEY` header) |

{% hint style="danger" %}
**Treat the API Secret like a password.** It has full access to your account across every workroom. It can read all contacts, send messages, and delete data. Don't paste it into shared documents, browser code, or chat messages. If it leaks, delete it with the trash icon and generate a new one.
{% endhint %}

You can generate more than one secret, for example one per integration, so you can revoke one without breaking the others. Delete any you no longer use.

{% hint style="info" %}
Only users whose role includes **API access** can see this tab. Ask an account admin if you don't see it.
{% endhint %}

## Use the API (v3)

All new integrations should use the **v3 API**:

```bash
curl https://api.gleantap.com/v3/contacts?limit=5 \
  -H "Authorization: Bearer YOUR_API_SECRET"
```

Full details, including OAuth for third-party apps, are in [Authentication](https://developers.gleantap.com/authentication) and the [API Reference](https://developers.gleantap.com/api-reference-v3) on the developer site.

{% hint style="warning" %}
There is no separate test environment. Every API call runs against your real account. Try new integrations with a test contact or a test workroom before running them on real customers.
{% endhint %}

## Connect an AI assistant (MCP)

You can connect Claude, ChatGPT, Cursor, and other AI tools to Gleantap so they can look up contacts, build segments, draft templates, and report on campaigns for you. In most tools you add this URL and sign in to Gleantap. No API secret is needed:

```
https://mcp.gleantap.com/mcp
```

See [Use Gleantap with AI Assistants](/use-gleantap-with-ai-assistants.md) for step-by-step setup in Claude and ChatGPT. For other tools, or to connect with your API Secret instead of signing in, see the developer guide [Connect AI Tools (MCP)](https://developers.gleantap.com/connect-ai-tools-mcp).

## Older integrations (v2)

The v2 API (`https://api.gleantap.com/v2/ExternalApi`) is **deprecated** but still works. It uses three values on every request:

| Where                        | Value                                                                                                                                                                                       |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `X-API-KEY` header           | **API Key** from Settings → API                                                                                                                                                             |
| `X-SECRET-KEY` header        | **API Secret** from Settings → API                                                                                                                                                          |
| `app_id` in the request body | Your workroom ID: the 24-character ID at the end of your dashboard URL, for example `6993672aca1046edb9094d75` in `https://app2new.gleantap.com/apps/newDashboard/6993672aca1046edb9094d75` |

v2 is limited to **1,000 calls per rolling 24 hours** and returns `429` above that. The v2 reference is at [developers.gleantap.com/v2](https://developers.gleantap.com/v2). If you maintain a v2 integration, plan to move it to v3.

## Support

For API help, integration questions, or higher rate limits, email <support@gleantap.com>.


---

# 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://help.gleantap.com/settings/api.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.
