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

# Post.withdraw

> Takes a published Post down from its Venue and keeps its record, reach and replies.

POST https://api.sb/&#123;your-domain&#125;/posts/&#123;post&#125;/withdraw

Takes a published [Post](https://startupbuilder.dev/business/nouns/post) down from its Venue and keeps its record, reach and replies.

- **Action class:** None
- **Approval:** Runs on its own
- **Emits:** `Post.withdrawn`
- **Venues:** X, YouTube
- **Price:** Free

```text title="Run it · Ask"
Take down yesterday’s LinkedIn post: the renewal-notice number in it was wrong.
```

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

const result = await $.try.Post.withdraw({ post: 'https://api.sb/leaseline.app/posts/post_Lk4vR8sQ2m', reason: 'The renewal-notice figure was wrong.' })
```

```json title="Run it · Response"
{
  "api": "https://api.sb/leaseline.app",
  "post": {
    "$id": "https://api.sb/leaseline.app/posts/post_Lk4vR8sQ2m",
    "$type": "Post",
    "status": "withdrawn"
  },
  "action": {
    "operation": "Post.withdraw",
    "mode": "try",
    "status": "done"
  }
}
```

Its Inputs, Outputs, Effects and guards quote [the hub’s `Post.withdraw`](https://startupbuilder.dev/business/nouns/post/withdraw); this page adds what each Venue honors, its limits and a worked call. It is one of the [Verbs](https://startupbuilder.dev/business/nouns/verb) of [Social](/code/apps/social#verbs).

## Inputs
| Name | Type | Default | Meaning |
| --- | --- | --- | --- |
| `post` | `Post` | Required | The Post to take down. |
| `reason` | `text` | Required | Why it comes down. |

## Outputs
| Field | Type | What `null` means |
| --- | --- | --- |
| `post` | `Post` | Never null: the withdrawn Post. |

## Effects
**Action class**

None: no approval rule names it, so it runs within its seat’s Permissions and Limits

**Modes**

- `try`: Runs every check and returns the record as it would be; nothing is stored.
- `send`: Returns a pending Action at once; `Post.withdrawn` fires when it is done.
- `do`: Waits for the Action to finish and returns the record.

**Idempotency**

Only with a key: the same `Idempotency-Key` and input return the first Action, and the same key with other input returns `409`.

**Saved or shared**

The Post is saved as the call leaves it, with the Action that changed it.

**Emits**

`Post.withdrawn` with `{ post }`

**Performed by**

[Content lead](https://startupbuilder.dev/agents/marketing/content-lead)

**Price**

Free on your own account: the platform charges nothing for the call.

## On each Venue
| Venue | Formats |
| --- | --- |
| [X](/code/integrations/x#limits) | Standard post, Promoted post |
| [YouTube](/code/integrations/youtube#limits) | Video |

Each Venue’s caps, review and rate limits are on its integration page, linked from its row. A field marked Not sent is one that Venue has no place for; the call never fails on it.

## What try does
| Account | What try does |
| --- | --- |
| [X account](/code/integrations/x#try) | Renders each post at X’s weighted count, with links at 23 characters, and returns the price X would bill; nothing is posted and nothing is billed. |
| [YouTube](/code/integrations/youtube#try) | Checks the file, title, description and tags against YouTube’s limits and returns the video page as it will read; nothing uploads and no quota is spent. |

## Refuses when
The hub sets no guard of its own on this call: it refuses only on the shared checks every write meets (a missing record, a Permission the seat lacks).

Through a connected account it can also meet [the shared account refusals](/code/refusals#accounts).

## When it waits
Returns in one response; nothing waits.

## Example
In `send` mode the call returns its pending Action at once, and `Post.withdrawn` delivers the result.

**Ask**

```text
Take down yesterday’s LinkedIn post: the renewal-notice number in it was
wrong.
```

**API**

```bash
curl -X POST "https://api.sb/leaseline.app/posts/post_Lk4vR8sQ2m/withdraw?mode=send" \
  -H "Authorization: Bearer $SB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "The renewal-notice figure was wrong."
}'
```

**CLI**

```bash
npx startup-builder do Post.withdraw --send --data '{
  "reason": "The renewal-notice figure was wrong."
}'
```

`--send` returns the pending Action at once.

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "mode": "send",
    "code": "return await $.Post.withdraw({ reason: 'The renewal-notice figure was wrong.' })"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const result = await $.send.Post.withdraw({
  post: 'https://api.sb/leaseline.app/posts/post_Lk4vR8sQ2m',
  reason: 'The renewal-notice figure was wrong.',
})
```


```json title="Response, in send mode"
{
  "mode": "send",
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_Sd3kQ9vT2w",
    "operation": "Post.withdraw",
    "status": "pending",
    "reason": "running"
  }
}
```

To retry, send the same `Idempotency-Key`: the retry returns the first answer for $0. A new key reads again.

## Used by
- **Integrations:** [X account](/code/integrations/x) · [YouTube](/code/integrations/youtube)

## Related
[`Post.publish`](/code/apps/social/publish) · [`Post.schedule`](/code/apps/social/schedule) · [`Post.create`](/code/apps/social/create) · [`Post.update`](/code/apps/social/update)