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

# Update snippet

> Update one of your own snippets.



## OpenAPI

````yaml /openapi.json patch /v1/snippets/{id}
openapi: 3.0.0
info:
  title: Botdog API
  description: |-
    API documentation for Botdog.

    **Authentication**: Pass your API key as the `x-api-key` header.
    Example: `x-api-key: bd_live_abc123`

    Do NOT use the `Authorization` header.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.botdog.co
    description: Production
security: []
tags:
  - name: campaigns
    description: >-
      Create, read, update, and control campaigns (pause/resume, pause
      activities, archive, delete).
  - name: leads
    description: >-
      List and filter leads, read full detail + event history, update metadata,
      add to a campaign, or stop a sequence.
  - name: lists
    description: Manage lead/audience lists and their members.
  - name: blacklist
    description: Manage suppression lists (excluded profiles).
  - name: snippets
    description: Manage message snippets / templates.
  - name: accounts
    description: >-
      Connected LinkedIn accounts (seats), their connection health, and daily
      sending limits.
  - name: webhooks
    description: Manage webhook subscriptions.
  - name: messaging
    description: >-
      Send messages and replies, schedule a future send, and mark conversations
      read/unread. Rate-limited per sending account.
  - name: analytics
    description: Team-level analytics totals, daily breakdowns, and per-user metrics.
  - name: users
    description: Read the users in your team.
  - name: teams
    description: Current team context.
  - name: health
    description: Service health checks (no authentication).
paths:
  /v1/snippets/{id}:
    patch:
      tags:
        - snippets
      summary: Update snippet
      description: Update one of your own snippets.
      operationId: SnippetsController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSnippetDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SnippetDto'
        '401':
          description: Unauthorized. API key is missing or invalid.
        '404':
          description: Snippet not found
        '409':
          description: Shortcut already in use
        '429':
          description: Rate limit exceeded. Retry after cooldown.
      security:
        - api-key: []
components:
  schemas:
    UpdateSnippetDto:
      type: object
      properties:
        name:
          type: string
          description: The snippet name
        content:
          type: string
          description: Template body (for TEXT snippets)
        prompt:
          type: string
          description: Generation prompt (for LLM snippets)
        shortcut:
          type: string
          description: A quick-access shortcut (must be unique)
        status:
          type: string
          description: Set ACTIVE or ARCHIVED
          enum:
            - ACTIVE
            - ARCHIVED
    SnippetDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the snippet
        name:
          type: string
          description: The name of the snippet
        shortcut:
          type: string
          description: The keyboard shortcut for the snippet, if any
          nullable: true
        type:
          type: string
          description: 'The snippet type: a static TEXT template or an LLM prompt'
          example: TEXT
        status:
          type: string
          description: The snippet status
          example: ACTIVE
        content:
          type: string
          description: The template body (for TEXT snippets)
          nullable: true
        prompt:
          type: string
          description: The generation prompt (for LLM snippets)
          nullable: true
        isShared:
          type: boolean
          description: Whether the snippet is shared with the team
          example: false
        createdAt:
          format: date-time
          type: string
          description: When the snippet was created
        updatedAt:
          format: date-time
          type: string
          description: When the snippet was last updated
      required:
        - id
        - name
        - type
        - status
        - isShared
        - createdAt
        - updatedAt
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key
      x-default: bd_live_your_key_here

````