> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a blueprint's contents and/or position

> Partial update for a single blueprint. Does NOT auto-trigger a build.

Fields honored:

- ``contents`` — writes a new YAML version for the blueprint.
- ``position`` — sets the repo-tier blueprint's execution position.
  Returns ``400`` on an org-tier blueprint (those have no position).

Returns ``400`` when the body is empty.

## Permissions

Requires a service user 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.


## OpenAPI

````yaml /v3-openapi.yaml PATCH /v3beta1/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}
openapi: 3.1.0
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}:
    patch:
      tags:
        - snapshot_setup
      summary: Update a blueprint's contents and/or position
      description: |-
        Partial update for a single blueprint. Does NOT auto-trigger a build.

        Fields honored:

        - ``contents`` — writes a new YAML version for the blueprint.
        - ``position`` — sets the repo-tier blueprint's execution position.
          Returns ``400`` on an org-tier blueprint (those have no position).

        Returns ``400`` when the body is empty.
      operationId: >-
        update_org_blueprint_v3beta1_organizations__org_id__snapshot_setup_blueprints__blueprint_id__patch
      parameters:
        - in: path
          name: blueprint_id
          required: true
          schema:
            title: Blueprint Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrgBlueprintBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    UpdateOrgBlueprintBody:
      description: |-
        Partial update for an org- or repo-tier blueprint.

        Any subset of fields may be provided. Fields not set are left alone.
        Providing ``position`` on an org-tier blueprint returns ``400`` — only
        repo-tier blueprints have a position. Does NOT trigger a build.
      properties:
        contents:
          anyOf:
            - type: string
            - type: 'null'
          description: If set, replaces the blueprint's YAML body with a new version.
          title: Contents
        position:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            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.
          title: Position
      title: UpdateOrgBlueprintBody
      type: object
    Blueprint:
      description: |-
        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``.
      properties:
        blueprint_id:
          title: Blueprint Id
          type: string
        created_at:
          title: Created At
          type: integer
        repo_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Name
        type:
          enum:
            - enterprise
            - org
            - repo
          title: Type
          type: string
        updated_at:
          title: Updated At
          type: integer
      required:
        - blueprint_id
        - type
        - repo_name
        - created_at
        - updated_at
      title: Blueprint
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````