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

# Update Pattern Mapping



## OpenAPI

````yaml https://api.aiql.io/openapi.json patch /patterns/{id}/mapping/{entryId}
openapi: 3.1.0
info:
  title: aiql-api
  version: 0.1.0
servers:
  - url: https://api.aiql.io
security: []
tags:
  - name: Health
    description: Service health checks.
  - name: Workspaces
    description: Workspace management.
  - name: Ingestions
    description: Document ingestion pipeline.
  - name: Queries
    description: Natural-language queries.
  - name: Sources
    description: Ingested sources and their contents.
  - name: Requests
    description: Source addition/removal requests awaiting review.
  - name: Request Changes
    description: Individual source add/remove changes on a request.
  - name: Request Reviews
    description: Reviews of a request, including draft and submit.
  - name: Request Comments
    description: Comments on a request review.
  - name: Canvases
    description: Brainstorm canvases.
  - name: Dashboards
    description: Dashboards.
  - name: Presentations
    description: Slide presentations.
  - name: Patterns
    description: User-defined ontology patterns and matched instances.
  - name: Written Documents
    description: Authored documents.
  - name: Prompts
    description: Reusable prompt templates.
  - name: Apps
    description: Workspace automations.
  - name: Tools
    description: Standalone convert/split/shape/extract tools.
  - name: Realtime
    description: Voice session mint and tool execution.
  - name: Connectors
    description: Connector catalog and connect flows.
  - name: Connections
    description: Workspace connector connections.
  - name: Chat Completions
    description: OpenAI-compatible chat completions over workspace queries.
paths:
  /patterns/{id}/mapping/{entryId}:
    patch:
      tags:
        - Patterns
      summary: Update Pattern Mapping
      operationId: update_pattern_mapping_patterns__id__mapping__entryId__patch
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
        - name: entryId
          in: path
          required: true
          schema:
            type: string
            title: Entryid
        - name: AiQL-Workspace
          in: header
          required: true
          schema:
            type: string
            description: ID of the workspace the request operates on.
            title: Aiql-Workspace
          description: ID of the workspace the request operates on.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatternMappingUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatternMappingEntry'
        '401':
          description: 'Authentication failed: missing or invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -X PATCH
            https://api.aiql.io/patterns/ptn_6e4c/mapping/{entryId} \
              -H "Authorization: Bearer $AIQL_API_KEY" \
              -H "AiQL-Workspace: $AIQL_WORKSPACE_ID"
components:
  schemas:
    PatternMappingUpdate:
      properties:
        status:
          anyOf:
            - type: string
              enum:
                - suggested
                - confirmed
                - rejected
            - type: 'null'
          title: Status
        target_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Name
        target_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Target Names
        rationale:
          anyOf:
            - type: string
            - type: 'null'
          title: Rationale
      type: object
      title: PatternMappingUpdate
    PatternMappingEntry:
      properties:
        id:
          type: string
          title: Id
        slot_kind:
          type: string
          title: Slot Kind
        slot_key:
          type: string
          title: Slot Key
        slot_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Slot Name
        required:
          type: boolean
          title: Required
          default: false
        target_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Name
        target_names:
          items:
            type: string
          type: array
          title: Target Names
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
        rationale:
          anyOf:
            - type: string
            - type: 'null'
          title: Rationale
        status:
          type: string
          title: Status
      type: object
      required:
        - id
        - slot_kind
        - slot_key
        - status
      title: PatternMappingEntry
    ErrorResponse:
      type: object
      title: ErrorResponse
      properties:
        detail:
          type: string
          title: Detail
      required:
        - detail
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      description: API key or UI session JWT passed as a Bearer token.
      scheme: bearer

````

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