Skip to main content
POST
/
crm
/
objects
/
{slug}
/
attributes
Add an attribute to a CRM object
curl --request POST \
  --url https://api.zeeg.me/v2/crm/objects/{slug}/attributes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "select",
  "label": "Customer Status",
  "isRequired": false,
  "isUnique": false,
  "validation": [],
  "options": [
    {
      "value": "Active",
      "color": "success",
      "id": 1
    }
  ],
  "relationType": "many_to_one",
  "relatedObjectSlug": "companies",
  "relatedObjectLabel": "Contacts",
  "currency": "EUR",
  "currencyDisplay": "symbol",
  "currencyDecimal": true,
  "currencyGrouping": true
}
'
{
  "success": true,
  "status": 201,
  "attribute": {
    "key": "customer_status",
    "label": "Customer Status",
    "type": "select",
    "isRequired": false,
    "isStandard": false,
    "isUnique": false,
    "isArchived": false,
    "options": [
      {
        "id": 1,
        "value": "Lead",
        "color": "warning"
      },
      {
        "id": 2,
        "value": "Active",
        "color": "success"
      }
    ],
    "createdAt": "2025-06-15T10:00:00+00:00",
    "updatedAt": "2025-06-15T10:00:00+00:00"
  }
}

Documentation Index

Fetch the complete documentation index at: https://developer.zeeg.me/llms.txt

Use this file to discover all available pages before exploring further.

Key auto-generation

You do not set the key — the server derives it from label by converting to snake_case (e.g. "Product Name""product_name"). The generated key is returned in the 201 response. Use this key to reference the attribute in subsequent PATCH calls and when writing record values. If another attribute with the same derived key already exists, the server appends a suffix (e.g. product_name_2).

Attribute type reference

Every attribute requires label, type, isRequired, and isArchived. The sections below list the extra fields each type needs and what values it stores.

text

Stores a free-form string. Extra fields
FieldRequiredDescription
isUniqueyesReject duplicate values across records.
validationnoArray of format validators: "email", "url", or both.
Example request
{
  "label": "Work Email",
  "type": "text",
  "isRequired": false,
  "isUnique": true,
  "isArchived": false,
  "validation": ["email"]
}

number

Stores a numeric value (integer or decimal). Extra fields
FieldRequiredDescription
isUniqueyesReject duplicate values across records.

phone_number

Stores a phone number string. Displayed with a phone-number input in the UI. Extra fields
FieldRequiredDescription
isUniqueyesReject duplicate values across records.

date

Stores a calendar date (no time component). No extra fields.

datetime

Stores a date and time with timezone. No extra fields.

checkbox

Stores a boolean (true / false). No extra fields.

select

Stores one value chosen from a fixed list. Extra fields
FieldRequiredDescription
optionsyesArray of 1–20 option objects. Each option: value (string), color (named color — see below). Do not include id on create.
Allowed colors gray primary warning success cyan sky violet fuchsia rose blue green red pink black yellow orange Example request
{
  "label": "Category",
  "type": "select",
  "isRequired": false,
  "isArchived": false,
  "options": [
    { "value": "Electronics", "color": "primary" },
    { "value": "Clothing",    "color": "success" },
    { "value": "Clearance",   "color": "warning" }
  ]
}

multiselect

Stores multiple values from a fixed list. Same fields as select. Extra fields Same as selectoptions array required.

status

Like select but rendered as a status badge. Change history is logged for auditing. Same fields as select. Extra fields Same as selectoptions array required.

rating

Stores an integer rating (1–5 stars in the UI). No extra fields.

relation

Links a record to one or more records in another CRM object. Extra fields
FieldRequiredDescription
relationTypeyesCardinality: one_to_one, many_to_one, one_to_many, or many_to_many.
relatedObjectSlugyesSlug of the target object (people, companies, or a custom object slug). Immutable after creation.
relatedObjectLabelyesDisplay label shown for the relation in the UI (e.g. "Person", "Company").
one_to_one / many_to_one → the field accepts a single linked record.
one_to_many / many_to_many → the field accepts multiple linked records.
Example request
{
  "label": "Assigned Person",
  "type": "relation",
  "isRequired": false,
  "isArchived": false,
  "relationType": "many_to_one",
  "relatedObjectSlug": "people",
  "relatedObjectLabel": "Person"
}

currency

Stores a numeric monetary value with display formatting. Extra fields
FieldRequiredDescription
currencyyesISO 4217 currency code (e.g. EUR, USD, GBP). Immutable after creation.
currencyDisplayyesHow the currency is shown: code (EUR 12.00), name (Euro 12.00), or symbol (€12.00).
currencyDecimalyestrue to show decimal places.
currencyGroupingyestrue to use a thousands separator (1,000.00 vs 1000.00).
currencyDisplay, currencyDecimal, and currencyGrouping can be changed later via PATCH. The currency code is immutable after creation. Supported currency codes USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD, SEK, DKK, NOK, CZK, PLN, HUF, RON, BRL, MXN, CNY, SGD, THB, PHP, IDR, INR, ZAR, MYR, VND, KRW, TND, OMR, QAR, SAR, AED, BHD, KWD, JOD, LYD, IRR, TRY. Example request
{
  "label": "Price",
  "type": "currency",
  "isRequired": false,
  "isArchived": false,
  "currency": "EUR",
  "currencyDisplay": "symbol",
  "currencyDecimal": true,
  "currencyGrouping": true
}

user

Links the record to one or more workspace members. Values are user IDs. No extra fields. Always supports multiple selection.

Authorizations

Authorization
string
header
required

Path Parameters

slug
string
required

The object slug to add the attribute to.

Example:

"people"

Body

application/json
type
enum<string>
required

Attribute data type. Cannot be changed after creation.

Available options:
text,
number,
phone_number,
date,
datetime,
checkbox,
select,
multiselect,
rating,
relation,
status,
user,
currency
Example:

"select"

label
string
required

Human-readable label. The attribute key is auto-generated from this value.

Maximum string length: 255
Example:

"Customer Status"

isRequired
boolean
required

Whether a value is required when creating a record.

Example:

false

isUnique
boolean

Whether values must be unique across records. Applies to text, phone, and number types.

Example:

false

validation
enum<string>[]

Validation constraints for text type attributes.

Available options:
email,
url
options
object[]

Required for select, multiselect, and status types. Max 20 options.

relationType
enum<string>

Required for relation type.

Available options:
one_to_one,
many_to_one,
one_to_many,
many_to_many
Example:

"many_to_one"

Required for relation type. Slug of the object to link to.

Example:

"companies"

Required for relation type. Label shown on the related object's record.

Example:

"Contacts"

currency
string

Required for currency type. ISO 4217 currency code.

Example:

"EUR"

currencyDisplay
enum<string>

Required for currency type.

Available options:
code,
name,
symbol
Example:

"symbol"

currencyDecimal
boolean

Required for currency type. Show decimal places.

Example:

true

currencyGrouping
boolean

Required for currency type. Use thousands separator.

Example:

true

Response

Created

success
boolean
Example:

true

status
integer
Example:

201

attribute
object

Definition of a single attribute on a CRM object.

Last modified on May 14, 2026