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

# List Contacts

> List the contacts of your workspaces, or find one by internal reference or email

List the contacts of the workspaces your key covers. To keep Penbox in sync with your CRM, look a contact up by the reference you gave it (`internal_ref`) or by its email, then create or update it.

> [!NOTE]
>
> `internal_ref` is not unique in a workspace: two contacts can carry the same reference. The answer is always a list. Read `data`, and handle more than one match.

> [!TIP]
>
> `internal_ref` and `email` are exact matches. To find a contact from a fragment of its name, email, phone, company or reference, use `search`.

```bash By internal reference theme={null} theme={null}
curl --request GET \
  --url 'https://connect.penbox.io/v1/contacts?internal_ref=AP-1042' \
  --header 'Authorization: Bearer <token>'
```

```bash By email theme={null} theme={null}
curl --request GET \
  --url 'https://connect.penbox.io/v1/contacts?email=jan.peeters@example.com' \
  --header 'Authorization: Bearer <token>'
```

```json 200 theme={null} theme={null}
{
  "meta": { "total_count": 1, "total_pages": 1, "page_size": 10, "current_page": 1 },
  "data": [
    {
      "id": "039470c7-495a-423c-ba41-57d4505ee1fd",
      "created_at": "2026-12-03T18:28:15.264Z",
      "updated_at": "2026-12-03T18:28:15.264Z",
      "email": "jan.peeters@example.com",
      "given_name": "Jan",
      "family_name": "Peeters",
      "company_name": "Peeters SRL",
      "internal_ref": "AP-1042",
      "phone": null,
      "locale": "fr",
      "workspace": { "id": "16b47f46-3358-4217-af17-102b6e6d2e60" }
    }
  ]
}
```


## OpenAPI

````yaml GET /contacts
openapi: 3.0.0
info:
  title: Penbox API
  version: '1.0'
  description: >-
    The Penbox API provides programmatic access to Penbox's form management,
    case management, and document processing capabilities. Authenticate using
    Bearer tokens created at https://app.penbox.io/workspace/settings/api
servers:
  - url: https://connect.penbox.io/v1
    description: Production
security:
  - BearerAuth: []
paths:
  /contacts:
    get:
      summary: List Contacts
      description: >-
        Retrieve a paginated list of the contacts of the workspaces your key
        covers. Find a contact by its internal reference or its email to keep
        Penbox in sync with your CRM.
      operationId: list-contacts
      parameters:
        - $ref: '#/components/parameters/ContactWorkspaceId'
        - $ref: '#/components/parameters/ContactInternalRef'
        - $ref: '#/components/parameters/ContactEmail'
        - $ref: '#/components/parameters/ContactSearch'
        - $ref: '#/components/parameters/PageNumber'
        - $ref: '#/components/parameters/PageSize'
        - name: sort
          in: query
          description: >-
            Sort field with `+` (ascending) or `-` (descending): `created_at` or
            `updated_at`. Default `-created_at`.
          schema:
            type: string
            example: '-updated_at'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      total_count:
                        type: integer
                      total_pages:
                        type: integer
                      page_size:
                        type: integer
                      current_page:
                        type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Contact'
        '422':
          description: The search is too long or has too many words
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    ContactWorkspaceId:
      name: workspace[id]
      in: query
      description: >-
        Only the contacts of this workspace. Without it, the contacts of every
        workspace your key covers.
      schema:
        type: string
        format: uuid
    ContactInternalRef:
      name: internal_ref
      in: query
      description: >-
        Exact internal reference, as stored (case-sensitive). The reference is
        not unique in a workspace, so several contacts can match: read `data`,
        not a single object.
      schema:
        type: string
      example: AP-1042
    ContactEmail:
      name: email
      in: query
      description: Exact email address. Case-insensitive.
      schema:
        type: string
        format: email
    ContactSearch:
      name: search
      in: query
      description: >-
        Free-text search over first name, last name, email, phone number,
        internal reference and company name. Every word must match, in any
        order, case- and accent-insensitive. An empty value applies no filter.


        Limits: at most 128 characters and at most 6 words. Exceeding either
        returns `422 Unprocessable Entity`.
      schema:
        type: string
        maxLength: 128
      example: Peeters
    PageNumber:
      name: page[number]
      in: query
      description: Page number (starts at 1)
      schema:
        type: integer
        default: 1
        minimum: 1
    PageSize:
      name: page[size]
      in: query
      description: 'Number of items per page (max: 100)'
      schema:
        type: integer
        default: 10
        maximum: 100
        minimum: 1
  schemas:
    Contact:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Contact UUID
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
        email:
          type: string
          format: email
          description: Email address. Trimmed and lowercased.
          nullable: true
        given_name:
          type: string
          nullable: true
          description: First name
        family_name:
          type: string
          nullable: true
          description: Last name
        company_name:
          type: string
          description: Company the contact belongs to
          nullable: true
        internal_ref:
          type: string
          description: Your own reference for the contact, such as its id in your CRM
          nullable: true
        phone:
          type: string
          description: Phone number, international format preferred
          nullable: true
        locale:
          type: string
          description: Language Penbox addresses the contact in
          nullable: true
        workspace:
          type: object
          description: Workspace the contact belongs to
          properties:
            id:
              type: string
              format: uuid
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: >-
        API token (starts with pnbx_). Create at
        https://app.penbox.io/workspace/settings/api. Include as: Authorization:
        Bearer {token}

````

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