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

# Search contacts

> Customers, newest first. Matches the name, phone, email, company, or notes. Customer API.



## OpenAPI

````yaml /openapi.yaml get /contacts
openapi: 3.0.0
info:
  title: Answering Agent API
  description: >
    The Customer API reads a team's conversations, transcripts, recordings,
    tasks, contacts, and reports. It also updates tasks and adds notes to them.
    The Partner API lets reseller accounts manage organizations, users,
    locations, partner links, and embed tokens. Both use an X-API-KEY header.
    Requests from this playground go to production.
  version: 1.0.0
servers:
  - url: https://answeringagent.com/api/v1
    description: Production
security: []
tags:
  - name: Account
    description: Customer API. Your team, phone lines, and members.
  - name: Conversations
    description: >-
      Customer API. Calls, texts, website chats, and emails, with transcripts
      and recordings.
  - name: Tasks
    description: >-
      Customer API. Follow-up tasks. Read them, update their status or assignee,
      and add notes.
  - name: Contacts
    description: Customer API. Your customers.
  - name: Reports
    description: Customer API. Report metrics, totals, and breakdowns.
  - name: Organizations
    description: Partner API, reseller accounts only.
  - name: Users
    description: Partner API, reseller accounts only.
  - name: Locations
    description: Partner API, reseller accounts only.
  - name: Account Linking
    description: Partner API, reseller accounts only.
  - name: Embed Tokens
    description: Partner API, reseller accounts only.
paths:
  /contacts:
    get:
      tags:
        - Contacts
      summary: Search contacts
      description: >-
        Customers, newest first. Matches the name, phone, email, company, or
        notes. Customer API.
      operationId: searchContacts
      parameters:
        - $ref: '#/components/parameters/SearchQuery'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: One page of contacts.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PageInfo'
                  - type: object
                    properties:
                      contacts:
                        type: array
                        items:
                          $ref: '#/components/schemas/Contact'
        '400':
          $ref: '#/components/responses/CustomerBadRequest'
        '401':
          $ref: '#/components/responses/CustomerUnauthorized'
        '403':
          $ref: '#/components/responses/CustomerForbidden'
        '405':
          $ref: '#/components/responses/CustomerMethodNotAllowed'
        '429':
          $ref: '#/components/responses/CustomerRateLimited'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    SearchQuery:
      in: query
      name: query
      required: false
      schema:
        type: string
        maxLength: 100
      description: Words to search for.
    Limit:
      in: query
      name: limit
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 50
        default: 10
      description: Results per page.
    Page:
      in: query
      name: page
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
      description: Page number. Use next_page from the previous response.
  schemas:
    PageInfo:
      type: object
      properties:
        total_matching:
          type: integer
          example: 214
        page:
          type: integer
          example: 1
        next_page:
          type: integer
          nullable: true
          example: 2
    Contact:
      type: object
      properties:
        id:
          type: integer
          example: 77310
        url:
          type: string
          example: https://answeringagent.com/dashboard/contacts/77310
        name:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        stage:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
        notes:
          type: string
          nullable: true
        blocked:
          type: boolean
        phone_call_count:
          type: integer
          description: >-
            Phone calls with this contact that the key can see. Texts, chats,
            and emails that started on their own are not counted.
        first_contact_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the contact record was created. Not always the first
            conversation.
        last_call_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the contact's latest phone call or website chat handoff
            started. Null when the key cannot see it.
    CustomerError:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: A message for people. The text can change.
          example: That conversation is not available.
        code:
          type: string
          description: A stable code to branch on.
          enum:
            - invalid_request
            - unauthorized
            - forbidden
            - not_found
            - method_not_allowed
            - conflict
            - unprocessable
            - rate_limited
            - internal
          example: not_found
        issues:
          type: array
          description: >-
            Present when code is invalid_request. One entry for each input that
            failed validation.
          items:
            type: object
            properties:
              path:
                type: array
                items: {}
              message:
                type: string
  responses:
    CustomerBadRequest:
      description: An input is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomerError'
    CustomerUnauthorized:
      description: >-
        The X-API-KEY header is missing, the key is wrong or revoked, or its
        owner was deactivated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomerError'
    CustomerForbidden:
      description: The key's owner is not an owner, admin, or manager on the team.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomerError'
    CustomerMethodNotAllowed:
      description: The endpoint does not support that HTTP method. Nothing changed.
      headers:
        Allow:
          description: The methods the endpoint supports, such as GET, HEAD, OPTIONS.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomerError'
          example:
            error: This endpoint accepts GET.
            code: method_not_allowed
    CustomerRateLimited:
      description: More than 120 requests in a minute for this user.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomerError'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

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