---
title: "Create a user record"
method: POST
path: "/v2/objects/users/records"
tags: ["Users"]
---

# Create a user record

`POST /v2/objects/users/records`

Creates a new user record. This endpoint will throw on conflicts of unique attributes, like `primary_email_address`. If you would prefer to update user records on conflicts, please use the Assert user record endpoint instead. Please note, the `avatar_url` attribute cannot currently be set via the API.

Required scopes: `record_permission:read-write`, `object_configuration:read`.

## Request body

- object
  - `data` object, required
    - `values` object, required — This object's keys should be the slugs or IDs of the attributes you wish to update. Below, you'll find documentation for the value types of each standard user attribute. For information on potential custom attributes, refer to our [attribute type docs](/docs/attribute-types).
      - `person` union[]
        - union
          - object
            - `target_object` string, required — A UUID or slug to identify the object that the referenced record belongs to.
            - `target_record_id` string, uuid, required — A UUID to identify the referenced record.
          - object
            - `target_object` string, required — A UUID or slug to identify the object that the referenced record belongs to.
            - `[slug_or_id_of_matching_attribute]` union[], required — In addition to referencing records directly by record ID, you may also reference by a matching attribute of your choice. For example, if you want to add a reference to the person record with email "alice@website.com", you should pass a value with `target_object` set to `"people"` and `email_addresses` set to `[{email_address:"alice@website.com"}]`. The key should be the slug or ID of the matching attribute you would like to use and the value should be an array containing a single value of the appropriate attribute type (as specified below). Matching on multiple values is not currently supported. Matching attributes must be unique. This process is similar to how you use the `matching_attribute` query param in Attio's [assert endpoints](/rest-api/endpoint-reference/records/assert-a-record).
              - …
      - `primary_email_address` object[]
        - `email_address` string — An email address string
      - `user_id` object[]
        - `value` string, required — A raw text field. Values are limited to 10MB.
      - `workspace` union[]
        - union
          - object
            - `target_object` string, required — A UUID or slug to identify the object that the referenced record belongs to.
            - `target_record_id` string, uuid, required — A UUID to identify the referenced record.
          - object
            - `target_object` string, required — A UUID or slug to identify the object that the referenced record belongs to.
            - `[slug_or_id_of_matching_attribute]` union[], required — In addition to referencing records directly by record ID, you may also reference by a matching attribute of your choice. For example, if you want to add a reference to the person record with email "alice@website.com", you should pass a value with `target_object` set to `"people"` and `email_addresses` set to `[{email_address:"alice@website.com"}]`. The key should be the slug or ID of the matching attribute you would like to use and the value should be an array containing a single value of the appropriate attribute type (as specified below). Matching on multiple values is not currently supported. Matching attributes must be unique. This process is similar to how you use the `matching_attribute` query param in Attio's [assert endpoints](/rest-api/endpoint-reference/records/assert-a-record).
              - …

## Response `200`

Success

- object — Success
  - `data` object, required
    - `id` object, required
      - `workspace_id` string, uuid, required — A UUID identifying the workspace this record belongs to.
      - `object_id` string, uuid, required — A UUID identifying the object this record belongs to.
      - `record_id` string, uuid, required — A UUID identifying this record.
    - `created_at` string, required — When this record was created.
    - `web_url` string, uri, required — A URL that links directly to the record page in the Attio web application.
    - `values` object, required — An object with `attribute_slug` keys, and an array of value objects as the values. Attributes slugs (for example `person` or `primary_email_address`) can be used, including custom attribute slugs.
      - `person` object[]
        - `active_from` string, date-time, required — The point in time at which this value was made "active". `active_from` can be considered roughly analogous to `created_at`.
        - `active_until` string, date-time, nullable, required — The point in time at which this value was deactivated. If `null`, the value is active.
        - `created_by_actor` object, required — The actor that created this value.
          - `id` string, nullable — An ID to identify the actor.
          - `type` 'api-token' | 'workspace-member' | 'system' | 'app', nullable — The type of actor. [Read more information on actor types here](/docs/actors).
        - `target_object` string, required — A slug identifying the object that the referenced record belongs to.
        - `target_record_id` string, uuid, required — A UUID to identify the referenced record.
        - `attribute_type` 'record-reference', required — The attribute type of the value.
      - `primary_email_address` object[]
        - `active_from` string, date-time, required — The point in time at which this value was made "active". `active_from` can be considered roughly analogous to `created_at`.
        - `active_until` string, date-time, nullable, required — The point in time at which this value was deactivated. If `null`, the value is active.
        - `created_by_actor` object, required — The actor that created this value.
          - `id` string, nullable — An ID to identify the actor.
          - `type` 'api-token' | 'workspace-member' | 'system' | 'app', nullable — The type of actor. [Read more information on actor types here](/docs/actors).
        - `original_email_address` string, required
        - `email_address` string, required
        - `email_domain` string, required
        - `email_root_domain` string, required
        - `email_local_specifier` string, required
        - `attribute_type` 'email-address', required — The attribute type of the value.
      - `user_id` object[]
        - `active_from` string, date-time, required — The point in time at which this value was made "active". `active_from` can be considered roughly analogous to `created_at`.
        - `active_until` string, date-time, nullable, required — The point in time at which this value was deactivated. If `null`, the value is active.
        - `created_by_actor` object, required — The actor that created this value.
          - `id` string, nullable — An ID to identify the actor.
          - `type` 'api-token' | 'workspace-member' | 'system' | 'app', nullable — The type of actor. [Read more information on actor types here](/docs/actors).
        - `value` string, required — A raw text field. Values are limited to 10MB.
        - `attribute_type` 'text', required — The attribute type of the value.
      - `workspace` object[]
        - `active_from` string, date-time, required — The point in time at which this value was made "active". `active_from` can be considered roughly analogous to `created_at`.
        - `active_until` string, date-time, nullable, required — The point in time at which this value was deactivated. If `null`, the value is active.
        - `created_by_actor` object, required — The actor that created this value.
          - `id` string, nullable — An ID to identify the actor.
          - `type` 'api-token' | 'workspace-member' | 'system' | 'app', nullable — The type of actor. [Read more information on actor types here](/docs/actors).
        - `target_object` string, required — A slug identifying the object that the referenced record belongs to.
        - `target_record_id` string, uuid, required — A UUID to identify the referenced record.
        - `attribute_type` 'record-reference', required — The attribute type of the value.

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.dev/attio/apis/attio-standard-objects.md) · [All operations](https://skmtc.dev/attio/apis/attio-standard-objects/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/attio/attio-standard-objects/revisions/d6d3cac7a275/schema)
