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

# Update Skill

> Edit a draft. A published or archived version is a 409: create a new
version instead.



## OpenAPI

````yaml /openapi.json put /v1/skills/{skill_id}
openapi: 3.1.0
info:
  title: TurnCall
  description: Production voice agent platform API
  version: 2.1.1
servers: []
security: []
paths:
  /v1/skills/{skill_id}:
    put:
      tags:
        - skills
      summary: Update Skill
      description: |-
        Edit a draft. A published or archived version is a 409: create a new
        version instead.
      operationId: update_skill_v1_skills__skill_id__put
      parameters:
        - name: skill_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Skill Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSkillRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Update Skill V1 Skills  Skill Id  Put
          headers:
            X-TurnCall-Audit-Id:
              description: >-
                The id of the audit log entry for this request's primary
                resource. Every entry the request wrote (a publish also archives
                versions and re-points numbers) carries it as `request_id`: `GET
                /v1/audit-log?request_id=<this id>` returns them all.
              schema:
                type: string
                format: uuid
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateSkillRequest:
      properties:
        description:
          anyOf:
            - type: string
              maxLength: 1024
              minLength: 1
            - type: 'null'
          title: Description
        instructions:
          anyOf:
            - type: string
              maxLength: 128000
              minLength: 1
            - type: 'null'
          title: Instructions
        tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolDefinitionSchema'
              type: array
            - type: 'null'
          title: Tools
        knowledge_bases:
          anyOf:
            - items:
                $ref: '#/components/schemas/InlineKnowledgeBaseSchema'
              type: array
            - type: 'null'
          title: Knowledge Bases
      additionalProperties: false
      type: object
      title: UpdateSkillRequest
      description: |-
        A draft's content; a field left out is kept. The name is not here: it
        is what the versions share.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ToolDefinitionSchema:
      properties:
        name:
          type: string
          maxLength: 128
          minLength: 1
          pattern: ^[a-z_][a-z0-9_]*$
          title: Name
        description:
          type: string
          maxLength: 1024
          minLength: 1
          title: Description
        parameters_schema:
          additionalProperties: true
          type: object
          title: Parameters Schema
        execution_mode:
          type: string
          pattern: ^(sync|async)$
          title: Execution Mode
          default: sync
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
        webhook_secret:
          anyOf:
            - type: string
              maxLength: 256
              minLength: 16
            - type: 'null'
          title: Webhook Secret
        timeout_seconds:
          type: integer
          maximum: 300
          minimum: 1
          title: Timeout Seconds
          default: 10
        max_retries:
          type: integer
          maximum: 5
          minimum: 0
          title: Max Retries
          default: 1
      type: object
      required:
        - name
        - description
      title: ToolDefinitionSchema
    InlineKnowledgeBaseSchema:
      properties:
        knowledge_base_id:
          type: string
          format: uuid
          title: Knowledge Base Id
        mode:
          type: string
          pattern: ^(auto|tool|prompt)$
          title: Mode
          default: auto
        priority:
          type: integer
          maximum: 100
          minimum: 0
          title: Priority
          default: 0
        top_k:
          type: integer
          maximum: 50
          minimum: 1
          title: Top K
          default: 5
        similarity_threshold:
          type: number
          maximum: 1
          minimum: 0
          title: Similarity Threshold
          default: 0.3
        tool_description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Tool Description
      additionalProperties: false
      type: object
      required:
        - knowledge_base_id
      title: InlineKnowledgeBaseSchema
      description: |-
        An inline agent's knowledge base (#260): the link endpoint's fields,
        validated the same way, with unknown keys refused like the rest of the
        config.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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