> ## Documentation Index
> Fetch the complete documentation index at: https://vetta.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Social

> Activate identity-owned social accounts and publish text posts with the TypeScript SDK.

```ts theme={"system"}
const workspace = await client.social.activate(identityId)
const portal = await client.social.portal(identityId, {
  redirect_url: "https://app.example.com/social/done", // optional; defaults to the persona's studio screen
  platforms: ["linkedin", "x"],
})
```

After the account owner visits `portal.url`, reconcile the provider's current state:

```ts theme={"system"}
const accounts = await client.social.accounts(identityId)
```

Publish immediately or include `scheduled_at`:

```ts theme={"system"}
const post = await client.social.createPost(identityId, {
  content: "We shipped it.",
  platforms: ["linkedin", "x"],
  media_urls: ["https://cdn.example.com/launch.jpg"], // public URLs
  file_ids: ["fil_262tzfys51n955rn6d1wdchyg7"], // stored files, signed and fetched once
})

const current = await client.social.getPost(identityId, post.id)
```

Pass `ai_generated: true` to label a post: each network's own AI label where it has one, and
`#AIgenerated` at the end of the caption. Labelling is opt-in; without it a post is unlabelled
([AI-generated posts](https://vetta.sh/docs/api/social.md#ai-generated-posts)).

Every post the company files, across personas — waiting on a person, scheduled, posted with its
latest numbers, or failed:

```ts theme={"system"}
const waiting = await client.social.listPosts({ status: "pending" })
for (const post of waiting.data) {
  // Allow it exactly as filed, or deny it with a reason and the agent files it again.
  await client.sessions.confirmTool(post.session_id!, { tool_call_id: post.tool_call_id!, decision: "allow" })
}
```

See the [Social API](https://vetta.sh/docs/api/social.md) for supported platforms, scopes, states, and pricing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.