# List planned Instagram posts

`GET https://app.whatsetter.com/api/v1/instagram/posts`

The posts planned on the workspace's Instagram accounts, newest
planned time first: `scheduled` (waiting for `publish_at`),
`publishing` (sent to Instagram, being processed), `reminded` (mode
`remind`: the person was reminded and the post is looked for on the
account), `published` (with its `permalink`) and `failed` (with
`error_code`, the reason in a word: `aspect_ratio`, `video_format`,
`quota`, `needs_reconnect`, `remind_missed`…).
Requires scope `instagram:read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | query | string | no | One Instagram account of the workspace (all of them by default). |
| `status` | query | scheduled \| publishing \| reminded \| published \| failed | no |  |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no | Opaque cursor from the previous page's `pagination.next_cursor`. |

## Example request

```bash
curl --request GET \
  --url 'https://app.whatsetter.com/api/v1/instagram/posts' \
  --header 'Authorization: Bearer ws_live_…'
```

## Responses

### 200: A page of planned posts

```json
{
  "data": [
    {
      "id": "",
      "account_id": "",
      "account_username": "",
      "kind": "image",
      "caption": "",
      "media": [
        {
          "type": "image",
          "url": ""
        }
      ],
      "status": "scheduled",
      "publish_at": "",
      "published_at": "",
      "permalink": "",
      "instagram_media_id": "",
      "error_code": "",
      "automation": {
        "keyword": "",
        "message": ""
      },
      "first_comment": {
        "message": "",
        "status": "pending",
        "error_code": ""
      },
      "trial": false,
      "collaborators": [
        ""
      ],
      "user_tags": [
        {
          "username": "",
          "x": 0,
          "y": 0
        }
      ],
      "alt_texts": [
        ""
      ],
      "audio_name": "",
      "share_to_feed": false,
      "comments_enabled": false,
      "mode": "auto",
      "reminded_at": "",
      "facebook": {
        "status": "pending",
        "page_name": "",
        "permalink": "",
        "published_at": "",
        "error_code": ""
      },
      "source": "app",
      "created_at": ""
    }
  ],
  "pagination": {
    "has_more": false,
    "next_cursor": ""
  }
}
```

### 401: Missing, unknown or revoked API key

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 403: The key lacks the required scope (`insufficient_scope`), the plan does not have this part of the API (`not_in_plan`), or Instagram is not enabled on the workspace (`instagram_not_enabled`, Instagram routes)

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```

### 422: Invalid parameter or body (also an invalid or expired `cursor`)

```json
{
  "error": {
    "code": "",
    "message": ""
  }
}
```


Source: https://docs.whatsetter.com/api-reference/operations/listinstagramposts/
