Skip to main content
PATCH
Update a blueprint's contents, position, source and/or commit-build settings

Permissions

Requires a service user or personal access token with the ManageRepoBlueprints permission at the organization level. Creating or updating org-tier blueprints requires the ManageOrgSnapshots permission.

Behavior

Updates a blueprint’s contents and/or position. Does not auto-trigger a build.

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Path Parameters

blueprint_id
string
required
org_id
string
required

Organization ID (prefix: org-)

Example:

"org-abc123def456"

Body

application/json

Partial update for an org- or repo-tier blueprint.

Any subset of fields may be provided. Fields not set are left alone. Providing position, source or a commit-build setting on an org-tier blueprint returns 400 — only repo-tier blueprints have them. Does NOT trigger a build.

build_on_default_branch_commit
boolean | null

If set, turns building the environment on each push to the default branch on or off. Only accepted on the root blueprint of a github.com repo. Every such push queues a build.

contents
string | null

If set, replaces the blueprint's YAML body with a new version.

position
integer | null

If set, updates the execution position of this repo-tier blueprint. Positions are not required to be unique; ties are broken arbitrarily by the server when sorting for execution.

report_check_runs
boolean | null

If set, turns reporting each commit build as a GitHub check run on or off. Enabling it requires 'build_on_default_branch_commit' to be on.

source
enum<string> | null

If set, switches the repo's blueprint source. Only accepted on the repo's root blueprint (scoped blueprints inherit it). 'git' pulls .devin/blueprint.yaml from the default branch (404 if absent) and cannot be combined with 'contents'; 'database' keeps the current YAML (or 'contents', if given) and stops syncing from the repo. No-op when the blueprint is already in that mode.

Available options:
git,
database

Response

Successful Response

Public Blueprint resource shape.

Note: the type enum may grow in the future; clients MUST gracefully handle unknown values. YAML contents are fetched separately via GET /blueprints/{id}/contents.

blueprint_id
string
required
created_at
integer
required
repo_name
string | null
required
type
enum<string>
required
Available options:
enterprise,
org,
repo
updated_at
integer
required
build_on_default_branch_commit
boolean | null

Whether each push to the repo's default branch builds the environment. Null unless this is a repo's root blueprint.

report_check_runs
boolean | null

Whether each commit build is reported as a GitHub check run on the commit. Null unless this is a repo's root blueprint.

source
enum<string> | null

Where the YAML is authored: 'git' (synced from .devin/blueprint.yaml in the repo) or 'database' (edited via the API/UI). Always null for enterprise- and org-tier blueprints.

Available options:
git,
database