Skip to main content
POST
Create an org- or repo-tier blueprint

Permissions

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

Behavior

Creates an org- or repo-tier blueprint. A blueprint defines the declarative environment configuration for Devin sessions. Mutating a blueprint does not auto-trigger a build — you must explicitly call the builds endpoint.
Blueprints do not exist independently of your environment configuration. Creating a blueprint with a repo_name also adds that repository to the environment — there is no separate endpoint to register the repo first. The repository is cloned into the environment on the next build, and indexing is kicked off for it.The reverse holds too: removing a repository from the environment (the Include in environment toggle in the UI) deletes every blueprint for that repo, including all of its workspace scopes.
The repository name must be one Devin can already access through your Git integration (for example owner/repo); an unknown or inaccessible repo returns 404 and no blueprint is created. If an active blueprint already exists for that repo and scope, the request returns 409 — use the update endpoint instead.

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Path Parameters

org_id
string
required

Organization ID (prefix: org-)

Example:

"org-abc123def456"

Body

application/json
contents
string | null

Optional initial YAML body for the blueprint. Not allowed with source='git' (contents come from the repo).

repo_name
string | null

If set, creates a repo-tier blueprint for that repository. If omitted, creates an org-wide (org-tier) blueprint.

source
enum<string> | null

Repo-tier only. 'git' reads .devin/blueprint.yaml (and its includes) from the repo's default branch and keeps the blueprint in sync with it; 'database' stores the YAML in Devin. Defaults to 'database' when omitted.

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