> ## 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.

# 创建企业层级蓝图

> 创建唯一的企业层级蓝图。

如果此企业已存在蓝图，则返回 409。

<div id="permissions">
  ## 权限
</div>

需要拥有企业级 `ManageAccountSnapshots` 权限的服务用户。

<div id="behavior">
  ## 行为
</div>

创建企业级蓝图。蓝图定义了 Devin 会话的声明式环境配置。修改蓝图后不会自动触发构建——你必须显式调用 builds 端点。


## OpenAPI

````yaml zh/v3-openapi.yaml POST /v3beta1/enterprise/snapshot-setup/blueprints
openapi: 3.1.0
info:
  description: 采用 Service User 身份验证和 RBAC 的 Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/enterprise/snapshot-setup/blueprints:
    post:
      tags:
        - snapshot_setup
      summary: 创建企业层级蓝图
      description: |-
        创建唯一的企业层级蓝图。

        如果此企业已存在蓝图，则返回 409。
      operationId: >-
        create_enterprise_blueprint_endpoint_v3beta1_enterprise_snapshot_setup_blueprints_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnterpriseBlueprintBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
          description: 成功响应
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
components:
  schemas:
    CreateEnterpriseBlueprintBody:
      properties:
        contents:
          anyOf:
            - type: string
            - type: 'null'
          description: 新蓝图的 YAML 正文。省略时将创建一个空白蓝图。
          title: Contents
      title: CreateEnterpriseBlueprintBody
      type: object
    Blueprint:
      description: |-
        公开的 ``Blueprint`` 资源结构。

        注意：``type`` 枚举未来可能会扩展；客户端 MUST 以优雅方式
        处理未知值。YAML 内容需通过
        ``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: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````