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

# Check prompt usage by contacts and conversations

> Reports how many Contacts and Conversations currently reference the prompt and returns up to a few alternative prompts the caller could reassign them to. Used by the delete/reassign confirmation flow.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/prompts/{promptId}/usage
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/prompts/{promptId}/usage:
    get:
      tags:
        - Prompts
      summary: Check prompt usage by contacts and conversations
      description: >-
        Reports how many Contacts and Conversations currently reference the
        prompt and returns up to a few alternative prompts the caller could
        reassign them to. Used by the delete/reassign confirmation flow.
      operationId: get_prompts_usage
      parameters:
        - in: path
          name: promptId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Prompt usage information returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptUsageResponse'
        '403':
          description: Prompt not found or not owned by user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptErrorResponse'
        '404':
          description: User or prompt not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    PromptUsageResponse:
      type: object
      properties:
        promptId:
          type: string
        promptName:
          type: string
        isInUse:
          type: boolean
        contactsCount:
          type: integer
        conversationsCount:
          type: integer
        totalUsageCount:
          type: integer
        hasAlternatives:
          type: boolean
        alternatives:
          type: array
          items:
            $ref: '#/components/schemas/PromptUsageAlternative'
      required:
        - promptId
        - isInUse
        - contactsCount
        - conversationsCount
        - totalUsageCount
      additionalProperties: true
      example:
        promptId: 5f7b1c2e8a1d4e0012c3b4a5
        promptName: Leasing follow-up assistant
        isInUse: true
        contactsCount: 24
        conversationsCount: 31
        totalUsageCount: 55
        hasAlternatives: true
        alternatives:
          - id: 5f7b1c2e8a1d4e0012c3b4a6
            name: Standard follow-up assistant
            description: Generic follow-up prompt.
    PromptErrorResponse:
      type: object
      description: Generic error envelope returned by Prompt endpoints.
      properties:
        error:
          type: string
        details:
          type: string
      required:
        - error
      additionalProperties: true
      example:
        error: Prompt not found
        details: No prompt with id 5f7b1c2e8a1d4e0012c3b4a5 belongs to this user.
    PromptUsageAlternative:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
      required:
        - id
        - name
      additionalProperties: true
      example:
        id: 5f7b1c2e8a1d4e0012c3b4a6
        name: Standard follow-up assistant
        description: Generic follow-up prompt suitable as a replacement.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````