Skip to main content
POST
Pin the org to a specific successful build

Permissions

Requires a service user with the ManageOrgSnapshots permission at the organization level.

Behavior

Pins the organization to a specific successful build. New sessions will use this pinned snapshot until it is unpinned.

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Path Parameters

build_id
string
required
org_id
string
required

Organization ID (prefix: org-)

Example:

"org-abc123def456"

Body

application/json

POST /builds/{id}/pin body. Empty per spec.

Response

Successful Response

Public Build resource shape — opaque "did this succeed yet?" view.

Per spec, no platform/snapshot/per-job introspection is exposed. Future additions (triggered_by_repo, build metadata, etc.) are additive.

build_id
string
required
completed_at
integer | null
required
created_at
integer
required
pinned
boolean
required
started_at
integer | null
required
status
enum<string>
required
Available options:
pending,
running,
succeeded,
failed,
cancelled
trigger
enum<string> | null
required
Available options:
manual,
auto
triggered_by_user_id
string | null
required
updated_at
integer
required