---
title: "REST API"
description: "The same actions as MCP, over plain HTTP — for scripts and pipelines."
---

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

# REST API

Base URL: `https://mixetape.com`. Every request carries an [API key](/concepts/api-keys):

```sh
curl https://mixetape.com/api/v1/accounts -H "Authorization: Bearer mxt_…"
```

## Resources

| Method | Path | Does |
|---|---|---|
| `GET` | `/api/v1/accounts` | The connected channels, with what each platform supports |
| `GET` | `/api/v1/posts` | Posts, a page at a time; narrow with `accountId`, `provider`, `status`, `search`, `from`, `to` |
| `POST` | `/api/v1/posts` | Schedule a post |
| `GET` | `/api/v1/posts/{id}` | One post; `?insights=1` for its live platform status |
| `PATCH` | `/api/v1/posts/{id}` | Change a post that is still scheduled |
| `DELETE` | `/api/v1/posts/{id}` | Cancel a post that is still scheduled |
| `POST` | `/api/v1/posts/{id}` | Retry a failed post, or set its thumbnail with `{ thumbnailUrl }` |

```sh
curl -X POST https://mixetape.com/api/v1/posts \
  -H "Authorization: Bearer mxt_…" \
  -H "Content-Type: application/json" \
  -d '{
"accountId": "…",
"mediaUrl": "https://example.com/episode-12.mp4",
"scheduledAt": "2026-10-02T17:30:00+07:00",
"metadata": { "title": "Episode 12" }
  }'
```

## Lists come in pages

`GET /api/v1/posts`, `list_posts` and `list_files` answer one page at a time, with a
`nextCursor`. Pass it back as `cursor` — with the same filters — for the next page; it is
`null` on the last one.

```sh
curl "https://mixetape.com/api/v1/posts?accountId=…&search=pompeii&limit=20" \
  -H "Authorization: Bearer mxt_…"
# → { "posts": [ … ], "nextCursor": "WzE3O…" }
```

Comma-separated values (`accountId=a,b`, `status=scheduled,failed`) match any of them.

## Every tool, over REST

Each [tool](/tools) is also an endpoint, taking the same arguments as JSON:

```sh
curl -X POST https://mixetape.com/api/v1/tools/get_account_analytics \
  -H "Authorization: Bearer mxt_…" \
  -H "Content-Type: application/json" \
  -d '{ "accountId": "…", "from": "2026-09-01" }'
```

The answer is `{ "result": … }`. `GET /api/v1/tools` lists the tools the key may call, with
their input schemas.

## Errors

A failed request answers `{ "error": "…" }` in plain words, with its status:

| Status | Means |
|---|---|
| `400` | The request is invalid — `error` says which field and why |
| `401` | No valid API key |
| `403` | The key lacks the permission this needs |
| `404` | Not found, or not yours |
| `409` | Not possible in the current state, e.g. the channel must be reconnected |
| `503` | mixetape cannot connect that platform yet (`connect_channel`) |

## OpenAPI

The whole API is described at
[`https://mixetape.com/api/v1/openapi.json`](https://mixetape.com/api/v1/openapi.json)
(OpenAPI 3.1, generated from the same registry as the tools). The [API reference](/api) is
built from it.

Source: https://docs.mixetape.com/connect-an-agent/rest-api/index.mdx
