---
title: "Create a workspace record"
method: POST
path: "/v2/objects/workspaces/records"
tags: ["Workspaces"]
---

# Create a workspace record

`POST /v2/objects/workspaces/records`

Creates a new workspace record. This endpoint will throw on conflicts of unique attributes, like `workspace_id`. If you would prefer to update workspace records on conflicts, please use the Assert workspace record endpoint instead.

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 workspace attribute. For information on potential custom attributes, refer to our [attribute type docs](/docs/attribute-types).
      - `workspace_id` object[]
        - `value` string, required — A raw text field. Values are limited to 10MB.
      - `name` object[]
        - `value` string, required — A raw text field. Values are limited to 10MB.
      - `users` 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).
              - …
      - `company` 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).
              - …
      - `avatar_url` object[]
        - `value` string, required — A raw text field. Values are limited to 10MB.

## 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.
      - `workspace_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.
      - `name` 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.
      - `users` 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.
      - `company` 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.
      - `avatar_url` 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.

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