### Requirements

- **Authentication**: Bearer API token

- **Scope**: `posts`

- **Headers**:
  - `Authorization: Bearer-API YOUR_API_KEY`
  - `Publer-Workspace-Id: YOUR_WORKSPACE_ID`

### Endpoint

Updates an existing post by ID. The behavior differs depending on whether the post is scheduled or already published.

```plaintext
PUT /api/v1/posts/:id
```

### Parameter Reference

| Parameter | Type   | Required | Description                                              |
|-----------|--------|----------|----------------------------------------------------------|
| text      | string | Yes      | The main content text of the post                        |
| title     | string | No       | Title for the post (used in some networks)               |

### Special Cases

When the post is published, you can only update network-specific params.

| Network         | Updatable Fields                                   |
|-----------------|----------------------------------------------------|
| LinkedIn        | • Text content                                     |
| YouTube         | • Title (limited to 100 characters)               |
|                 | • Text/description (limited to 5000 characters)   |
| Google Business  | • Text content (called "summary" in Google's API, limited to 1500 characters) |
| Facebook        | • Text content (both description and message fields) |
|                 | • Title (only for video posts, in the name field)  |
| WordPress       | • Title                                           |
|                 | • Content (HTML converted)                         |
| Telegram        | • For status updates and links: Text content      |
| Mastodon        | • Text content                                     |
|                 | • Title                                           |

**Networks Not Supporting Published Post Updates**

For the following networks, only labels can be updated in Publer's database after a post is published:

- Twitter/X (polls cannot be edited after publishing)
- Pinterest
- Instagram
- Threads
- Bluesky

### Recurring Posts

If the post is a recurring post, the update will be applied to all future child posts in the recurring series. Already published child posts will not be affected.

### Notes

- When updating a post that requires approval, a notification will be sent to the appropriate workspace members.
- Changes to published posts will be reflected both in Publer's database and on the social media platform (for supported networks).

### Update Post

```plaintext
PUT /api/v1/posts/{id}
```

**Authorization**

- Bearer API token

**Path parameters**

| Parameter | Type   | Required | Description                              |
|-----------|--------|----------|------------------------------------------|
| id        | string | Required | ID of the post to update                 |

**Header parameters**

| Parameter                  | Type   | Required | Description                          |
|---------------------------|--------|----------|--------------------------------------|
| Publer-Workspace-Id       | string | Required | ID of the workspace containing the post |

**Body**

```json
{
  "post": {
    "text": "text",
    "title": "text"
  }
}
```

**Responses**

| Code | Description                                    | Content Type      |
|------|------------------------------------------------|-------------------|
| 200  | Post updated successfully                       | application/json   |
| 401  | Unauthorized                                    | application/json   |
| 403  | Forbidden - You cannot update a post          | application/json   |
| 422  | Unprocessable Entity - Error message           | application/json   |
