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 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<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"
      ]
    }
  },
  "relationship": {
    "target_object_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
    "inverse_title": "Related Companies",
    "cardinality": "many-to-many"
  },
  "sort_order": 1,
  "stages": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "title": "<string>",
      "sort_order": 1,
      "config": {
        "is_closed": true,
        "is_won": true,
        "is_lost": true
      },
      "archived_at": "2023-11-07T05:31:56Z"
    }
  ],
  "options": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "title": "<string>",
      "sort_order": 1,
      "archived_at": "2023-11-07T05:31:56Z"
    }
  ]
}
'
{
  "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>",
    "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"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

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.

Maximum string length: 255
description
string | null
required

A text description for the attribute.

Maximum string length: 2000
type
enum<string>
required

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

Available options:
name,
personal-name,
website,
email-address,
text,
date,
timestamp,
number,
checkbox,
select,
multi-select,
currency,
record-reference,
actor-reference,
location,
phone-number,
pipeline,
relationship
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
relationship
object

Relationship configuration. Required when type is "relationship".

sort_order
integer

The sort order of the attribute. Used to control display order.

Required range: 0 <= x <= 10000
Example:

1

stages
object[]

Stage deltas to reconcile against this Attribute. Required for new pipeline Attributes (≥1 non-archived stage).

options
object[]

Option deltas to reconcile against this Attribute. Required for new select / multi-select Attributes (≥1 non-archived option).

Response

Success

data
object
required