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

# Find unique record

> Find a specific record based on unique values.

## Overview

The *find unique* method searches for a single record based on one or more
unique attribute values. The response will contain exactly zero or one record.

This method is useful when you need to find a record by its unique identifier
other than the record ID. For example, you can use it to find a company by its
domain or a person by their email address. If you have custom objects with
unique identifiers, this method can be used to locate records based on those
unique attributes.

## Examples

<AccordionGroup>
  <Accordion title="Find a company by domain">
    This finds a company record by its unique domain:

    <CodeGroup>
      ```http Request theme={null}
      POST /objects/company/records/find-unique

      {
        "domain": "unifygtm.com"
      }
      ```

      ```json Response theme={null}
      {
        "status": "success",
        "data": {
          "object": "company",
          "id": "73fcb798-9ccd-4138-8f6a-9a801123783c",
          "created_at": "2025-09-04T01:23:45Z",
          "updated_at": "2025-09-04T01:23:45Z",
          "attributes": {
            "name": "Unify",
            "domain": "unifygtm.com",
            "description": "A nice company with a top-notch API.",
            "status": "Active"
            // ...
          }
        }
      }
      ```
    </CodeGroup>

    This returns the company for Unify if it exists, otherwise the response will
    contain `null` for the record.
  </Accordion>

  <Accordion title="Find a custom record">
    This finds a record in a custom object by a unique identifier:

    <CodeGroup>
      ```http Request theme={null}
      POST /objects/product_user/records/find-unique

      {
        "user_id": "Zz9O-5O8W-s41T"
      }
      ```

      ```json Response theme={null}
      {
        "status": "success",
        "data": {
          "object": "product_user",
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "created_at": "2025-09-04T01:23:45Z",
          "updated_at": "2025-09-04T01:23:45Z",
          "attributes": {
            "user_id": "Zz9O-5O8W-s41T",
            "full_name": "Alice Smith",
            "email_address": "alice@example.com",
            "plan": "enterprise"
            // ...
          }
        }
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Find using multiple attributes">
    This finds a custom object record using a combination of unique and
    non-unique attributes:

    <CodeGroup>
      ```http Request theme={null}
      POST /objects/product_user/records/find-unique

      {
        "user_id": "Zz9O-5O8W-s41T",
        "email": "alice@example.com",
        "product_code": "PRO-PLAN"
      }
      ```

      ```json Response theme={null}
      {
        "status": "success",
        "data": {
          "object": "product_user",
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "created_at": "2025-09-04T01:23:45Z",
          "updated_at": "2025-09-04T01:23:45Z",
          "attributes": {
            "user_id": "Zz9O-5O8W-s41T",
            "full_name": "Alice Smith",
            "email": "alice@example.com",
            "product_code": "PRO-PLAN"
            // ...
          }
        }
      }
      ```
    </CodeGroup>

    In this case, the custom attributes `user_id` and `email` are unique, but
    `product_code` is not. Only a record which matches all of these criteria
    will be returned.
  </Accordion>
</AccordionGroup>

## Usage


## OpenAPI

````yaml POST /objects/{object_name}/records/find-unique
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/find-unique:
    post:
      tags:
        - Object Records
      operationId: find_unique_object_record
      parameters:
        - name: object_name
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/UObjects.UObjectName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FindUniqueRecordRequest'
      responses:
        '200':
          description: Response for a successful get operation.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    anyOf:
                      - 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.
                      - type: 'null'
                description: Response for a successful get 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
                  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
                  message:
                    type: string
                description: Response for any operation that results in a not found 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.
components:
  schemas:
    UObjects.UObjectName:
      type: string
    FindUniqueRecordRequest:
      type: object
      required:
        - match
      properties:
        match:
          type: object
          unevaluatedProperties:
            anyOf:
              - $ref: '#/components/schemas/UValues.UValue'
              - type: 'null'
          description: >-
            The attribute values to match against to find an existing record.


            At least one unique attribute must be included to ensure that at
            most one

            record is matched. Additional unique or non-unique attributes may
            also be

            included to refine the matching criteria.
      description: Request body for finding a unique record by attribute values.
    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

````