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

# Update contact

> **Endpoint:** `v1/audiences/{audienceId}/contacts/{contactId}`

Update a specific contact's details.




## OpenAPI

````yaml api-reference/openapi.yml patch /audiences/{audienceId}/contacts/{contactId}
openapi: 3.1.0
info:
  title: Send Email API
  description: >
    Send transactional emails through MailDiver.


    ### Base URL

    All API endpoints are prefixed with `api.` subdomain:

    ```

    https://api.maildiver.com

    ```


    For the self-hosted version, if your domain is `example.com`:

    ```

    https://api.example.com

    ```


    ### Endpoint

    ```

    v1/emails

    ```


    ### Authentication

    All API requests require authentication using your API key in the
    Authorization header:

    ```

    Authorization: Bearer your-api-key

    ```
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.maildiver.com/v1
    description: Production server
    variables:
      domain:
        default: yourdomain.com
        description: Your domain (without the api. prefix)
security:
  - bearerAuth: []
paths:
  /audiences/{audienceId}/contacts/{contactId}:
    patch:
      tags:
        - Contact
      summary: Update contact
      description: |
        **Endpoint:** `v1/audiences/{audienceId}/contacts/{contactId}`

        Update a specific contact's details.
      operationId: updateContact
      parameters:
        - name: audienceId
          in: path
          required: true
          description: Unique identifier of the audience
          schema:
            type: string
          example: 01959b50-eda7-7597-acb1-cfeffdd53400
        - name: contactId
          in: path
          required: true
          description: Unique identifier of the contact
          schema:
            type: string
          example: 01959faf-16e2-77dd-9585-cd25da58855e
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: Contact's email address
                  example: suppressionlist+9@simulator.amazonses.com
                first_name:
                  type: string
                  description: Contact's first name (1-100 characters)
                  minLength: 1
                  maxLength: 100
                  example: John
                last_name:
                  type: string
                  description: Contact's last name (1-100 characters)
                  minLength: 1
                  maxLength: 100
                  example: Doe
                is_subscribed:
                  type: boolean
                  description: Whether the contact is subscribed to emails
                  example: true
            examples:
              valid:
                summary: Valid contact update
                value:
                  email: suppressionlist+9@simulator.amazonses.com
                  first_name: John
                  last_name: Doe
                  is_subscribed: true
              invalid:
                summary: Invalid name length
                value:
                  first_name: ''
                  last_name: Doe
      responses:
        '200':
          description: Contact successfully updated
          content:
            application/json:
              examples:
                success:
                  summary: Success response
                  value:
                    message: Contact updated
        '400':
          description: Bad request
          content:
            application/json:
              examples:
                invalidLength:
                  summary: Invalid name length
                  value:
                    message: first_name must be between 1 and 100 characters
        '403':
          description: Forbidden (API key is missing or invalid)
          content:
            application/json:
              examples:
                invalidKey:
                  summary: Invalid API key error
                  value:
                    message: Invalid API key
                    code: invalid_api_key
                invalidHeader:
                  summary: Invalid authorization header error
                  value:
                    message: Invalid authorization header
                    code: invalid_authorization_header
        '404':
          description: Contact not found
          content:
            application/json:
              examples:
                notFound:
                  summary: Contact not found error
                  value:
                    message: Contact not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with format "Bearer {your-api-key}"

````