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

# Update the Caller ID (ANI) allowlist

> Replaces the additional authorized ANI allowlist (E.164 numbers). Coval pool numbers are always allowed by default. Requires `organization:write`. Every submitted number must be a Coval pool number or a number Coval support has carrier-verified for this organization (a one-time, support-led step recorded against the org); unverified numbers are rejected with 400 and never reach the dial path.



## OpenAPI

````yaml /api-reference/v1/organization-v1.yaml patch /organization/caller-id
openapi: 3.0.3
info:
  title: Coval Organization API
  version: 1.0.0
  description: >
    List current organization users and read or update organization
    configuration. Exposes the conversation

    metrics config for the workspace selected by `X-Coval-Workspace-Id`: the
    default

    metrics run on every conversation, plus conditional rules that add metrics
    based

    on run metadata.
  contact:
    name: Coval API Support
    email: support@coval.dev
    url: https://docs.coval.dev
  license:
    name: Proprietary
    url: https://coval.dev/terms
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Organization Conversations Config
    description: >-
      Workspace-aware configuration for conversation metrics — the default and
      conditional metrics run on conversations. When no workspace header is
      supplied, the active default workspace is used when one can be resolved.
  - name: Organization Users
    description: Read-only organization membership roster.
  - name: Organization Caller ID
    description: Self-serve Caller ID (ANI) allowlist settings for the organization.
paths:
  /organization/caller-id:
    patch:
      tags:
        - Organization Caller ID
      summary: Update the Caller ID (ANI) allowlist
      description: >-
        Replaces the additional authorized ANI allowlist (E.164 numbers). Coval
        pool numbers are always allowed by default. Requires
        `organization:write`. Every submitted number must be a Coval pool number
        or a number Coval support has carrier-verified for this organization (a
        one-time, support-led step recorded against the org); unverified numbers
        are rejected with 400 and never reach the dial path.
      operationId: updateCallerId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCallerIdRequest'
      responses:
        '200':
          description: Allowlist updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallerIdConfig'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/NotEntitled'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          description: Database routing is temporarily unavailable. Retry the request.
components:
  schemas:
    UpdateCallerIdRequest:
      type: object
      additionalProperties: false
      required:
        - allowlist
      properties:
        allowlist:
          type: array
          maxItems: 1000
          items:
            type: string
            pattern: ^\+[1-9][0-9]{7,14}$
          description: >-
            Additional authorized ANI numbers (E.164). Replaces the stored
            allowlist.
    CallerIdConfig:
      type: object
      description: The organization's presentable caller-ID (ANI) numbers.
      properties:
        pool_numbers:
          type: array
          items:
            type: string
          description: Coval-provisioned pool numbers, allowed by default.
        allowlist:
          type: array
          items:
            type: string
          description: Additional customer-authorized ANI numbers (E.164).
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - INVALID_ARGUMENT
            - UNAUTHENTICATED
            - PERMISSION_DENIED
            - NOT_FOUND
            - INTERNAL
          description: Machine-readable error code.
          example: INVALID_ARGUMENT
        message:
          type: string
          description: Human-readable error message.
          example: Invalid request body
        details:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
          nullable: true
          description: Field that caused the error, when available.
          example: default_conversation_metrics
        description:
          type: string
          description: Human-readable detail about the error.
          example: >-
            Provide at least one of 'default_conversation_metrics' or
            'conditional_conversation_metrics'.
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INVALID_ARGUMENT
              message: Invalid request body
              details:
                - field: conditional_conversation_metrics
                  description: Provide exactly one of 'metric' or 'metrics'.
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: x-api-key
                  description: API key is required in the x-api-key header
    NotEntitled:
      description: The organization's subscription is not active. Resubscribe to continue.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: PERMISSION_DENIED
              message: Insufficient permissions
              details:
                - field: permissions
                  description: >-
                    The API key does not include the required organization
                    permission.
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: Organization not found
              details:
                - description: Organization not found.
    InternalError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
              details:
                - description: >-
                    An unexpected error occurred while processing the
                    organization request
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````

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