Post routes: publish, schedule, withdraw
The Post Verbs publish, schedule, withdraw as api.sb routes, with inputs, result, refusals and an example.
Reference for Post, one group of Post routes.
Post.publish
Publish sends a Post out through its Handle once every claim it states resolves to a live record. Verb page.
POST /{namespace}/ posts/ {post}/ publishPath: post. Emits Post.published.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
post | Post | required | The Post to publish. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
post | Post | required | The published Post. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ posts/ post_HiXn57rBdP/ publish \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"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.
POST /{namespace}/ posts/ {post}/ schedulePath: post. Body, as JSON: the other inputs. Emits Post.scheduled.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
post | Post | required | The drafted Post. |
at | datetime | required | When it goes out. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
post | Post | required | The scheduled Post. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
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"}'{
"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.
POST /{namespace}/ posts/ {post}/ withdrawPath: post. Body, as JSON: the other inputs. Emits Post.withdrawn.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
post | Post | required | The Post to take down. |
reason | text | required | Why it comes down. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
post | Post | required | The withdrawn Post. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
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"}'{
"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"
}
}