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

# Update record

> Update an existing record by ID.

## Overview

The *update* method modifies an existing record by its unique ID. You can
provide values for any attributes you want to update in the request body.
Attributes not included in the request will remain unchanged.

If the record doesn't exist, the API will return a 404 error. This method will
not create a new record. If you want to create a record if it doesn't exist, use
the [upsert method](/developers/api/data/records/upsert) instead.

<Warning>
  This method will overwrite existing values on the record, which may be
  undesirable. If you want a safer alternative, use the [upsert method](/developers/api/data/records/upsert)
  and pass `update_if_empty` instead.
</Warning>

## Examples

<AccordionGroup>
  <Accordion title="Update a company">
    This updates specific fields on a company record:

    <CodeGroup>
      ```http Request theme={null}
      PATCH /objects/company/records/11b41071-1ac7-4419-b3bd-3da132502826

      {
        "status": "Inactive",
        "description": "An updated description for this company."
      }
      ```

      ```json Response theme={null}
      {
        "status": "success",
        "data": {
          "object": "company",
          "id": "11b41071-1ac7-4419-b3bd-3da132502826",
          "created_at": "2025-09-04T01:23:45Z",
          "updated_at": "2025-09-04T01:23:45Z",
          "attributes": {
            "name": "Unify",
            "domain": "unifygtm.com",
            "status": "Inactive",
            "description": "An updated description for this company."
            // ...
          }
        }
      }
      ```
    </CodeGroup>

    This updates only the `status` and `description` fields on the company. All
    other fields remain unchanged.
  </Accordion>

  <Accordion title="Update a person">
    This updates a person's job title and associated company:

    <CodeGroup>
      ```http Request theme={null}
      PATCH /objects/person/records/5ce127ba-8d7e-42d0-9e60-76017a04caec

      {
        "title": "Senior Developer",
        "company": {
          "id": "11b41071-1ac7-4419-b3bd-3da132502826"
        }
      }
      ```

      ```json Response theme={null}
      {
        "status": "success",
        "data": {
          "object": "person",
          "id": "5ce127ba-8d7e-42d0-9e60-76017a04caec",
          "created_at": "2025-09-04T01:23:45Z",
          "updated_at": "2025-09-04T01:23:45Z",
          "attributes": {
            "first_name": "Austin",
            "last_name": "Hughes",
            "email": "austinhughes@unifygtm.com",
            "title": "Senior Developer",
            "company": "11b41071-1ac7-4419-b3bd-3da132502826"
            // ...
          }
        }
      }
      ```
    </CodeGroup>

    In this case, we knew the exact ID of the company we wanted to link this
    person to, but you could also use a nested `match` or upsert if desired.
  </Accordion>

  <Accordion title="Update a custom record">
    This updates fields on a custom object record:

    <CodeGroup>
      ```http Request theme={null}
      PATCH /objects/product_user/records/e624b659-7a50-4925-9a49-dc2dae8dcb60

      {
        "plan": "enterprise",
        "last_login": "2024-01-15T10:30:00Z"
      }
      ```

      ```json Response theme={null}
      {
        "status": "success",
        "data": {
          "object": "product_user",
          "id": "e624b659-7a50-4925-9a49-dc2dae8dcb60",
          "created_at": "2025-09-04T01:23:45Z",
          "updated_at": "2025-09-04T01:23:45Z",
          "attributes": {
            "user_id": "6b2a2761-3cbe-481f-8a1e-b24859c674f8",
            "full_name": "Bob Smith",
            "email_address": "bob.smith@gmail.com",
            "plan": "enterprise",
            "last_login": "2024-01-15T10:30:00Z"
            // ...
          }
        }
      }
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

## Usage


## OpenAPI

````yaml PATCH /objects/{object_name}/records/{record_id}
openapi: 3.1.0
info:
  title: Unify Data API
  summary: Interact with objects, attributes, and records within the Unify platform.
  version: '1'
  termsOfService: https://www.unifygtm.com/legal/terms-and-conditions
  contact:
    name: Unify Support
    url: https://www.unifygtm.com/support
    email: support@unifygtm.com
servers:
  - url: https://api.unifygtm.com/data/v1
    variables: {}
security:
  - ApiKeyAuth: []
tags:
  - name: Objects
  - name: Object Attributes
  - name: Object Attribute Options
  - name: Object Records
paths:
  /objects/{object_name}/records/{record_id}:
    patch:
      tags:
        - Object Records
      operationId: update_object_record
      parameters:
        - name: object_name
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/UObjects.UObjectName'
        - name: record_id
          in: path
          required: true
          schema:
            type: string
        - name: validation_mode
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ValidationMode'
          explode: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRecordRequest'
      responses:
        '200':
          description: Response for a successful update operation.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    type: object
                    required:
                      - object
                      - id
                      - created_at
                      - updated_at
                      - attributes
                    properties:
                      object:
                        type: string
                        description: >-
                          The API name of the object this record is an instance
                          of.
                        readOnly: true
                      id:
                        allOf:
                          - $ref: '#/components/schemas/UValues.UUuid'
                        description: Unique UUID identifier for the record.
                        readOnly: true
                      created_at:
                        type: string
                        format: date-time
                        description: Date and time the record was created.
                        readOnly: true
                      updated_at:
                        type: string
                        format: date-time
                        description: Date and time the record was last updated.
                        readOnly: true
                      attributes:
                        type: object
                        unevaluatedProperties:
                          anyOf:
                            - $ref: '#/components/schemas/UValues.UValue'
                            - type: 'null'
                        description: >-
                          Attribute values for the record. Each key is the API
                          name of the attribute

                          and each value is the corresponding attribute value
                          for the record.
                description: Response for a successful update operation.
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                properties:
                  status:
                    type: string
                    enum:
                      - bad_request
                      - record_missing_required_field
                      - referenced_record_not_found
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: >-
                  Response for any operation that results in a bad request
                  error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - unauthorized
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an unauthorized
                  error.
        '404':
          description: Response for any operation that results in a not found error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - object_not_found
                      - record_not_found
                  message:
                    type: string
                description: Response for any operation that results in a not found error.
        '409':
          description: Response for any operation that results in a conflict error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - record_conflict
                  message:
                    type: string
                description: Response for any operation that results in a conflict error.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an internal server
                  error.
        '503':
          description: Response for any operation that results in service unavailability.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - service_unavailable
                  message:
                    type: string
                description: >-
                  Response for any operation that results in service
                  unavailability.
components:
  schemas:
    UObjects.UObjectName:
      type: string
    ValidationMode:
      type: string
      enum:
        - strict
        - ignore_invalid
      description: >-
        Validation mode to use when validating request data.


        `strict` validation will fail requests if any attribute fails
        validation,

        including unrecognized attributes.


        `ignore_invalid` validation will strip out unknown attributes and
        replace

        known, non-required attributes with `undefined` if they fail validation.

        The request will still fail if the request body does not contain the
        proper

        structure or if any required attributes fail validation.
    UpdateRecordRequest:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          unevaluatedProperties:
            $ref: '#/components/schemas/UValues.UValue'
          description: The attribute values to update in the record.
      description: Request body for updating a record.
    UValues.UUuid:
      type: string
      description: String UUIDv4 value.
      title: UUuid
    UResponses.BadRequestError:
      type: object
      required:
        - code
      properties:
        code:
          type: string
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        object_api_name:
          type: string
        attribute_api_name:
          type: string
      allOf:
        - type: object
          unevaluatedProperties: {}
      description: Validation error detail returned for bad request responses.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````