URL: /code/apps/social · Id: `page:/code/apps/social`

# Social

> Posts from your own accounts on LinkedIn, X, Reddit, YouTube, TikTok and Instagram, published or scheduled by one call per site.

[Posts](https://startupbuilder.dev/business/nouns/post) from your own accounts on LinkedIn, X, Reddit, YouTube, TikTok and Instagram, published or scheduled by one call per site.

- **System:** [Social](https://startupbuilder.dev/systems/social)
- **Nouns:** 2
- **Verbs:** 6
- **Events:** 5

```text title="Run it · Ask"
Publish my post about the renewal-notice checklist from my LinkedIn.
```

```ts title="Run it · SDK"
import { $ } from 'startup-builder'

const result = await $.try.Post.publish({ post: 'post_Lk4vR8sQ2m' })
```

```json title="Run it · Response"
{
  "api": "https://api.sb/leaseline.app",
  "post": {
    "$id": "https://api.sb/leaseline.app/posts/post_Lk4vR8sQ2m",
    "$type": "Post",
    "handle": "https://api.sb/leaseline.app/handles/handle_Li9fB3wE6y",
    "format": "text",
    "status": "published",
    "claims": [
      {
        "says": "Leaseline sends every renewal notice 60 days out, per owner.",
        "record": "https://api.sb/leaseline.app/offers/offer_Ls1mP4qR8v"
      }
    ],
    "outside": null,
    "reach": null
  },
  "action": {
    "operation": "Post.publish",
    "mode": "try",
    "status": "done"
  }
}
```

## Nouns
| Noun | What it is |
| --- | --- |
| [account](https://startupbuilder.dev/business/nouns/handle) | An account is an account or name a startup or Brand holds on an outside platform, bound to an Integration credential. |
| [Post](https://startupbuilder.dev/business/nouns/post) | A Post is something an account publishes, such as a thread or a short video, with the reach and replies it earns. |

## Properties
The hub defines each Noun’s core Properties; Social adds the ones a sale needs.

### Handle
| Property | Type | What it holds | Defined by |
| --- | --- | --- | --- |
| `venue` | `string` | The venue it lives on, by id. | The hub |
| `name` | `string` | The name as the platform shows it, such as `@example`. | The hub |
| `shared` | `boolean` | True for a Studio account shared across sibling startups; every Post names the startup it speaks for. | The hub |
| `agent` | `boolean` | True when an Agent runs it; its bio says so. | The hub |
| `integration` | `integration` | The Integration credential it publishes through. | The hub |
| `followers` | `integer` | As the site reports it, read daily. | Social |
| `cadence` | `string` | How often it posts, such as three a week on LinkedIn. | Social |

### Post
| Property | Type | What it holds | Defined by |
| --- | --- | --- | --- |
| `format` | `string` | The venue’s format, such as `shortVideo` or `thread`. | The hub |
| `publishAt` | `datetime` | When it goes out. | The hub |
| `status` | `string` | Where it stands; a withdrawn Post is kept with its reach and replies. | The hub |
| `claims` | `json` | The facts it states, each resolving to a record. | The hub |
| `reach` | `integer` | How many people saw it, as the venue reports. | The hub |
| `handle` | `Handle` | The account it goes out from, which picks its site and format. | Social |
| `replies` | `integer` | Comments and replies, each one a chance to answer as you. | Social |
| `engagers` | `Prospect[]` | The people who reacted or commented, read by `Prospect.find` with `kind: engager`. | Social |

## Lifecycle
Every move names the Verb that makes it, or the Event it waits on.

### Post
| State | What it means | Moves to |
| --- | --- | --- |
| `draft` (first) | Written and not on its account’s calendar. | `scheduled` by [`Post.schedule`](/code/apps/social/schedule); `published` by [`Post.publish`](/code/apps/social/publish) |
| `scheduled` | On its account’s calendar for `publishAt`. | `published` by [`Post.publish`](/code/apps/social/publish) |
| `published` | Live on its venue, earning reach and replies. | `withdrawn` by [`Post.withdraw`](https://startupbuilder.dev/business/nouns/post/withdraw) |
| `withdrawn` | Taken down from its venue, with its record, reach and replies kept. | None: it ends here. |

## Verbs
| Verb | What it does | Approval | On each site |
| --- | --- | --- | --- |
| [`Post.publish`](/code/apps/social/publish) | Puts a Post live from your own account on one site, once every claim it makes reads from a live record. | Goes out on its own | Facebook, Google Business Profile, Hacker News, Instagram, LinkedIn, Reddit, TikTok, X, YouTube |
| [`Post.schedule`](/code/apps/social/schedule) | Puts a drafted Post on your account’s calendar for a set minute, such as 12:01 a.m. Pacific on launch day. | Runs on its own | Facebook, Instagram, Product Hunt, TikTok, YouTube |
| [`Post.withdraw`](https://startupbuilder.dev/business/nouns/post/withdraw) | Takes a published Post down from its site and keeps its record, reach and replies. | Runs on its own | X, YouTube |
| [`Handle.connect`](/code/integrations/calls/connect-handle) | Ties your account on a site, such as your LinkedIn or X handle, to the Integration it posts through. | Runs on its own | None. |
| [`Post.create`](https://startupbuilder.dev/business/nouns/post/create) | Saves a Post as a draft for one account, with its format and the claims it makes. | Runs on its own | None. |
| [`Post.update`](https://startupbuilder.dev/business/nouns/post/update) | Changes a draft or scheduled Post before it goes out. | Runs on its own | None. |

## Events
| Event | Emitted by |
| --- | --- |
| `Post.published` | [`Post.publish`](/code/apps/social/publish) |
| `Post.scheduled` | [`Post.schedule`](/code/apps/social/schedule) |
| `Post.withdrawn` | [`Post.withdraw`](https://startupbuilder.dev/business/nouns/post/withdraw) |
| `Handle.connected` | [`Handle.connect`](/code/integrations/calls/connect-handle) |
| `Post.created` | [`Post.create`](https://startupbuilder.dev/business/nouns/post/create) |

A [Trigger](https://startupbuilder.dev/business/nouns/trigger) can start a Workflow on any of them, and a Watch delivers each to your endpoint, signed ([Events and webhooks](/code/events)).

## Who operates it
| Part | Social |
| --- | --- |
| Accountable | [Content lead](https://startupbuilder.dev/agents/marketing/content-lead) |
| Also calls its Verbs | [Marketing lead](https://startupbuilder.dev/agents/marketing/marketing-lead), [Founder](https://startupbuilder.dev/agents/founding/founder), [Partner Manager](https://startupbuilder.dev/agents/sales/partner-manager) |
| Seat | An agent holds each seat until you seat a person in it. |
| Asks you first | None of its Verbs: each runs within its seat’s Limits |

## Integrations
[LinkedIn](/code/integrations/linkedin) · [X account](/code/integrations/x) · [Reddit](/code/integrations/reddit) · [Hacker News](/code/integrations/hacker-news) · [Product Hunt](/code/integrations/product-hunt) · [YouTube](/code/integrations/youtube) · [TikTok](/code/integrations/tiktok) · [Instagram](/code/integrations/instagram) · [Facebook](/code/integrations/facebook)

## Import and export
| Direction | What | How |
| --- | --- | --- |
| Import | Your accounts and their past posts | `Handle.connect` per account; past posts come in as published Posts with their reach |
| Export | Every Post, its reach and replies | `Collection.export` |

## Example
**One idea, posted where its buyers read.**

1. `Content.draft` writes a LinkedIn post from a reply that said “renewals keep slipping”.
2. `Post.schedule` puts it on Dana’s LinkedIn for Tuesday at 8:30 Central.
3. It goes out by `Post.publish` once its one claim, 64 units tracked in Leaseline, reads from a live record.
4. Eleven people comment. `Prospect.find` with `kind: engager` lists them for the next first touch.