# List posts

URL: https://docs.hanzo.ai/docs/openapi/social/get-social-posts

> Returns the org's posts — content, channel, status, scheduled time, media and timestamps — most-recently-updated first.

`GET /v1/social/posts`

> [Social →](https://docs.hanzo.ai/docs/openapi/social) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/social/posts` |
| **Method**    | `GET`                                  |
| **Operation** | `get_social_posts`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Returns the org's posts — content, channel, status, scheduled time,
media and timestamps — most-recently-updated first.

## Request

2 fields.

| Field    | In    | Type   | Required | Description                                                                   |
| -------- | ----- | ------ | -------- | ----------------------------------------------------------------------------- |
| `status` | query | string | —        | Status keeps only posts in one state — draft, scheduled, published or failed. |
| `limit`  | query | string | —        | Limit bounds the page, defaulting to 200 and capped at 1000.                  |

## Response

| Status    | Body               | Meaning |
| --------- | ------------------ | ------- |
| `200`     | social.socialPosts | ok      |
| `default` | problem-details    | refused |

`200` body — 12 fields.

| Field               | In   | Type                 | Always | Description                                                                                                                                                                                                                                                       |
| ------------------- | ---- | -------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data`              | body | social.socialPost\[] | —      | Data is the posts, most-recently-updated first, bounded by the limit.                                                                                                                                                                                             |
| `data[].accountId`  | body | string               | —      | AccountID / ExternalID / Error are server-managed publish results, set only by the publish path (never by a client update): the account a post was published through, the provider's returned external post id (for reconciliation), and the last failure reason. |
| `data[].channel`    | body | string               | —      | Channel is the network this post targets: x, facebook, instagram, linkedin, tiktok, youtube or threads.                                                                                                                                                           |
| `data[].content`    | body | string               | —      | Content is the post's text, bounded at 8192 characters.                                                                                                                                                                                                           |
| `data[].createdAt`  | body | integer (int64)      | —      | CreatedAt is when the post was created, as a unix timestamp in seconds.                                                                                                                                                                                           |
| `data[].error`      | body | string               | —      | Error is why the last publish attempt failed, verbatim and bounded.                                                                                                                                                                                               |
| `data[].externalId` | body | string               | —      | ExternalID is the id the network returned for the published post, which is what reconciles this row against the post on the network.                                                                                                                              |
| `data[].id`         | body | string               | —      | ID is the post's identifier, minted on create and the id every later call addresses it by.                                                                                                                                                                        |
| `data[].media`      | body | string\[]            | —      | Media is the post's attached media as a list of URLs (images today; the composer's URL field now, an S3 picker later, populate it).                                                                                                                               |
| `data[].scheduleAt` | body | integer (int64)      | —      | ScheduleAt is when the post is due, as a unix timestamp in SECONDS.                                                                                                                                                                                               |
| `data[].status`     | body | string               | —      | Status is the post's lifecycle state: draft, scheduled, published or failed.                                                                                                                                                                                      |
| `data[].updatedAt`  | body | integer (int64)      | —      | UpdatedAt is when the post row last changed, as a unix timestamp in seconds.                                                                                                                                                                                      |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo social posts list
```

**SDK**

**.ts**

```ts
import { Configuration, SocialApi } from 'hanzoai';

const api = new SocialApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getSocialPosts();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import SocialApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = SocialApi(client).get_social_posts()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.SocialAPI.GetSocialPosts(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, social_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = social_api::get_social_posts(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.SocialApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new SocialApi(client).getSocialPosts();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/social/posts \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **social** through the `social` tool, which names its 13 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_social_accounts"
         }
       }
     }'
```

---

[Social API](https://docs.hanzo.ai/docs/openapi/social) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
