Delete a build
OpenAPI contract
- Method
- DELETE
- Path
/api/v1/builds/{taskId}- Security
- jwtBearer (bearer) OR automationKey (bearer)
- Response status
- 204 400 401 403 404 429 500
Request and response schemas
JSON
{
"requestBody": {},
"responses": {
"204": {
"description": "Build deleted",
"content": {}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"404": {
"description": "Requested build was not found",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"429": {
"description": "HTTP rate limit or API-key NCU usage limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/RateLimitError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}Delete an inactive task with a JWT or an nfy_ key carrying build:write. A project task additionally requires effective build:write capability on its project; a legacy or ad-hoc task uses its exact-owner fallback. The service removes managed task files as well as the task record. An active pending/running task, or a task whose worker has not stopped, must be cancelled and allowed to settle first.
Deletion also removes the backing output, so both authenticated artifact routes cease once cleanup completes. This is irreversible from the API; copy any required artifact before deleting it. A task outside the caller's project capability or exact-owner boundary is not deletable.