CustomFields

Create a custom field

Creates a new custom field definition and returns it with a 201 status; the field key must be unique.

POST
/v1/custom-fields

Creates a new custom field definition and returns it with a 201 status; the field key must be unique.

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

key*string
label*string
type*string

Value in

  • "text"
  • "number"
  • "boolean"
  • "date"
  • "select"
options?array<string>|null
defaultValue?string|null|null
isRequired?boolean|null
sortOrder?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/custom-fields" \  -H "Content-Type: application/json" \  -d '{    "key": "string",    "label": "string",    "type": "text"  }'
{  "id": "string",  "organizationId": "string",  "key": "string",  "label": "string",  "type": "text",  "options": [    "string"  ],  "defaultValue": "string",  "isRequired": true,  "sortOrder": 0,  "createdAt": "string",  "updatedAt": "string"}