Skip to content

Add a status to a reported deployment: state (queued, in_progress, success, failure, error or inactive), description, environment_url (where it is served) and log_url (where its output can be read).

POST/repos/{owner}/{name}/deployments/{id}/statuses

The deployment takes its state, and any address it gives. A success with auto_inactive (true unless you say) makes the environment’s older successful deployments inactive. The commit’s deploy / <environment> check follows: pending while queued or in progress, then success, failure or error. A g1t.page build’s statuses come from the build and cannot be added to. Needs the Write role.

queued and in_progress set the commit’s deploy / <environment> check pending; success, failure and error settle it; inactive leaves it. A success makes the environment’s older successful deployments inactive unless auto_inactive is false. A g1t.page build (dpl_…) answers 409: its statuses come from the build.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: workflow with action create_deployment_status, and the same inputs
  • Scope: An access token needs deployments:write.
Name Type Required Description
owner string Yes The workspace that owns the repository.
name string Yes The repository’s name.
id string Yes The deployment’s id: dep_… for a reported one, dpl_… for a g1t.page build.

Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.

Name Type Required Description
state string Yes Where it is now. One of queued, in_progress, success, failure, error, inactive.
description string No A short note, at most 1,000 characters.
environment_url string No Where it is served, an http(s) address.
log_url string No Where its output can be read, an http(s) address.
auto_inactive boolean No On a success, make the environment’s older successful deployments inactive. True unless you say.
curl -X POST https://api.g1t.sh/repos/flagon-io/g1t/deployments/dep_01kq7z9a1c3e5g7j9m1p3r5t7v/statuses \
-H "Authorization: Bearer $G1T_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"state": "failure",
"description": "Smoke tests failed",
"log_url": "https://ci.example.com/pipelines/4182"
}'

A successful request answers 200 with:

{
"id": "dst_01kq7zc2e4g6j8m0p2r4t6v8x0",
"deployment_id": "dep_01kq7z9a1c3e5g7j9m1p3r5t7v",
"state": "failure",
"description": "Smoke tests failed",
"environment_url": null,
"log_url": "https://ci.example.com/pipelines/4182",
"creator": "flagon-io",
"created_at": "2026-10-06T21:44:58.020Z"
}

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
409 conflict The request conflicts with the current state.
422 invalid The input is not valid. message says which field and why.