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

# Update Phonebook

> Sparse update of header fields. When `contacts` is present, all existing entries are deleted and rebuilt from the array (empty array clears all contacts); omit `contacts` to leave them untouched.



## OpenAPI

````yaml https://api.voxo.co/v2/docs/openapi.json patch /v2/admin/phonebooks/{id}
openapi: 3.1.0
info:
  title: VOXO API
  description: VOXO Communication Platform API
  version: 2.0.0
servers:
  - url: https://api.voxo.co
security:
  - bearerAuth: []
paths:
  /v2/admin/phonebooks/{id}:
    patch:
      tags:
        - Phonebooks
      summary: Update Phonebook
      description: >-
        Sparse update of header fields. When `contacts` is present, all existing
        entries are deleted and rebuilt from the array (empty array clears all
        contacts); omit `contacts` to leave them untouched.
      parameters:
        - schema:
            type: string
            pattern: ^[1-9]\d*$
          in: path
          name: id
          required: true
          description: Phonebook ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: Phonebook name
                includeExt:
                  description: Include tenant extensions in the phonebook (yes/no)
                  type: string
                  enum:
                    - 'yes'
                    - 'no'
                provisioning:
                  description: Provision this phonebook to hardware (1) or not (0)
                  type: integer
                  minimum: 0
                  maximum: 1
                contacts:
                  description: >-
                    Full replacement of the phonebook's contacts. When present,
                    all existing entries are deleted and rebuilt from this array
                    (empty array clears all contacts). Omit to leave contacts
                    untouched.
                  type: array
                  items:
                    type: object
                    properties:
                      firstName:
                        description: Contact first name
                        type: string
                        maxLength: 255
                      lastName:
                        description: Contact last name
                        type: string
                        maxLength: 255
                      phone:
                        description: Primary phone number
                        type: string
                        maxLength: 255
                      email:
                        description: Email address
                        type: string
                        maxLength: 255
                      routeTo:
                        description: Route-to destination
                        type: string
                        maxLength: 255
                      speedDial:
                        description: Speed dial value
                        type: string
                        maxLength: 255
                    additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          description: Updated phonebook
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: number
                    description: Phonebook ID
                  tenant:
                    type: object
                    properties:
                      id:
                        type: number
                        description: Tenant ID
                      name:
                        type: string
                        description: Tenant name
                    required:
                      - id
                      - name
                    additionalProperties: false
                    description: Owning tenant
                  name:
                    type: string
                    description: Phonebook name
                  includeExt:
                    type: string
                    description: Whether tenant extensions are included
                  provisioning:
                    type: number
                    description: Provisioning flag (1/0)
                  contacts:
                    type: array
                    items:
                      type: object
                      properties:
                        firstName:
                          description: Contact first name
                          type: string
                          maxLength: 255
                        lastName:
                          description: Contact last name
                          type: string
                          maxLength: 255
                        phone:
                          description: Primary phone number
                          type: string
                          maxLength: 255
                        email:
                          description: Email address
                          type: string
                          maxLength: 255
                        routeTo:
                          description: Route-to destination
                          type: string
                          maxLength: 255
                        speedDial:
                          description: Speed dial value
                          type: string
                          maxLength: 255
                      additionalProperties: false
                    description: Contacts in this phonebook
                required:
                  - id
                  - tenant
                  - name
                  - includeExt
                  - provisioning
                  - contacts
                additionalProperties: false
        '400':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  message:
                    type: string
                  code:
                    type: number
                  validationErrors:
                    type: array
                    items:
                      type: string
                required:
                  - name
                  - message
                  - code
                additionalProperties: false
        '403':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  message:
                    type: string
                  code:
                    type: number
                  validationErrors:
                    type: array
                    items:
                      type: string
                required:
                  - name
                  - message
                  - code
                additionalProperties: false
        '404':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  message:
                    type: string
                  code:
                    type: number
                  validationErrors:
                    type: array
                    items:
                      type: string
                required:
                  - name
                  - message
                  - code
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````