> ## 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)
```

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