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

# Update Contact

> Update contact details based on contact ID or Email using this API. However, you can't update the list ID and email.



## OpenAPI

````yaml /openapi-v1.json put /contacts/{id}
openapi: 3.1.0
info:
  title: Mailercloud Marketing API
  version: 1.0.0
  description: >-
    Campaigns, contacts, lists, segments, automations, and webhooks for the
    Mailercloud Marketing Platform.
servers:
  - url: https://cloudapi.mailercloud.com/v1
security:
  - apiKey: []
tags:
  - name: Campaigns
  - name: Contacts
  - name: Lists
  - name: Tags
  - name: Segments
  - name: Custom Properties
  - name: Senders
  - name: Templates
  - name: Automations
  - name: Webhooks
  - name: Webforms
  - name: Inbox Tracker
  - name: Account
paths:
  /contacts/{id}:
    put:
      tags:
        - Contacts
      summary: Update Contact
      description: >-
        Update contact details based on contact ID or Email using this API.
        However, you can't update the list ID and email.
      operationId: update-contact
      parameters:
        - name: id
          in: path
          required: true
          description: Contact Id or Email
          schema:
            type: string
        - name: Content-Type
          in: header
          required: true
          description: Request body type
          schema:
            type: string
            default: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                city:
                  type: string
                  description: |-
                    The city of the contact

                    Maximum: 100 
                  maxLength: 100
                country:
                  type: string
                  description: |-
                    The country of the contact

                    Maximum: 50
                  maxLength: 50
                custom_fields:
                  type: object
                  description: |-
                    Json for custom property
                     
                    Text - maximum: 100

                    Textarea - maximum: 500

                    Number - Numeric values only

                    Date - maximum: 10,format = 2006-01-02 
                  properties:
                    enc_id1:
                      type: string
                      minLength: 1
                      description: ' property id : value of property'
                    enc_id2:
                      type: number
                      description: ' property id : value of property'
                  required:
                    - enc_id1
                    - enc_id2
                department:
                  type: string
                  description: |-
                    The department of contact

                    Maximum: 100
                  maxLength: 100
                industry:
                  type: string
                  description: |-
                    The industry of the contact

                    Maximum: 100
                  maxLength: 100
                job_title:
                  type: string
                  description: |-
                    The job title of the contact 

                    Maximum: 100
                  maxLength: 100
                last_name:
                  type: string
                  description: |-
                    The last name for the contact

                    Maximum: 25
                  maxLength: 25
                lead_source:
                  type: string
                  description: |-
                    The lead sorce of contact

                    Maximum: 50
                  maxLength: 50
                middle_name:
                  type: string
                  maxLength: 25
                  description: |-
                    The middle name of contact

                    Maximum: 25
                first_name:
                  type: string
                  maxLength: 25
                  description: |-
                    Name of your contact

                    Maximum: 25
                company_name:
                  type: string
                  description: |-
                    The company name of your contact

                    Maximum: 150
                  maxLength: 150
                phone:
                  type: string
                  description: |-
                    The phone number of your contact

                    Maximum: 25
                  maxLength: 25
                salary:
                  type: number
                  description: |-
                    The salary of your contact

                    Maximum: 15
                state:
                  type: string
                  description: |-
                    The state of your contact

                    Maximum: 100
                  maxLength: 100
                postal_code:
                  type: string
                  description: |-
                    The postal code of your contact

                    Maximum: 25
                  maxLength: 25
                contact_type:
                  type: string
                  description: >-
                    Allowed values - active, bounce, abuse, unsubscribe,
                    suppressed, spam complaints
                tags:
                  type: array
                  description: The tags of your contact
                  items: {}
            examples:
              example-1:
                value:
                  city: string
                  country: string
                  custom_fields:
                    xyz: string
                    ncx: 0
                  department: string
                  industry: string
                  job_title: string
                  last_name: string
                  lead_source: string
                  middle_name: string
                  first_name: string
                  company_name: string
                  phone: string
                  salary: 0
                  state: string
                  postal_code: string
                  tags:
                    - string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  message:
                    type: string
                    minLength: 1
              examples:
                example-1:
                  value:
                    message: Contact updated
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      field:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
              examples:
                example-1:
                  value:
                    error:
                      field: name
                      message: Invalid name
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  errors:
                    type: array
                    uniqueItems: true
                    minItems: 1
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                          minLength: 1
              examples:
                example-1:
                  value:
                    errors:
                      - field: ''
                        message: Authorization failed
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  errors:
                    type: array
                    uniqueItems: true
                    minItems: 1
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          minLength: 1
                        message:
                          type: string
                          minLength: 1
              examples:
                example-1:
                  value:
                    errors:
                      - field: id
                        message: Record not found with the given Id
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your Mailercloud API key (plain text, no Bearer prefix). Create keys in
        Settings → API.

````