# Post routes: publish, schedule, withdraw

URL: /code/api/post/verbs · Id: `page:code/api/post/verbs`

> The Post Verbs publish, schedule, withdraw as api.sb routes, with inputs, result, refusals and an example.

Reference for [Post](/business/nouns/post), one group of [Post routes](/code/api/post).

### Post.publish
Publish sends a Post out through its Handle once every claim it states resolves to a live record. [Verb page](/business/nouns/post/publish?interface=api).

```text
POST /{namespace}/posts/{post}/publish
```

Path: `post`. Emits [`Post.published`](/business/events/Post.published).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `post` | [Post](/business/nouns/post) | Yes | The Post to publish. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `post` | [Post](/business/nouns/post) | Yes | The published Post. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/posts/post_HiXn57rBdP/publish \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "post": {
    "$id": "https://api.sb/leaseline.app/posts/post_HiXn57rBdP",
    "$type": "Post",
    "format": "Example format",
    "status": "draft"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Post.publish",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Post.schedule
Schedule puts a drafted Post on its Handle’s calendar for a set time. [Verb page](/business/nouns/post/schedule?interface=api).

```text
POST /{namespace}/posts/{post}/schedule
```

Path: `post`. Body, as JSON: the other inputs. Emits [`Post.scheduled`](/business/events/Post.scheduled).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `post` | [Post](/business/nouns/post) | Yes | The drafted Post. |
| `at` | `datetime` | Yes | When it goes out. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `post` | [Post](/business/nouns/post) | Yes | The scheduled Post. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/posts/post_HiXn57rBdP/schedule \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"at":"2026-10-22T12:00:00Z"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "post": {
    "$id": "https://api.sb/leaseline.app/posts/post_HiXn57rBdP",
    "$type": "Post",
    "format": "Example format",
    "status": "draft"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Post.schedule",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Post.withdraw
Withdraw takes a published Post down from its venue and keeps the record, its reach and its replies. [Verb page](/business/nouns/post/withdraw?interface=api).

```text
POST /{namespace}/posts/{post}/withdraw
```

Path: `post`. Body, as JSON: the other inputs. Emits [`Post.withdrawn`](/business/events/Post.withdrawn).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `post` | [Post](/business/nouns/post) | Yes | The Post to take down. |
| `reason` | `text` | Yes | Why it comes down. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `post` | [Post](/business/nouns/post) | Yes | The withdrawn Post. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/posts/post_HiXn57rBdP/withdraw \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Example reason"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "post": {
    "$id": "https://api.sb/leaseline.app/posts/post_HiXn57rBdP",
    "$type": "Post",
    "format": "Example format",
    "status": "draft"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Post.withdraw",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```