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

# Enterprise レベルのプレイブックを作成します。

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

Enterprise 全体で `ManageAccountPlaybooks` 権限を持つサービスユーザーが必要です。


## OpenAPI

````yaml ja/v3-openapi.yaml POST /v3/enterprise/playbooks
openapi: 3.1.0
info:
  description: Service User 認証および RBAC に対応した Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/playbooks:
    post:
      tags:
        - playbooks
      summary: Enterprise レベルのプレイブックを作成します。
      operationId: handle_create_playbook_v3_enterprise_playbooks_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaybookCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookResponse'
          description: 成功時のレスポンス
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: バリデーションエラー
components:
  schemas:
    PlaybookCreateRequest:
      properties:
        body:
          title: Body
          type: string
        macro:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Playbook マクロ識別子。'!' で始まり、その後に 1
            文字以上の英字、数字、アンダースコア、またはハイフンが続く必要があります。例: '!my_macro' または '!my-macro'
          title: Macro
        structured_output_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            このプレイブックを使用するセッションが構造化出力として生成する JSON Schema（Draft 7）。最大
            64KB。自己完結型である必要があります（外部 $ref は使用不可）。
          title: Structured Output Schema
        title:
          title: Title
          type: string
      required:
        - title
        - body
      title: PlaybookCreateRequest
      type: object
    PlaybookResponse:
      properties:
        access_type:
          enum:
            - enterprise
            - org
          title: Access Type
          type: string
        body:
          title: Body
          type: string
        created_at:
          title: Created At
          type: integer
        created_by:
          title: Created By
          type: string
        macro:
          anyOf:
            - type: string
            - type: 'null'
          title: Macro
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        playbook_id:
          title: Playbook Id
          type: string
        structured_output_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Structured Output Schema
        title:
          title: Title
          type: string
        updated_at:
          title: Updated At
          type: integer
        updated_by:
          title: Updated By
          type: string
      required:
        - playbook_id
        - title
        - body
        - macro
        - created_by
        - updated_by
        - created_at
        - updated_at
        - access_type
        - org_id
      title: PlaybookResponse
      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

````