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

# Get Contacts in Book

> Returns all contacts from a specific contact book.



## OpenAPI

````yaml GET /contacts/books/{name}
openapi: 3.0.0
info:
  title: ECSEND Developer API
  description: Public API for programmatically sending SMS and managing campaigns/contacts.
  version: 1.0.0
servers:
  - url: https://ecsend.paysgator.com
    description: Production Base URL
security:
  - ApiKeyAuth: []
paths:
  /contacts/books/{name}:
    parameters:
      - name: name
        in: path
        required: true
        description: Name of the contact book
        schema:
          type: string
    get:
      tags:
        - Contacts
      summary: Get all contacts in a book
      description: Returns all contacts from a specific contact book.
      operationId: getContactBookContacts
      responses:
        '200':
          description: List of contacts
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Contact'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Contact book not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Contact:
      type: object
      properties:
        phoneNumber:
          type: string
          example: +25884xxxxxxx
        name:
          type: string
          example: John Doe
    Error:
      type: object
      properties:
        error:
          type: string
          example: Unauthorized. Invalid or missing X-Api-Key.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````