Skip to content
developers
Open TestCollab

Create a build

POST/builds

Creates a new build

Use resource IDs from your own project. Keep the API token in your server or CI environment.

example.ts
import { createConfiguration, BuildsApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);
const api = new BuildsApi(config);
const result = await api.addBuild({
"buildPayload": {
"version": "example",
"project": 123
}
});
console.log(result);
Field Type Required Description
version string Yes Human-facing version identifier of the software the tests run against. Stored trimmed, and must contain at least one letter or number — a value made only of whitespace or punctuation (” “, “-”, “.”) is rejected with a 400 ().
environment string No Free-form environment name (e.g. Production, Staging, UAT). Optional — omit the key to leave it unchanged, or send an empty string to clear it. Any other value is stored trimmed and must contain at least one letter or number ().
release_date string No —
notes string No —
release_notes_url string No —
source string No How the build was created. Defaults to manual when omitted. Values: manual, ci.
vcs_provider string No —
ci_provider string No —
commit_sha string No —
branch string No —
tag string No —
repo_url string No —
commit_url string No —
build_number string No —
build_url string No —
external_ref string No —
metadata object No Provider-specific fields
release number No Release ID to assign this build to manually (optional; send null to unlink). A manual assignment overrides pattern auto-matching ().
project number Yes —

200 — Created build

Field Type Required Description
id number Yes —
version string Yes —
environment string No —
source string Yes Values: manual, ci.
release_date string No —
created_at string No —
Illustrative response
{
"id": 123,
"version": "example",
"environment": "example",
"source": "manual",
"release_date": "example",
"created_at": "example"
}
Status Meaning
400 Bad input parameter
401 Unauthorized
403 Forbidden
500 Internal server error