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

# List records

> Lists records, with the option to filter and sort results



## OpenAPI

````yaml post /v1/records/{object}/query
openapi: 3.1.0
info:
  version: 0.1.0
  title: Connect-CRM Backend API
servers:
  - url: https://api.connect-crm.com
security:
  - Bearer: []
paths:
  /v1/records/{object}/query:
    post:
      tags:
        - Records
      summary: List records
      description: Lists records, with the option to filter and sort results
      operationId: listRecords
      parameters:
        - schema:
            type: string
            description: A UUID or slug to identify the object.
          required: true
          description: A UUID or slug to identify the object.
          name: object
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordsQueryBody'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordsResponse'
        '401':
          description: Not Authorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  type:
                    type: string
                    example: not_authorized_error
                  code:
                    type: string
                    example: not_authorized
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 403
                  type:
                    type: string
                    example: forbidden_error
                  code:
                    type: string
                    example: forbidden
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  type:
                    type: string
                    example: invalid_request_error
                  code:
                    type: string
                    example: not_found
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
        '500':
          description: Invalid Server
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 500
                  type:
                    type: string
                    example: invalid_error
                  code:
                    type: string
                    example: ''
                  requestId:
                    type: string
                    example: 123e4567-e89b-12d3-a456-426655440000
                required:
                  - statusCode
                  - type
                  - code
                  - requestId
components:
  schemas:
    RecordsQueryBody:
      type: object
      properties:
        filters:
          type: array
          items:
            $ref: '#/components/schemas/AttributeFilter'
          maxItems: 10
          description: An array of attribute-based filters. Maximum 10 filters.
        joinOperator:
          type: string
          enum:
            - and
            - or
          default: and
          description: How to combine multiple attribute filters. Defaults to "and".
        limit:
          type: number
          exclusiveMinimum: 0
          maximum: 1000
          default: 100
          description: The maximum number of results to return.
        offset:
          type: number
          default: 0
          description: The number of results to skip over before returning.
        sorts:
          type: array
          items:
            type: object
            properties:
              direction:
                type: string
                default: asc
                description: The direction to sort the results by.
                enum:
                  - asc
                  - desc
              attribute:
                type: string
                format: uuid
                description: A slug or ID to identify the attribute to sort by.
              field:
                type: string
                description: >-
                  Which field on the value to sort by e.g. "last_name" on a name
                  value.
            required:
              - attribute
              - field
      required:
        - sorts
    RecordsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Record'
        has_more:
          type: boolean
          description: Whether there are more records available beyond the current page.
        total:
          type: number
          description: The total number of records matching the query.
      required:
        - data
        - has_more
        - total
    AttributeFilter:
      type: object
      properties:
        attribute:
          type: string
          description: The UUID or slug of the attribute definition to filter on.
          example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
        field:
          type: string
          enum:
            - full_name
            - first_name
            - last_name
            - phone_number
            - currency_value
            - city
            - state
            - country
            - postal_code
            - line1
          description: >-
            An optional subfield to filter on for complex JSON types (e.g.
            "full_name" on personal-name, "currency_value" on currency). Omit
            for types that store plain scalar values.
          example: full_name
        operator:
          $ref: '#/components/schemas/AttributeFilterOperator'
        value:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - type: array
              items:
                type: string
            - type: 'null'
          description: >-
            The value to compare against. Not required for isEmpty/isNotEmpty
            operators. For isBetween, use an array of two strings. For
            inArray/notInArray, use an array of strings.
      required:
        - attribute
        - operator
    Record:
      type: object
      properties:
        id:
          type: object
          properties:
            workspace_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the workspace this object belongs to.
            object_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the object.
            record_id:
              type: string
              example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
              description: A UUID to identify the record.
          required:
            - workspace_id
            - object_id
            - record_id
        values:
          type: object
          additionalProperties:
            anyOf:
              - $ref: '#/components/schemas/AttributeValueText'
              - $ref: '#/components/schemas/AttributeValueName'
              - $ref: '#/components/schemas/AttributeValueRecordReference'
              - $ref: '#/components/schemas/AttributeValueRelationship'
              - $ref: '#/components/schemas/AttributeValueActorReference'
              - $ref: '#/components/schemas/AttributeValueCheckbox'
              - $ref: '#/components/schemas/AttributeValueCurrency'
              - $ref: '#/components/schemas/AttributeValueSelect'
              - $ref: '#/components/schemas/AttributeValueMultiSelect'
              - $ref: '#/components/schemas/AttributeValueDate'
              - $ref: '#/components/schemas/AttributeValueWebsite'
              - $ref: '#/components/schemas/AttributeValueEmailAddress'
              - $ref: '#/components/schemas/AttributeValueLocation'
              - $ref: '#/components/schemas/AttributeValueNumber'
              - $ref: '#/components/schemas/AttributeValuePersonalName'
              - $ref: '#/components/schemas/AttributeValuePhoneNumber'
              - $ref: '#/components/schemas/AttributeValuePipeline'
              - $ref: '#/components/schemas/AttributeValueTimestamp'
              - type: array
                items:
                  $ref: '#/components/schemas/AttributeValue'
          description: >-
            A record type with an attribute slug as the key, and an array of
            value objects as the values.
        created_at:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: When the record was created.
        created_via:
          $ref: '#/components/schemas/RecordCreatedVia'
      required:
        - id
        - values
        - created_at
        - created_via
    AttributeFilterOperator:
      type: string
      enum:
        - eq
        - ne
        - lt
        - lte
        - gt
        - gte
        - iLike
        - notILike
        - iLikePersonalName
        - inArray
        - notInArray
        - isEmpty
        - isNotEmpty
        - isBetween
      description: The comparison operator to use for this filter.
    AttributeValueText:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        value:
          type: string
          example: John Doe
          description: The text value of the attribute.
        attribute_type:
          type: string
          enum:
            - text
          description: The type of the attribute, which is "text" for this value.
          example: text
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - value
        - attribute_type
    AttributeValueName:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        value:
          type: string
          example: Acme Corp
          description: The name value of the attribute.
        attribute_type:
          type: string
          enum:
            - name
          description: The type of the attribute, which is "name" for this value.
          example: name
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - value
        - attribute_type
    AttributeValueRecordReference:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        target_object:
          type: string
          description: The type of the referenced object, typically a UUID or slug.
          examples:
            - 9293961c-df93-4d6d-a2cc-fc3e353b2d10
            - contacts
        target_record:
          type: string
          description: The identifier of the referenced record.
          example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
        display_name:
          type: string
          description: The resolved display name of the referenced record.
          example: Bright Solutions
        target_deleted:
          type: boolean
          default: false
          description: >-
            Whether the referenced record has been deleted. A deleted target
            keeps its resolved display_name — the reference itself is untouched,
            so the link is restored if the record is — but the record is no
            longer retrievable and clients must not link to it.
          example: false
        attribute_type:
          type: string
          enum:
            - record-reference
          description: >-
            The type of the attribute, which is "record-reference" for this
            value.
          example: record-reference
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - target_object
        - target_record
        - attribute_type
    AttributeValueRelationship:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        target_object:
          type: string
          description: The type of the referenced object, typically a UUID or slug.
          examples:
            - 9293961c-df93-4d6d-a2cc-fc3e353b2d10
            - contacts
        target_record:
          type: string
          description: The identifier of the referenced record.
          example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
        display_name:
          type: string
          description: The resolved display name of the referenced record.
          example: Bright Solutions
        target_deleted:
          type: boolean
          default: false
          description: >-
            Whether the referenced record has been deleted. A deleted target
            keeps its resolved display_name — the reference itself is untouched,
            so the link is restored if the record is — but the record is no
            longer retrievable and clients must not link to it.
          example: false
        attribute_type:
          type: string
          enum:
            - relationship
          description: The type of the attribute, which is "relationship" for this value.
          example: relationship
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - target_object
        - target_record
        - attribute_type
    AttributeValueActorReference:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        actor_reference_type:
          type: string
          description: The type of the record reference, typically "user".
          example: user
        actor_reference_id:
          type: string
          description: The identifier of the referenced actor.
          example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
        attribute_type:
          type: string
          enum:
            - actor-reference
          description: >-
            The type of the attribute, which is "actor-reference" for this
            value.
          example: actor-reference
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - actor_reference_type
        - actor_reference_id
        - attribute_type
    AttributeValueCheckbox:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        value:
          type: boolean
          example: true
          description: The boolean value of the attribute, indicating true or false.
        attribute_type:
          type: string
          enum:
            - checkbox
          description: The type of the attribute, which is "checkbox" for this value.
          example: checkbox
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - value
        - attribute_type
    AttributeValueCurrency:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        currency_value:
          type: number
          example: 100
          description: The numeric value of the currency attribute.
        currency_code:
          type: string
          example: USD
          description: The currency code (e.g., USD, EUR) of the currency attribute.
        attribute_type:
          type: string
          enum:
            - currency
          description: The type of the attribute, which is "currency" for this value.
          example: currency
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - currency_value
        - currency_code
        - attribute_type
    AttributeValueSelect:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        option:
          type: object
          properties:
            id:
              type: object
              properties:
                workspace_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the workspace this object belongs to.
                object_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the object.
                attribute_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the attribute.
                option_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the option within the select attribute.
              required:
                - workspace_id
                - object_id
                - attribute_id
                - option_id
            title:
              type: string
              description: The resolved display title of the selected option.
              example: Active
          required:
            - id
        attribute_type:
          type: string
          enum:
            - select
          description: The type of the attribute, which is "select" for this value.
          example: select
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - option
        - attribute_type
    AttributeValueMultiSelect:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        option:
          type: object
          properties:
            id:
              type: object
              properties:
                workspace_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the workspace this object belongs to.
                object_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the object.
                attribute_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the attribute.
                option_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the option within the select attribute.
              required:
                - workspace_id
                - object_id
                - attribute_id
                - option_id
            title:
              type: string
              description: The resolved display title of the selected option.
              example: Active
          required:
            - id
        attribute_type:
          type: string
          enum:
            - multi-select
          description: The type of the attribute, which is "multi-select" for this value.
          example: multi-select
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - option
        - attribute_type
    AttributeValueDate:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        value:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date value of the attribute in ISO 8601 format.
        attribute_type:
          type: string
          enum:
            - date
          description: The type of the attribute, which is "date" for this value.
          example: date
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - value
        - attribute_type
    AttributeValueWebsite:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        domain:
          $ref: '#/components/schemas/Domain'
        attribute_type:
          type: string
          enum:
            - website
          description: The type of the attribute, which is "website" for this value.
          example: website
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - domain
        - attribute_type
    AttributeValueEmailAddress:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        email_address:
          type: string
          format: email
          example: john@example.com
          description: The email address value of the attribute.
        attribute_type:
          type: string
          enum:
            - email-address
          description: The type of the attribute, which is "email-address" for this value.
          example: email-address
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - email_address
        - attribute_type
    AttributeValueLocation:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        line1:
          type: string
          example: 123 Main St
          description: The first line of the address, typically the street address.
        line2:
          type: string
          example: Apt 4B
          description: >-
            The second line of the address, typically an apartment or suite
            number.
        line3:
          type: string
          example: Building 5
          description: >-
            The third line of the address, typically used for additional address
            information.
        city:
          type: string
          example: Anytown
          description: The city of the address.
        state:
          type: string
          example: CA
          description: The state or region of the address.
        postal_code:
          type: string
          example: '12345'
          description: The postal code of the address.
        country:
          type: string
          example: USA
          description: The country of the address.
        attribute_type:
          type: string
          enum:
            - location
          description: The type of the attribute, which is "location" for this value.
          example: location
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - line1
        - city
        - state
        - postal_code
        - country
        - attribute_type
    AttributeValueNumber:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        value:
          type: number
          example: 42
          description: The numeric value of the attribute.
        attribute_type:
          type: string
          enum:
            - number
          description: The type of the attribute, which is "number" for this value.
          example: number
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - value
        - attribute_type
    AttributeValuePersonalName:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        first_name:
          type: string
          example: John
          description: The first name of the person.
        last_name:
          type: string
          example: Doe
          description: The last name of the person.
        full_name:
          type: string
          example: John Doe
          description: >-
            The synthesized full name of the person (first_name and last_name
            space-joined, empty parts filtered).
        attribute_type:
          type: string
          enum:
            - personal-name
          description: The type of the attribute, which is "personal-name" for this value.
          example: personal-name
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - first_name
        - last_name
        - full_name
        - attribute_type
    AttributeValuePhoneNumber:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        phone_number:
          type: string
          example: '+1234567890'
          description: The phone number in E.164 format.
        country_code:
          type: string
          example: US
          description: >-
            The country code of the phone number, typically in ISO 3166-1
            alpha-2 format.
        attribute_type:
          type: string
          enum:
            - phone-number
          description: The type of the attribute, which is "phone-number" for this value.
          example: phone-number
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - phone_number
        - country_code
        - attribute_type
    AttributeValuePipeline:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        pipeline:
          type: object
          properties:
            id:
              type: object
              properties:
                workspace_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the workspace this object belongs to.
                object_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the object.
                attribute_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the attribute.
                stage_id:
                  type: string
                  example: 9293961c-df93-4d6d-a2cc-fc3e353b2d10
                  description: A UUID to identify the stage within the pipeline.
              required:
                - workspace_id
                - object_id
                - attribute_id
                - stage_id
          required:
            - id
        attribute_type:
          type: string
          enum:
            - pipeline
          description: The type of the attribute, which is "pipeline" for this value.
          example: pipeline
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - pipeline
        - attribute_type
    AttributeValueTimestamp:
      type: object
      properties:
        active_from:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The date and time when the value became active.
        attribute_slug:
          type: string
          description: The slug identifier of the attribute this value belongs to.
          example: name
        active_until:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2024-09-04T20:45:09Z'
            - null
          description: >-
            The date and time when the value will no longer be active. If the
            value is currently active, this will be null.
        created_by:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: The identifier of the user who created the value.
            type:
              type: string
              description: The type of the creator, typically "user".
              examples:
                - user
                - system
          required:
            - id
            - type
        value:
          type: string
          format: date-time
          example: '2024-09-04T20:45:09Z'
          description: The timestamp value of the attribute in ISO 8601 format.
        attribute_type:
          type: string
          enum:
            - timestamp
          description: The type of the attribute, which is "timestamp" for this value.
          example: timestamp
      required:
        - active_from
        - attribute_slug
        - active_until
        - created_by
        - value
        - attribute_type
    AttributeValue:
      anyOf:
        - $ref: '#/components/schemas/AttributeValueText'
        - $ref: '#/components/schemas/AttributeValueName'
        - $ref: '#/components/schemas/AttributeValueRecordReference'
        - $ref: '#/components/schemas/AttributeValueRelationship'
        - $ref: '#/components/schemas/AttributeValueActorReference'
        - $ref: '#/components/schemas/AttributeValueCheckbox'
        - $ref: '#/components/schemas/AttributeValueCurrency'
        - $ref: '#/components/schemas/AttributeValueSelect'
        - $ref: '#/components/schemas/AttributeValueMultiSelect'
        - $ref: '#/components/schemas/AttributeValueDate'
        - $ref: '#/components/schemas/AttributeValueWebsite'
        - $ref: '#/components/schemas/AttributeValueEmailAddress'
        - $ref: '#/components/schemas/AttributeValueLocation'
        - $ref: '#/components/schemas/AttributeValueNumber'
        - $ref: '#/components/schemas/AttributeValuePersonalName'
        - $ref: '#/components/schemas/AttributeValuePhoneNumber'
        - $ref: '#/components/schemas/AttributeValuePipeline'
        - $ref: '#/components/schemas/AttributeValueTimestamp'
    RecordCreatedVia:
      type: object
      properties:
        source:
          type:
            - string
            - 'null'
          enum:
            - user
            - system
            - integration
            - webhook
            - null
          description: >-
            The actor kind that created the record. Null when the record
            predates provenance capture — it is not backfilled, because
            defaulting it would fabricate an origin.
          examples:
            - user
            - null
        via_import:
          type: boolean
          description: >-
            True when the record was created by a bulk import batch. Independent
            of `source`, which still names the actor that ran the import.
          example: false
        origin_name:
          type:
            - string
            - 'null'
          description: >-
            Display name of the specific integration or webhook provider, when
            one is known. Null otherwise.
          examples:
            - HubSpot
            - null
        import_job_id:
          type:
            - string
            - 'null'
          description: >-
            The import batch that created the record, when `via_import` is true.
            Null otherwise. Carried so a client can link straight to the batch
            without a second lookup.
          examples:
            - 9293961c-df93-4d6d-a2cc-fc3e353b2d10
            - null
        import_mapping_id:
          type:
            - string
            - 'null'
          description: >-
            The import Mapping the batch belongs to. Travels beside
            `import_job_id` because a batch is addressed by BOTH ids, so a job
            id alone cannot build a link to it. Null on the same terms as
            `import_file_name` — no import, or a batch that no longer exists.
          examples:
            - 4f1e1c40-1a0e-4f37-9f9a-0f0f4ba2f0d2
            - null
        import_file_name:
          type:
            - string
            - 'null'
          description: >-
            The file the import batch was uploaded from. Null when the record
            did not come from an import, or when the batch it names no longer
            exists.
          examples:
            - contacts-q3.csv
            - null
        actor_name:
          type:
            - string
            - 'null'
          description: >-
            Display name of the user who created the record. Null when no user
            did (system, integration and webhook writes), or when that user has
            since been removed from the workspace.
          examples:
            - Erik van Dam
            - null
      required:
        - source
        - via_import
        - origin_name
        - import_job_id
        - import_mapping_id
        - import_file_name
        - actor_name
      description: How the record came into existence.
    Domain:
      type: string
      example: example.com
      description: The website value of the attribute.
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````