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

# Update a contact

> Learn how to update a contact's information using the Notocat API. This guide covers the PUT /contacts/{id} endpoint, allowing you to modify existing contact details efficiently and keep your newsletter subscriber data up-to-date.

This endpoint can be used to update a single contact at a time by providing the contact ID. `con_D6zCfeVDaAAT-b9dl9SIE` is the contact ID in the example below.


## OpenAPI

````yaml PUT /contacts/{id}
openapi: 3.0.1
info:
  title: OpenAPI Contacts
  description: The contacts API allows you to manage your contacts in Notocat.
  version: 1.0.0
servers:
  - url: https://api.notocat.com/v1
security:
  - bearerAuth: []
paths:
  /contacts/{id}:
    put:
      description: Updates a contact
      parameters:
        - name: id
          in: path
          description: The ID of the contact to update
          required: true
          schema:
            type: string
      requestBody:
        description: The data to update the contact with
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewContact'
        required: true
      responses:
        '200':
          description: Contact updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewContact:
      required:
        - email
      type: object
      properties:
        email:
          description: The email of the contact
          type: string
        name:
          description: The name of the contact
          type: string
        first_name:
          description: The first name of the contact
          type: string
        last_name:
          description: The last name of the contact
          type: string
        subscribed:
          description: Subscription status of the contact
          type: boolean
          default: true
        custom_fields:
          description: >-
            Custom fields for the contact. Can be a `key: value` object or an
            array of objects. If the value is a date, it must be in ISO format
            or YYYY-MM-DD to be picked up correctly.
          oneOf:
            - type: object
            - type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                    description: Name of the custom field
                  value:
                    type: string
                    description: Value of the custom field
                  type:
                    type: string
                    description: >-
                      The data type of the custom field. Can be `string`,
                      `number`, `date`. This data is useful when segmenting
                      contacts. If the value is a date, it must be in ISO format
                      or YYYY-MM-DD to be picked up correctly.
                required:
                  - name
                  - value
                  - type
    Contact:
      type: object
      properties:
        id:
          description: The contact ID
          type: string
        workspace_id:
          description: The workspace ID
          type: string
        name:
          description: The name of the contact
          type: string
        first_name:
          description: The first name of the contact
          type: string
        last_name:
          description: The last name of the contact
          type: string
        email:
          description: The email of the contact
          type: string
        subscribed:
          description: Subscription status of the contact
          type: boolean
        unsub_token:
          description: Unsubscribe token for the contact
          type: string
        custom_fields:
          description: Custom fields of the contact
          type: object
        createdAt:
          description: Creation timestamp of the contact
          type: string
          format: date-time
        updatedAt:
          description: Last update timestamp of the contact
          type: string
          format: date-time
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````