---
docId: doc_938fe197390f4609b6a1e8e1661e6825
title: List posts
description: "Read posts with comments and manage their assigned agent."
api:
  group: publicaciones
  auth: bearer
  operations:
    - operationId: listPosts
      method: GET
      path: /v1/posts
      postmanName: List Posts
    - operationId: getPost
      method: GET
      path: '/v1/posts/{postId}'
      postmanName: Get a Post
    - operationId: updatePost
      method: PATCH
      path: '/v1/posts/{postId}'
      postmanName: Update a Post
---

<script>
  import { Ways, Note, Collapsible } from '$lib/components';
</script>

# List posts

List posts with comments, ordered by most recent activity. You can also get a post by id or change the agent that handles it.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl "https://api.platic.ai/v1/posts?platform=instagram" \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
const { data: posts } = await platic.posts.list({ platform: "instagram" });
```

</Ways.Way>
</Ways>

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `workspace` | string | Only if the credential covers several workspaces: the workspace you read. It is required there | — |
| `limit` | integer | Posts per page, from 1 to 100. Default: `25` | — |
| `pageToken` | string | `nextPageToken` from the previous response | — |
| `channelId` | string | Comments channel (`igc-…` or `fbc-…`). Cannot be combined with `platform` | — |
| `platform` | string | `instagram` or `facebook` | — |
| `startDate` | string | Activity since this date (ISO 8601) | — |
| `endDate` | string | Activity until this date (ISO 8601) | — |
| `sortDirection` | string | `desc` (default) or `asc`, by last activity | — |

## Response

```json
{
  "status": "success",
  "data": [
    {
      "id": "conv_post_001",
      "externalId": "17912345678901234",
      "platform": "instagram",
      "channelId": "igc-17841400000000000",
      "title": "New autumn collection 🍂",
      "permalink": "https://www.instagram.com/p/Cxyz/",
      "contactName": "Acme",
      "media": {
        "type": "IMAGE",
        "productType": "FEED",
        "url": "https://scontent.cdninstagram.com/…",
        "thumbnailUrl": null
      },
      "publishedAt": "2026-10-20T15:00:00.000Z",
      "operation": "automatic",
      "paused": false,
      "agentId": null,
      "status": "active",
      "topic": "Pricing",
      "tags": [],
      "owners": [],
      "openThreadsCount": 3,
      "assistanceThreadsCount": 1,
      "cases": {
        "open": true,
        "openCount": 1,
        "openIds": ["Es9mK2nB4vC6xZ8lP0qW"],
        "topPriority": "normal",
        "oldestOpenAt": "2026-10-21T17:40:00.000Z",
        "releasedAt": null,
        "untakenCount": 1,
        "attention": true
      },
      "unreadCommentsCount": 5,
      "participantsCount": 12,
      "stats": { "reactions": 240, "comments": 31, "shares": 4 },
      "lastComment": {
        "commentId": "17890000000000001",
        "text": "Do you have size M?",
        "authorName": "Ana",
        "role": "user",
        "at": "2026-10-21T18:22:00.000Z"
      },
      "creationDate": "2026-10-20T15:05:00.000Z",
      "lastUpdate": "2026-10-21T18:22:00.000Z"
    }
  ],
  "nextPageToken": null
}
```

`data` has the posts of this page and `nextPageToken` the token of the next one (`null` on the last).

<Collapsible summary="Field descriptions">

| Field | Description |
|-------|-------------|
| `id` | Post ID in Platica. Use it as `postId` |
| `externalId` | Post ID at Meta |
| `platform` | `instagram` or `facebook` |
| `channelId` | The account's comments channel |
| `title` | Text of the post |
| `operation` | Agent control: `automatic` (answers) or `supervised` (does not answer) |
| `paused` | `true` when a person paused the agent on this post |
| `agentId` | The post's own agent. `null` = the channel's agent answers |
| `openThreadsCount` | Threads waiting for a reply |
| `assistanceThreadsCount` | Threads where the agent asked for help |
| `cases` | Summary of the cases of all its threads. See [the `cases` summary](/api-reference/cases#the-cases-summary) |
| `unreadCommentsCount` | Unread comments in the inbox |
| `stats` | Reactions, comments and shares according to Meta |
| `lastComment` | The most recent comment |

</Collapsible>

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | A parameter is not valid (`details.issues` says which), `channelId` comes together with `platform` or is not a comments channel, the `pageToken` is not from this query, or the credential covers several workspaces and `workspace` is missing |
| `401` | `UNAUTHENTICATED` | The credential is missing or not valid |
| `403` | `FORBIDDEN` | The credential does not have the Conversations module in that workspace |

## Get a post

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl https://api.platic.ai/v1/posts/$POST_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
const post = await platic.posts.get("post_123");
```

</Ways.Way>
</Ways>

Answers `{ "status": "success", "data": { … } }`, with the post in `data` and the same shape as a list element.

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | The credential covers several workspaces and `workspace` is missing |
| `404` | `NOT_FOUND` | The id is not a post of the workspace |

## Update a post

Pause or resume the agent for the entire post, or assign a different agent from the channel's.

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X PATCH https://api.platic.ai/v1/posts/$POST_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "operation": "supervised" }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.posts.update("post_123", { operation: "supervised" });
```

</Ways.Way>
</Ways>

### Request body

Send at least one of the two fields.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `operation` | string | — | `supervised` pauses the agent; `automatic` resumes it |
| `agentId` | string \| null | — | Agent that answers on this post. `null` goes back to the channel's agent |

```json
{
  "operation": "supervised"
}
```

Answers the updated post in `data`, with `message: "Post updated"`.

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | The body is empty, has a field that is not accepted, or the credential covers several workspaces and `workspace` is missing |
| `404` | `NOT_FOUND` | The id is not a post of the workspace |

See [errors](/api-reference/posts#errors) for the rest of the codes in this section.

## Notes

<Note type="tip">

Resuming only applies to new comments. To answer comments received during the pause, use [`send-to-agent`](/api-reference/posts/reply#send-a-thread-to-the-agent).

</Note>
