---
title: "List posts"
description: "Posts, newest scheduled first, a page at a time; pass `nextCursor` back as `cursor` for the next page. Needs the **read** permission."
---

> 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.

Path: mixetape API › Accounts and posts

`GET /api/v1/posts`

Posts, newest scheduled first, a page at a time; pass `nextCursor` back as `cursor` for the next page. Needs the **read** permission.

## Authentication

- `apiKey`, http, header `Authorization`

## Query parameters

- `listPostsRest.query.accountId` (string, optional) — Comma-separated account ids: only posts on these accounts
- `listPostsRest.query.provider` (string, optional) — Comma-separated platforms, e.g. `youtube,instagram`
- `listPostsRest.query.search` (string, optional) — Words in the title, caption or description (case-insensitive)
- `listPostsRest.query.cursor` (string, optional) — `nextCursor` from the previous page
- `listPostsRest.query.status` (string, optional) — Comma-separated statuses, e.g. `scheduled,failed`
- `listPostsRest.query.from` (string, optional) — ISO time; scheduled at or after
  - format `date-time`
- `listPostsRest.query.to` (string, optional) — ISO time; scheduled at or before
  - format `date-time`
- `listPostsRest.query.limit` (integer, optional) — Default 100, max 500
  - max 500; default `100`

## Code samples

### cURL

```curl
curl --request GET \
  --url https://mixetape.com/api/v1/posts \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://mixetape.com/api/v1/posts';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://mixetape.com/api/v1/posts"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

A page of posts.

#### Example

```json
{
  "posts": [
    {
      "id": "string",
      "accountId": "string",
      "provider": "string",
      "mediaUrl": "string",
      "caption": "string",
      "metadata": {},
      "scheduledAt": "2019-08-24T14:15:22Z",
      "leadMinutes": 0,
      "status": "scheduled",
      "platformPostId": "string",
      "platformUrl": "string",
      "error": "string",
      "attempts": 0,
      "publishedAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "nextCursor": "string"
}
```

- `listPostsRest.response.200.posts` (array<object>, required)
  - `listPostsRest.response.200.posts.id` (string, required)
  - `listPostsRest.response.200.posts.accountId` (string, required)
  - `listPostsRest.response.200.posts.provider` (string, required)
  - `listPostsRest.response.200.posts.mediaUrl` (string, required)
  - `listPostsRest.response.200.posts.scheduledAt` (string, required) — When it goes live
    - format `date-time`
  - `listPostsRest.response.200.posts.status` (string, required)
    - one of `"scheduled"`, `"publishing"`, `"uploaded"`, `"published"`, `"failed"`, `"cancelled"`
  - `listPostsRest.response.200.posts.caption` (string | null, optional)
  - `listPostsRest.response.200.posts.metadata` (object | null, optional) — The platform's own fields
  - `listPostsRest.response.200.posts.leadMinutes` (integer | null, optional) — Uploaded or prepared this long before scheduledAt
  - `listPostsRest.response.200.posts.platformPostId` (string | null, optional)
  - `listPostsRest.response.200.posts.platformUrl` (string | null, optional)
  - `listPostsRest.response.200.posts.error` (string | null, optional) — Why it failed, when it did
  - `listPostsRest.response.200.posts.attempts` (integer, optional)
  - `listPostsRest.response.200.posts.publishedAt` (string | null, optional)
    - format `date-time`
  - `listPostsRest.response.200.posts.createdAt` (string, optional)
    - format `date-time`
  - `listPostsRest.response.200.posts.updatedAt` (string, optional)
    - format `date-time`
- `listPostsRest.response.200.nextCursor` (string | null, required) — Pass as `cursor` for the next page; null on the last

### 400

The request is invalid; `error` says why.

#### Example

```json
{
  "error": "string"
}
```

- `listPostsRest.response.400.error` (string, required) — What went wrong, in plain words

### 401

No valid API key.

#### Example

```json
{
  "error": "string"
}
```

- `listPostsRest.response.401.error` (string, required) — What went wrong, in plain words

### 403

The key lacks the permission this needs.

#### Example

```json
{
  "error": "string"
}
```

- `listPostsRest.response.403.error` (string, required) — What went wrong, in plain words


Source: https://docs.mixetape.com/api/Accounts-and-posts/listPostsRest/index.md
