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

# Update Contact

> Change a contact's email, name, company or reference

Update a contact. Send only the fields that change: the others stay as they are. `null` clears a field. At least one field is required.

The contact stays the same contact under its new email: its Cases follow it.

> [!NOTE]
>
> There is no delete. Removing a contact stays a manual action inside Penbox.

```bash Change the email theme={null} theme={null}
curl --request PATCH \
  --url https://connect.penbox.io/v1/contacts/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "email": "jan@peeters.example" }'
```


## OpenAPI

````yaml PATCH /contacts/{id}
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/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Contact UUID
        schema:
          type: string
          format: uuid
    patch:
      summary: Update Contact
      description: >-
        Update a contact. Send only the fields that change: the others stay as
        they are. `null` clears a field. At least one field is required.
      operationId: update-contact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              minProperties: 1
              properties:
                email:
                  type: string
                  format: email
                  description: Email address. Trimmed and lowercased.
                  nullable: true
                given_name:
                  type: string
                  maxLength: 100
                  description: First name
                  nullable: true
                family_name:
                  type: string
                  maxLength: 100
                  description: Last name
                  nullable: true
                company_name:
                  type: string
                  maxLength: 255
                  description: Company the contact belongs to
                  nullable: true
                internal_ref:
                  type: string
                  maxLength: 255
                  description: >-
                    Your own reference for the contact, such as its id in your
                    CRM
                  nullable: true
                phone:
                  type: string
                  maxLength: 50
                  description: Phone number, international format preferred
                  example: '+32470123456'
                  nullable: true
                locale:
                  type: string
                  maxLength: 10
                  description: Language Penbox addresses the contact in
                  example: fr
                  nullable: true
      responses:
        '200':
          description: The updated contact
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: Invalid or empty body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Contact not found, or in a workspace your key does not cover
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  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.