Skip to main content
POST
/
v1
/
{target}
/
{identifier}
/
attributes
Create an attribute
curl --request POST \
  --url https://api.connect-crm.com/v1/{target}/{identifier}/attributes \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "type": "<string>",
  "is_required": true,
  "is_unique": true,
  "is_multi_select": true,
  "default_value": "<string>",
  "config": {
    "currency": null,
    "record_reference": {
      "allowed_object_ids": [
        "9293961c-df93-4d6d-a2cc-fc3e353b2d10"
      ]
    }
  }
}
'
{
  "data": {
    "id": {
      "workspace_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
      "object_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
      "attribute_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10"
    },
    "created_at": "2024-09-04T20:45:09Z",
    "archived_at": "2024-09-04T20:45:09Z",
    "slug": "<string>",
    "title": "<string>",
    "type": "<string>",
    "description": "<string>",
    "is_required": true,
    "is_unique": true,
    "is_multi_select": true,
    "is_system_attribute": true,
    "config": {
      "currency": null,
      "record_reference": {
        "allowed_object_ids": [
          "9293961c-df93-4d6d-a2cc-fc3e353b2d10"
        ]
      }
    },
    "relationship": {
      "id": {
        "attribute_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
        "object_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10"
      }
    },
    "sort_order": 1,
    "default_value": "Default Value"
  }
}

Path Parameters

target
enum<string>
required

Whether the attributes are on an object.

Available options:
objects
identifier
string
required

A UUID or slug to identify the object.

Body

application/json
title
string
required

The name of the attribute.

description
string | null
required

A text description for the attribute.

type
string
required

The type of the attribute. This value affects the possible config values.

is_required
boolean
required

When is_required is true, new records/entries must have a value for this attribute. If false, values may be null. This value does not affect existing data and you do not need to back-fill null values if changing is_required from false to true.

is_unique
boolean
required

Whether or not new values for this attribute must be unique. Uniqueness restrictions are only applied to new data and do not apply retroactively to previously created data.

is_multi_select
boolean
required

Whether or not this attribute can have multiple values. Multiselect is only available on some value types.

default_value
string | null
required

The default value for the attribute.

config
object
required

Response

Success

data
object
required