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

# Get Contacts

> Returns a paginated list of contacts, ordered by name. Contacts are org-level — no x-phone header needed.



## OpenAPI

````yaml api-reference/openapi-generated.json GET /v1/contacts
openapi: 3.0.3
info:
  title: Periskope API
  version: 1.0.0
  description: >-
    Periskope external API.


    Responses use a flat, unwrapped shape: most endpoints return the resource at
    the top level, and list endpoints return a wrapper object with pagination
    inline (e.g. `{ from, to, count, chats: [...] }`). The documented response
    schemas describe these shapes directly.
servers:
  - url: https://api.periskope.app
security:
  - bearerAuth: []
paths:
  /v1/contacts:
    get:
      tags:
        - Contacts
      summary: List contacts
      description: >-
        Returns a paginated list of contacts, ordered by name. Contacts are
        org-level — no x-phone header needed.
      operationId: listContacts
      parameters:
        - schema:
            type: string
            description: >-
              Case-insensitive substring search across the contact number and
              contact name.
            example: hello
          required: false
          description: >-
            Case-insensitive substring search across the contact number and
            contact name.
          name: q
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            description: >-
              Number of contacts to skip before the first returned contact. Use
              together with limit to paginate: page N is offset = N * limit.
              Defaults to 0.
            example: 0
          required: false
          description: >-
            Number of contacts to skip before the first returned contact. Use
            together with limit to paginate: page N is offset = N * limit.
            Defaults to 0.
          name: offset
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 2000
            description: >-
              Maximum number of contacts to return in one page. Defaults to
              1000, capped at 2000.
            example: 100
          required: false
          description: >-
            Maximum number of contacts to return in one page. Defaults to 1000,
            capped at 2000.
          name: limit
          in: query
      responses:
        '200':
          description: Paginated list of contacts
          content:
            application/json:
              schema:
                type: object
                properties:
                  from:
                    type: integer
                    description: >-
                      1-based index of the first record in this page (offset +
                      1).
                    example: 1
                  to:
                    type: integer
                    description: 1-based index of the last record in this page.
                    example: 20
                  count:
                    type: integer
                    description: >-
                      Number of records in this page — the length of the
                      `contacts` array, not the total across all pages.
                    example: 20
                  contacts:
                    type: array
                    items:
                      $ref: '#/components/schemas/Contact'
                    description: The contacts in this page.
              examples:
                default:
                  summary: Response body
                  value:
                    from: 1
                    to: 20
                    count: 20
                    contacts:
                      - org_id: 00000000-0000-0000-0000-000000000000
                        contact_id: 911111111111@c.us
                        contact_name: John Doe
                        username: jane.doe
                        contact_type: user
                        is_wa_contact: true
                        is_my_contact: true
                        is_internal: false
                        is_imported: true
                        contact_image: https://example.com/files/image.png
                        contact_color: '#DC2626'
                        label_ids:
                          label-aaaaaaaaaaaa: true
                        labels:
                          - lead
                        chat_ids:
                          - 911111111111@c.us
                          - 120363000000000000@g.us
                        updated_at: '2026-01-15T09:30:00.000Z'
        '401':
          description: Invalid, expired or missing API token
          content:
            application/json:
              examples:
                error:
                  summary: Invalid, expired or missing API token
                  value:
                    code: UNAUTHORIZED_ERROR
                    message: Invalid bearer auth token
                    status: 401
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNAUTHORIZED_ERROR
                  message:
                    type: string
                    example: Invalid bearer auth token
                  status:
                    type: integer
                    example: 401
                example:
                  code: UNAUTHORIZED_ERROR
                  message: Invalid bearer auth token
                  status: 401
        '422':
          description: Request validation failed
          content:
            application/json:
              examples:
                error:
                  summary: Request validation failed
                  value:
                    code: VALIDATION_ERROR
                    message: Request validation failed
                    status: 422
                    fields:
                      body.chat_id:
                        message: chat_id is required
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  message:
                    type: string
                    example: Request validation failed
                  status:
                    type: integer
                    example: 422
                  fields:
                    type: object
                    additionalProperties:
                      type: object
                      properties:
                        message:
                          type: string
                        value: {}
                    example:
                      body.chat_id:
                        message: chat_id is required
                example:
                  code: VALIDATION_ERROR
                  message: Request validation failed
                  status: 422
                  fields:
                    body.chat_id:
                      message: chat_id is required
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              examples:
                error:
                  summary: Rate limit exceeded
                  value:
                    code: RATE_LIMIT_ERROR
                    message: You can only make 100 requests per second
                    status: 429
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: RATE_LIMIT_ERROR
                  message:
                    type: string
                    example: You can only make 100 requests per second
                  status:
                    type: integer
                    example: 429
                example:
                  code: RATE_LIMIT_ERROR
                  message: You can only make 100 requests per second
                  status: 429
        '500':
          description: Internal server error
          content:
            application/json:
              examples:
                error:
                  summary: Internal server error
                  value:
                    code: UNKNOWN_ERROR
                    message: Internal server error
                    status: 500
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: UNKNOWN_ERROR
                  message:
                    type: string
                    example: Internal server error
                  status:
                    type: integer
                    example: 500
                example:
                  code: UNKNOWN_ERROR
                  message: Internal server error
                  status: 500
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript
          source: |-
            import { PeriskopeApi } from '@periskope/periskope-client';

            const client = new PeriskopeApi({
              authToken: 'YOUR_API_KEY',
            });

            async function main() {
              const response = await client.contacts.listContacts();
              console.log(response);
            }

            main();
        - lang: bash
          label: cURL
          source: |-
            curl -X GET 'https://api.periskope.app/v1/contacts' \
              -H 'Authorization: Bearer YOUR_API_KEY'
components:
  schemas:
    Contact:
      type: object
      properties:
        org_id:
          type: string
          format: uuid
          description: Id of the organization the contact belongs to
          example: 00000000-0000-0000-0000-000000000000
        contact_id:
          type: string
          description: >-
            Unique id of the contact within the org: country code + number
            suffixed with @c.us. Use the number part (with or without the
            suffix) wherever a contact_id parameter is expected.
          example: 911111111111@c.us
        contact_name:
          type: string
          description: >-
            Display name of the contact — the Periskope-set name when one was
            saved via the API or dashboard, otherwise the WhatsApp verified
            name, address-book name or push name. null when no name is known
            from any source.
          example: John Doe
        username:
          type: string
          description: >-
            WhatsApp username of the contact. null when the contact has not set
            one or it has not been synced yet.
          example: jane.doe
        contact_type:
          type: string
          description: >-
            Type of the WhatsApp account: 'user' for a personal account,
            'business' for a business account. null when not yet synced.
          example: user
        is_wa_contact:
          type: boolean
          description: >-
            Whether the number is registered on WhatsApp, as reported by the
            connected phone. null when not yet synced.
          example: true
        is_my_contact:
          type: boolean
          description: >-
            Whether the contact is saved in the connected phone's address book.
            null when not yet synced.
          example: true
        is_internal:
          type: boolean
          description: >-
            Whether the contact is marked as internal (e.g. a teammate).
            Messages from internal contacts are not flagged for response. null
            when the flag was never set.
          example: false
        is_imported:
          type: boolean
          description: >-
            true when the contact was created via the API or an import rather
            than synced from a phone. null for synced contacts.
          example: true
        contact_image:
          type: string
          description: >-
            URL of the contact's WhatsApp profile picture. null when the contact
            has no picture or it is not accessible.
          example: https://example.com/files/image.png
        contact_color:
          type: string
          description: >-
            Hex color assigned to the contact, used to render it in the
            dashboard. null when no color is assigned.
          example: '#DC2626'
        label_ids:
          type: object
          additionalProperties:
            type: boolean
          description: >-
            Map of label_id to boolean for the labels on the contact. Labels on
            a contact are shared with its 1-1 chat. An empty object when the
            contact has no labels.
          example:
            label-aaaaaaaaaaaa: true
        labels:
          type: array
          items:
            type: string
          description: >-
            Names of the labels currently on the contact, resolved from
            label_ids
          example:
            - lead
        chat_ids:
          type: array
          items:
            type: string
          description: >-
            Ids of the chats the contact participates in — the 1-1 chat
            (<countrycode><number>@c.us) and any group chats (<group-id>@g.us)
            shared with the workspace. Contains a single null entry when the
            contact is not a participant of any chat.
          example:
            - 911111111111@c.us
            - 120363000000000000@g.us
        updated_at:
          type: string
          description: When the contact record was last updated, as an ISO 8601 timestamp
          example: '2026-01-15T09:30:00.000Z'
      description: >-
        A WhatsApp contact known to the workspace — synced from a connected
        phone's address book and chats, or created via the API. Contacts belong
        to the org as a whole, not to a single phone. Labels on a contact are
        shared with the contact's 1-1 chat.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Periskope API token, sent as `Authorization: Bearer <token>`.
        Generate one from the Periskope dashboard under **Settings → API &
        Webhooks**. API access requires an active Pro or Enterprise plan.

````

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