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

# Create or update a tap prompt fragment

> Creates a new fragment or updates the existing fragment with the same `key`. Timestamps are managed server-side.



## OpenAPI

````yaml /openapi.yaml post /api/v1/tap-prompts
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.11.3
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/tap-prompts:
    post:
      tags:
        - Tap Prompts
      summary: Create or update a tap prompt fragment
      description: >-
        Creates a new fragment or updates the existing fragment with the same
        `key`. Timestamps are managed server-side.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TapPromptFragment'
      responses:
        '200':
          description: Saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
        '500':
          description: Error (including missing key)
components:
  schemas:
    TapPromptFragment:
      type: object
      required:
        - key
      properties:
        key:
          type: string
          description: >-
            Data-source key that triggers injection (e.g. a provider or API
            name)
        aliases:
          type: array
          items:
            type: string
          description: Alternate names that also trigger this fragment
        content:
          type: string
          description: >-
            Fragment text appended to the tap code-generation system prompt when
            the key/alias matches
        enabled:
          type: boolean
          default: true
        createdAt:
          type: string
        updatedAt:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````