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

# API overview

> Two APIs: one for sending events from your app, one for managing your workspace.

Tranthor has two HTTP APIs. They use different keys, so pick the one that matches what you are doing.

| | Public API | Admin API |
| - | - | - |
| **Use it to** | Send `identify`, `track`, `page` and `screen` events from your app, site or server. | Read and change your workspace: templates, segments, journeys, broadcasts, users and settings. |
| **Paths** | `/api/public/...` | `/api/admin/...` |
| **Key** | Public write key | Admin API key |
| **Header** | `Authorization: Basic trn_...` | `Authorization: Bearer <ADMIN_API_KEY>` |
| **Safe in a browser or app** | Yes | No. Keep it on a server. |

The base URL is `https://api.tranthor.com`.

## Public API

Copy the write key, including `Basic `, from **Settings**. See [Tranthor's REST API](https://docs.tranthor.com/integrations/sources/api.md) for the request format, deduplication, backfills and limits.

```bash theme={null}
curl -X POST https://api.tranthor.com/api/public/apps/track \
  -H "Authorization: Basic trn_abcdef..." \
  -H "Content-Type: application/json" \
  -d '{"userId": "user-123", "event": "Signed Up", "messageId": "1ff51c9c-4929-45de-8914-3bb878be8c4a"}'
```

Most apps do not call these endpoints directly. The [SDKs](https://docs.tranthor.com/integrations/sdks.md) batch, retry and store events for you.

## Admin API

Create an Admin API key in **Settings**, and send your workspace ID with every request: as `workspaceId` in the query string for reads, and in the JSON body for writes. [Accessing the Admin API](https://docs.tranthor.com/guide/accessing-admin-api.md) shows where to find both.

```bash theme={null}
curl "https://api.tranthor.com/api/admin/segments?workspaceId=<WORKSPACE_ID>" \
  -H "Authorization: Bearer <ADMIN_API_KEY>"
```

## Responses

| Status | Meaning |
| - | - |
| `200`, `204` | The request was accepted. |
| `400` | The request is malformed, for example a missing workspace ID. |
| `401` | The key is missing or invalid. |
| `413` | The body or batch is too large. |
| `429` | Too many requests. Wait for the number of seconds in `Retry-After`, then retry. |

## Prefer not to write requests?

Connected assistants such as Claude and ChatGPT can read and draft in your workspace through Tranthor's [MCP server](https://docs.tranthor.com/guide/mcp-server.md), with no API key to manage.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.