/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Publish Content

Publish Content

Publish a project written in Syntext as it is now.

POST/v1/projects/{projectId}/content/publishTry it
API key or session token

Build and deploy a project written in Syntext from its latest revision. Saves are drafts until you publish — this is the editor's Publish button.

Note

Any workspace member (session JWT), or an API key bound to this project with the build scope or higher. Each publish is a build, so it counts toward the workspace's monthly build quota.

Path Parameters

NameDescription
projectId:stringpathRequired
The project ID.

Request Body

NameDescription
message:stringbody
A note for the build, up to 500 characters.

Response — 202 Accepted

build is the queued build — follow it with Get Build. When it deploys, the revision counts as published and GET /content shows unpublishedChanges: false. A failed build leaves the site as it was.

To save and publish in one call, send publish: true with Save Pages instead.

Error Responses

402 Payment Required

USAGE_LIMIT_EXCEEDED — the workspace's builds for the month are used up. Your drafts are kept; publish again when the plan renews or after upgrading.

json
{
"error": {
"code": "USAGE_LIMIT_EXCEEDED",
"message": "Monthly build limit reached (100/100). Upgrade your plan for more builds.",
"current": 100,
"limit": 100
}
}

409 Conflict

•
nothing_to_publish — the project has no pages yet.
•
content_source_github / content_source_upload — the project isn't written in Syntext. See Errors on GitHub and CLI projects.
•
build_cancelled — the build was cancelled while its files were uploading.

413 Payload Too Large

content_too_large — the project is larger than 200 MB. Remove some files, then publish.

503 Service Unavailable

storage_unavailable — the files couldn't be stored for the build. Try again.

Was this page helpful? Yes No
Previous
Request
bashJavaScriptPythonGoRubyPHPJavaC#bash
curl -X POST https://api.syntext.dev/v1/projects/3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c/content/publish \
-H "Authorization: Bearer stx_A1b2C3d4_..." \
-H "Content-Type: application/json" \
-d '{ "message": "Publish the new quickstart" }'
Responseapplication/json
202Accepted
{
"data": {
"build": { "id": "b7d2e9a4-1c3f-4b8e-9a6d-2f5c8e1b4a70", "projectId": "3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c", "status": "queued" },
"revision": { "id": "5b0f9c1e-7a2d-4e8b-9c3f-1d6a8e2b4c70", "number": 14 },
"fileCount": 23
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext