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

# Add DND Number

> Adds a number to an agent's do-not-disturb list so it is never called again. The number is normalized to canonical E.164 form. Propagates immediately to the calling engine.



## OpenAPI

````yaml POST /v1/dnd_numbers
openapi: 3.1.0
info:
  title: OSVI AI API
  description: REST API for the OSVI AI voice and chat platform
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.osvi.ai
security:
  - ApiToken: []
paths:
  /v1/dnd_numbers:
    post:
      summary: Add a DND number
      description: >-
        Adds a number to an agent's do-not-disturb list so it is never called
        again. The number is normalized to canonical E.164 form. Propagates
        immediately to the calling engine.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - agent_uuid
                - phone
              properties:
                agent_uuid:
                  type: string
                  example: agent_IsZ3Q6Sf_60Eh26XQMGbz-R_og
                phone:
                  type: string
                  example: '9876543210'
                reason:
                  type: string
                  description: Optional note for your own records.
                  example: customer opted out
            example:
              agent_uuid: agent_IsZ3Q6Sf_60Eh26XQMGbz-R_og
              phone: '9876543210'
              reason: customer opted out
      responses:
        '201':
          description: The created DND entry.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/V1DndNumber'
        '400':
          description: '`agent_uuid` or `phone` is missing.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
              example:
                success: false
                error: 'param is missing or the value is empty: phone'
                details: null
        '401':
          description: Invalid or missing API token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorUnauthorized'
        '404':
          description: The `agent_uuid` is not on your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
              example:
                success: false
                error: agent_not_found
                details: null
        '422':
          description: The number is already on the agent's DND list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
              example:
                success: false
                error: >-
                  Validation failed: Phone is already on the DND list for this
                  agent
                details: null
components:
  schemas:
    V1DndNumber:
      type: object
      properties:
        id:
          type: integer
          example: 31
        agent_uuid:
          type: string
          example: agent_IsZ3Q6Sf_60Eh26XQMGbz-R_og
        phone:
          type: string
          description: >-
            Canonical E.164 form (Indian numbers are normalized to
            `+91XXXXXXXXXX`).
          example: '+919876543210'
        reason:
          type: string
          nullable: true
          example: customer opted out
        created_at:
          type: string
          format: date-time
          example: '2026-06-12T09:30:00+05:30'
    ErrorBadRequest:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: max_call_duration_seconds must be between 30 and 1800
        details:
          type: object
          nullable: true
          example: null
    ErrorUnauthorized:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Invalid API token
    ErrorNotFound:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: agent_not_found
        details:
          type: object
          nullable: true
          example: null
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: API-Token
      description: >-
        16-character API token associated with your OSVI account. Find it in
        your dashboard under Settings → API.

````