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

# Skill aktualisieren

> Aktualisiere einen bestehenden Skill

<Info>
  **Nutzt du unsere API über ein Dedicated Deployment?** Ersetze einfach `api.langdock.com` mit der Basis-URL deines Deployments: **`<deployment-url>/api/public`**
</Info>

Aktualisiert einen bestehenden Skill in deinem Workspace. Gib nur die Felder an, die du ändern möchtest.

## Erforderliche Scopes

Dieser Endpoint erfordert den `SKILL_API` Scope.

<Info>
  Erfordert Editor-Zugriff auf den Skill.
</Info>

## Pfadparameter

| Parameter | Typ    | Erforderlich | Beschreibung                         |
| --------- | ------ | ------------ | ------------------------------------ |
| `skillId` | string | Ja           | UUID des zu aktualisierenden Skills. |

## Request Body

| Parameter        | Typ       | Beschreibung                                                                                                                                            |
| ---------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`           | string    | Skill-Name. Maximum: 64 Zeichen.                                                                                                                        |
| `slug`           | string    | Stabiler Skill-Slug. Nur Kleinbuchstaben, Zahlen und Bindestriche. Maximum: 100 Zeichen.                                                                |
| `description`    | string    | Beschreibung, wann der Skill angewendet werden soll. Maximum: 1024 Zeichen.                                                                             |
| `instructions`   | string    | Skill-Anweisungen. Maximum: 50000 Zeichen.                                                                                                              |
| `integrationIds` | string\[] | Integration-UUIDs, die an den Skill angehängt werden. Ersetzt die aktuelle Integrationsliste. Jede Integration muss in deinem Workspace aktiviert sein. |

## Beispiel

```javascript theme={null}
const axios = require("axios");

async function updateSkill(skillId) {
  const response = await axios.patch(
    `https://api.langdock.com/skills/v1/${skillId}`,
    {
      description: "Applies the support team's latest tone and escalation rules.",
      instructions: "Write concise replies, include the next best action, and escalate billing or security issues to the account owner."
    },
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
      }
    }
  );

  console.log("Updated Skill:", response.data.skill.updatedAt);
}

updateSkill("550e8400-e29b-41d4-a716-446655440000");
```

## Antwortformat

### Erfolgsantwort (200 OK)

```typescript theme={null}
{
  skill: {
    id: string;
    name: string;
    slug: string;
    description: string;
    instructions: string;
    integrationIds: string[];
    createdAt: string;
    updatedAt: string;
  };
}
```

## Fehlerbehandlung

| Statuscode | Beschreibung                                                                            |
| ---------- | --------------------------------------------------------------------------------------- |
| 400        | Ungültiger Request Body, fehlende Update-Felder oder nicht zugängliche `integrationIds` |
| 401        | Ungültiger oder fehlender API Key                                                       |
| 403        | Fehlender `SKILL_API` Scope, kein Skills-Produktzugriff oder kein Editor-Zugriff        |
| 404        | Skill nicht gefunden                                                                    |
| 409        | Skill-Slug-Konflikt                                                                     |
| 429        | Rate Limit überschritten                                                                |
| 500        | Interner Serverfehler                                                                   |

<Info>
  Langdock blockiert bewusst Browser-basierte Anfragen, um deinen API-Schlüssel zu schützen und die Sicherheit deiner Anwendungen zu gewährleisten. Weitere Informationen findest du in unserem Guide zu [Best Practices für API-Schlüssel](/de/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices).
</Info>


## OpenAPI

````yaml PATCH /skills/v1/{skillId}
openapi: 3.0.0
info:
  title: Langdock API
  version: 3.0.0
servers:
  - url: https://api.langdock.com
    description: Production
security:
  - bearerAuth: []
paths:
  /skills/v1/{skillId}:
    patch:
      tags:
        - Skills
      summary: Update a Skill
      description: Updates an existing Skill in your workspace.
      operationId: updateSkill
      parameters:
        - $ref: '#/components/parameters/SkillId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSkillRequest'
      responses:
        '200':
          description: Skill updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillResponse'
        '400':
          description: Invalid request body
        '401':
          description: Invalid or missing API key
        '403':
          description: Missing required scope or editor access
        '404':
          description: Skill not found
        '409':
          description: Skill slug conflict
        '429':
          description: Rate limit exceeded
        '500':
          description: Internal server error
components:
  parameters:
    SkillId:
      name: skillId
      in: path
      required: true
      description: UUID of the Skill.
      schema:
        type: string
        format: uuid
  schemas:
    UpdateSkillRequest:
      type: object
      minProperties: 1
      additionalProperties: false
      properties:
        name:
          type: string
          maxLength: 64
          minLength: 1
          description: Skill name.
        slug:
          type: string
          maxLength: 100
          pattern: ^[a-z0-9-]+$
          description: Stable Skill slug.
        description:
          type: string
          maxLength: 1024
          description: Description used to explain when the Skill should apply.
        instructions:
          type: string
          maxLength: 50000
          minLength: 1
          description: Skill instructions.
        integrationIds:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Integration IDs to attach to the Skill. Replaces the current
            integration list.
    SkillResponse:
      type: object
      required:
        - skill
      properties:
        skill:
          $ref: '#/components/schemas/Skill'
    Skill:
      type: object
      required:
        - id
        - name
        - slug
        - description
        - instructions
        - integrationIds
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the Skill.
        name:
          type: string
          maxLength: 64
          description: Skill name.
        slug:
          type: string
          maxLength: 100
          pattern: ^[a-z0-9-]+$
          description: Stable Skill slug.
        description:
          type: string
          maxLength: 1024
          description: Description used to explain when the Skill should apply.
        instructions:
          type: string
          maxLength: 50000
          description: Skill instructions.
        integrationIds:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Integration IDs attached to the Skill. Each integration must be
            enabled in your workspace.
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp for Skill creation.
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp for the latest Skill update.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key as Bearer token. Format "Bearer YOUR_API_KEY"

````