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

# Create or replace a skill of an uploaded plugin.

> Write ``skills/{skill_name}/SKILL.md`` into an existing plugin.

Creates a skill in an uploaded plugin in the enterprise, or replaces it. Use it to keep [skills](https://docs.devin.ai/product-guides/skills.md) up to date from automation, as the Knowledge notes API did for notes.

## Permissions

Requires a [service user](https://docs.devin.ai/api-reference/v3/service-users/members-service-users.md) or [personal access token](https://docs.devin.ai/api-reference/personal-access-tokens.md) with the `ManageAccountPlugins` permission at the enterprise level. `ManageAccountKnowledge` or `ManageAccountPlaybooks` also grants access once the enterprise's Knowledge or Playbooks have moved to skills.

## Behavior

* `content` is the whole `SKILL.md`, frontmatter included. It is stored at `skills/<skill_name>/SKILL.md`; the plugin's other files are left as they are.
* The plugin must already exist. To create a plugin, [upload it](https://docs.devin.ai/api-reference/v3/plugins/put-enterprise-plugin-upload.md) or create it in [Customize](https://docs.devin.ai/product-guides/plugins.md).
* Without `revision_token` the write replaces whatever is stored. To avoid overwriting a change you have not seen, send the `revision_token` you last read: the write is then refused with `409` if the plugin has changed since.
* Every write changes the plugin's `revision_token`, for all of its skills. The response returns the new one.
* New sessions load the new skill. Running sessions keep what they loaded at start.

## Status codes

* `400`: the skill name or the `SKILL.md` is not valid.
* `403`: the caller lacks the permission, uploaded plugins are disabled for the account and the skill does not exist yet, or the plugin is reserved for Devin.
* `404`: no uploaded plugin has this `bundle_id`.
* `409`: `revision_token` was sent and the plugin has changed since that revision.


## OpenAPI

````yaml v3-openapi.yaml PUT /v3beta1/enterprise/managed-plugins/bundles/{bundle_id}/skills/{skill_name}
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/enterprise/managed-plugins/bundles/{bundle_id}/skills/{skill_name}:
    put:
      tags:
        - managed-plugins
      summary: Create or replace a skill of an uploaded plugin.
      description: Write ``skills/{skill_name}/SKILL.md`` into an existing plugin.
      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: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
components:
  schemas:
    ManagedPluginSkillUpdateRequest:
      properties:
        content:
          description: The full SKILL.md, frontmatter included.
          title: Content
          type: string
        revision_token:
          anyOf:
            - type: string
            - type: 'null'
          description: Only write if the bundle is still at this revision.
          title: Revision Token
      required:
        - content
      title: ManagedPluginSkillUpdateRequest
      type: object
    ManagedPluginSkillResponse:
      properties:
        bundle_id:
          title: Bundle Id
          type: string
        content:
          description: The skill's SKILL.md.
          title: Content
          type: string
        name:
          title: Name
          type: string
        revision_token:
          description: Revision of the bundle holding it.
          title: Revision Token
          type: string
      required:
        - bundle_id
        - name
        - content
        - revision_token
      title: ManagedPluginSkillResponse
      type: object
    ProblemDetail:
      description: >-
        RFC 9457 application/problem+json error body for the v3 API.


        detail is retained from the legacy {"detail": ...} body for back-compat;
        the

        other members are additive. errors carries field-level validation
        failures

        (422 only).
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: A human-readable explanation specific to this occurrence.
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Machine-readable code for blocked-action refusals (e.g.
            "user_frozen", "migrated_session").
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Field-level validation errors (422 responses only).
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: A URI reference (the request path) for this occurrence.
          title: Instance
        status:
          description: The HTTP status code.
          title: Status
          type: integer
        title:
          description: A short, human-readable summary of the problem type.
          title: Title
          type: string
        type:
          default: about:blank
          description: A URI reference identifying the problem type.
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````

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