careCycle
Custom fields

Create a new custom field definition

Create a new custom field definition

POST
/v2/custom-fields

Authorization

x-api-key
x-api-key<token>

API key required for authentication.

Keys begin with 'cc_' prefix. Get your API key from the Developer Dashboard.

In: header

Request Body

application/json

POST /v2/custom-fields Request body

TypeScript Definitions

Use the request body type in TypeScript.

string
Value in"customers"
string

Display name shown to users

Lengthlength <= 255
string

Description of the field's purpose

string

Type of data this field stores

Value in"text" | "number" | "boolean" | "date" | "select" | "multi_select"
boolean | null

Whether this field must have a value

array | null

Available options for select/multi-select fields

object

Validation rules for the custom field

number
number
string
number
string
string
number

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.carecycle.ai/v2/custom-fields" \  -H "Content-Type: application/json" \  -d '{    "recordType": "customers",    "fieldLabel": "string",    "fieldDescription": "string",    "fieldType": "text"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "createdAt": "string",
  "updatedAt": "string",
  "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
  "recordType": "customers",
  "fieldKey": "string",
  "fieldLabel": "string",
  "fieldDescription": "string",
  "fieldType": "text",
  "isRequired": true,
  "options": [
    "string"
  ],
  "validationRules": "string"
}
{
  "message": "string",
  "code": "string"
}
{
  "message": "string",
  "code": "string"
}
{
  "message": "string",
  "code": "string"
}
{
  "message": "string",
  "code": "string"
}
{
  "message": "string",
  "code": "VALIDATION_ERROR",
  "errors": [
    {
      "path": [
        "string"
      ],
      "message": "string",
      "expected": "string",
      "received": "string",
      "code": "string"
    }
  ]
}
{
  "message": "string",
  "code": "string",
  "retryAfter": 0
}
{
  "message": "string",
  "code": "string"
}