Skip to content

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.

Text
POST /{namespace}/posts/{post}/publish

Path: post. Emits Post.published.

Inputs

InputTypeRequiredDescription
postPostrequiredThe Post to publish.

Returns

OutputTypeRequiredDescription
postPostrequiredThe published Post.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
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.

Text
POST /{namespace}/posts/{post}/schedule

Path: post. Body, as JSON: the other inputs. Emits Post.scheduled.

Inputs

InputTypeRequiredDescription
postPostrequiredThe drafted Post.
atdatetimerequiredWhen it goes out.

Returns

OutputTypeRequiredDescription
postPostrequiredThe scheduled Post.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
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.

Text
POST /{namespace}/posts/{post}/withdraw

Path: post. Body, as JSON: the other inputs. Emits Post.withdrawn.

Inputs

InputTypeRequiredDescription
postPostrequiredThe Post to take down.
reasontextrequiredWhy it comes down.

Returns

OutputTypeRequiredDescription
postPostrequiredThe withdrawn Post.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
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"
  }
}