# Change a planned Instagram post

`PATCH https://app.whatsetter.com/api/v1/instagram/posts/{id}`

Changes the caption, the time (`publish_at`, an instant; null =
now), the first comment (null removes it), the comment automation
(null removes it), the trial setting, the options
(`collaborators`, `user_tags`, `audio_name`, `share_to_feed`,
`comments_enabled`; each one sent replaces its value), `facebook` or `mode` of a post
still waiting for its time. Its media (and their alt texts) stay. A post already on its way to Instagram
answers `409 post_already_started`, one already published `409
post_already_published`; a time already past is refused (`422`).
`publish_at: null` publishes it within a minute and `facebook: true`
adds a public post on the Page. Switching to `mode: remind` (or
sending `remind_member_id`) names the member reminded, as on create.
Requires scope `instagram:write`.

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `caption` | string | no |  |
| `publish_at` | string | no |  |
| `first_comment` | string | no |  |
| `automation` | object | no |  |
| `trial` | boolean | no |  |
| `collaborators` | array | no |  |
| `user_tags` | array | no |  |
| `audio_name` | string | no |  |
| `share_to_feed` | boolean | no |  |
| `comments_enabled` | boolean | no |  |
| `facebook` | boolean | no |  |
| `mode` | auto \| remind | no |  |
| `remind_member_id` | string | no | mode remind: the team member reminded (`GET /team/members`). |

```json
{
  "publish_at": "2027-01-13T18:00:00Z"
}
```

## Example request

```bash
curl --request PATCH \
  --url 'https://app.whatsetter.com/api/v1/instagram/posts/{id}' \
  --header 'Authorization: Bearer ws_live_…'
  --header 'Content-Type: application/json' \
  --data '{"publish_at":"2027-01-13T18:00:00Z"}'
```

## Responses

### 200: Changed

```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": ""
  }
}
```

### 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": ""
  }
}
```

### 404: Resource not found in this workspace

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

### 409: The post is already on its way to Instagram (`post_already_started`) or already published (`post_already_published`); or, switched back to `mode: auto`, the account must be reconnected to publish (`instagram_reconnect_required`); or the Facebook Page is missing or does not allow publishing (`facebook_page_required`, `facebook_reconnect_required`, `facebook_permission_required`).

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

### 422: `validation_error`, or `no_reminder_recipient` (mode remind and nobody of the workspace to remind).

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

### 503: `facebook` or the remind mode is not available on this workspace yet (`instagram_publishing_unavailable`).

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


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