Cancel Build
Cancel a build that is queued or currently in progress.
Path Parameters
The project ID (e.g., prj_abc123).
The build ID (e.g., bld_xyz789).
Response
Returns 204 No Content on success.
Example
curl -X DELETE https://api.syntext.dev/v1/projects/prj_abc123/builds/bld_xyz789 \
-H "Authorization: Bearer stx_abc12345_..."
import { Syntext } from '@syntext/sdk'
const client = new Syntext('stx_abc12345_...')
await client.builds.cancel('prj_abc123', 'bld_xyz789')
from syntext import Syntext
client = Syntext("stx_abc12345_...")
client.builds.cancel("prj_abc123", "bld_xyz789")
Response
HTTP/1.1 204 No Content
Only builds with status: "queued" or status: "building" can be cancelled. Builds that have already completed or failed cannot be cancelled.
Error Responses
404 Not Found
Returned when the project or build does not exist.
{
"error": {
"code": "not_found",
"message": "Build or project does not exist"
}
}
409 Conflict
Returned when the build cannot be cancelled because it has already completed or failed.
{
"error": {
"code": "conflict",
"message": "Build has already completed or failed"
}
}