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

# アップロードされたプラグインのスキルを作成または置換します。

> 既存のプラグインに ``skills/{skill_name}/SKILL.md`` を書き込みます。

エンタープライズ内のアップロードされたプラグインでスキルを作成、または既存のスキルを置き換えます。ナレッジノート API でノートを更新していたのと同様に、自動化を通じて[スキル](https://docs.devin.ai/ja/product-guides/skills.md)を最新の状態に保つ用途で利用します。

## 権限

エンタープライズレベルで `ManageAccountPlugins` 権限を持つ[サービスユーザー](https://docs.devin.ai/ja/api-reference/v3/service-users/members-service-users.md)または[個人用アクセストークン](https://docs.devin.ai/ja/api-reference/personal-access-tokens.md)が必要です。エンタープライズの Knowledge またはプレイブックがスキルへ移行済みの場合は、`ManageAccountKnowledge` または `ManageAccountPlaybooks` 権限でもアクセスできます。

## 動作

* `content` はフロントマターを含む `SKILL.md` 全体です。これは `skills/<skill_name>/SKILL.md` に保存され、プラグイン内の他のファイルは変更されません。
* 対象のプラグインはあらかじめ存在している必要があります。プラグインを作成するには、[アップロード](https://docs.devin.ai/ja/api-reference/v3/plugins/put-enterprise-plugin-upload.md)するか、[Customize](https://docs.devin.ai/ja/product-guides/plugins.md) で作成してください。
* `revision_token` を指定しない場合、書き込みによって保存済みの内容がすべて置き換えられます。未確認の変更を上書きしないようにするには、最後に読み取った `revision_token` を送信してください。読み取り以降にプラグインが変更されていた場合、書き込みは `409` で拒否されます。
* 書き込みを行うたびに、プラグインの `revision_token` が変更されます。これはプラグイン内のすべてのスキルに共通です。新しいトークンはレスポンスで返されます。
* 新しいセッションでは新しいスキルが読み込まれます。実行中のセッションでは、開始時に読み込んだ内容が引き続き使用されます。

## ステータスコード

* `400`: スキル名または `SKILL.md` が無効です。
* `403`: 呼び出し元に権限がない、アカウントでアップロードされたプラグインが無効になっていてスキルがまだ存在しない、またはプラグインが Devin 用に予約されています。
* `404`: この `bundle_id` を持つアップロードされたプラグインが存在しません。
* `409`: `revision_token` が送信されましたが、そのリビジョン以降にプラグインが変更されています。


## OpenAPI

````yaml ja/v3-openapi.yaml PUT /v3beta1/enterprise/managed-plugins/bundles/{bundle_id}/skills/{skill_name}
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/managed-plugins/bundles/{bundle_id}/skills/{skill_name}:
    put:
      tags:
        - managed-plugins
      summary: アップロードされたプラグインのスキルを作成または置換します。
      description: 既存のプラグインに ``skills/{skill_name}/SKILL.md`` を書き込みます。
      operationId: >-
        handle_put_managed_plugin_skill_v3beta1_enterprise_managed_plugins_bundles__bundle_id__skills__skill_name__put
      parameters:
        - in: path
          name: bundle_id
          required: true
          schema:
            title: Bundle Id
            type: string
        - in: path
          name: skill_name
          required: true
          schema:
            title: Skill Name
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagedPluginSkillUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedPluginSkillResponse'
          description: 成功レスポンス
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 認証されていません
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: アクセスが禁止されています
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 見つかりません
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 競合
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 削除済み
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 処理できないコンテンツ
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: リクエスト過多
components:
  schemas:
    ManagedPluginSkillUpdateRequest:
      properties:
        content:
          description: フロントマターを含むSKILL.md全体。
          title: Content
          type: string
        revision_token:
          anyOf:
            - type: string
            - type: 'null'
          description: バンドルが引き続きこのリビジョンである場合にのみ書き込みます。
          title: Revision Token
      required:
        - content
      title: ManagedPluginSkillUpdateRequest
      type: object
    ManagedPluginSkillResponse:
      properties:
        bundle_id:
          title: Bundle Id
          type: string
        content:
          description: スキルのSKILL.md。
          title: Content
          type: string
        name:
          title: Name
          type: string
        revision_token:
          description: これを格納しているバンドルのリビジョン。
          title: Revision Token
          type: string
      required:
        - bundle_id
        - name
        - content
        - revision_token
      title: ManagedPluginSkillResponse
      type: object
    ProblemDetail:
      description: >-
        v3 API 用の RFC 9457 application/problem+json エラーボディ。


        detail は後方互換性のため、レガシーな {"detail": ...}
        ボディから引き継がれます。その他のメンバーは追加式です。errors にはフィールドレベルのバリデーションエラーが含まれます（422
        の場合のみ）。
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: この事象に固有の、人が読める説明。
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: ブロックされた操作の拒否理由を示す機械可読コード（例："user_frozen"、"migrated_session"）。
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: フィールド単位のバリデーションエラー（422 レスポンスのみ）。
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: この発生箇所の URI 参照（リクエストパス）。
          title: Instance
        status:
          description: HTTP ステータスコード。
          title: Status
          type: integer
        title:
          description: 問題タイプを人が読める短い要約。
          title: Title
          type: string
        type:
          default: about:blank
          description: 問題タイプを識別する URI 参照。
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
  securitySchemes:
    bearerAuth:
      description: 'サービスユーザーの認証情報（接頭辞: cog_）'
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.