> ## 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.

# Create Phonebook

> Create a phonebook, hardcode its layout, and seed it with the supplied contacts. Each contact becomes an entry with one detail row per non-empty field.



## OpenAPI

````yaml https://api.voxo.co/v2/docs/openapi.json post /v2/admin/phonebooks/
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/:
    post:
      tags:
        - Phonebooks
      summary: Create Phonebook
      description: >-
        Create a phonebook, hardcode its layout, and seed it with the supplied
        contacts. Each contact becomes an entry with one detail row per
        non-empty field.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tenantId:
                  type: integer
                  exclusiveMinimum: 0
                  maximum: 9007199254740991
                  description: Tenant ID
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: Phonebook name
                includeExt:
                  default: 'no'
                  description: Include tenant extensions in the phonebook (yes/no)
                  type: string
                  enum:
                    - 'yes'
                    - 'no'
                provisioning:
                  default: 1
                  description: Provision this phonebook to hardware (1) or not (0)
                  type: integer
                  minimum: 0
                  maximum: 1
                contacts:
                  default: []
                  description: Contacts to seed the phonebook with
                  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
              required:
                - tenantId
                - name
              additionalProperties: false
      responses:
        '200':
          description: Newly created 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
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````