Skip to main content
PATCH
/
api
/
v1
/
custom-fields
/
{id}
Update a custom field definition
curl --request PATCH \
  --url https://app.sajn.se/api/v1/custom-fields/{id} \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "name": "<string>",
  "defaultValue": "<string>",
  "required": true,
  "options": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "defaultValue": "<string>",
  "required": true,
  "options": "<string>",
  "createdAt": "<unknown>",
  "updatedAt": "<unknown>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sajn.se/llms.txt

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

Headers

authorization
string
required

Bearer token for API authentication

Path Parameters

id
string
required

Body

application/json

Body

name
string
Minimum string length: 1
inputType
enum<string>
Available options:
TEXT,
NUMBER,
DATE,
EMAIL,
PHONE,
URL,
BOOLEAN,
SELECT,
JSON,
TEXTAREA
defaultValue
string | null
required
boolean
options
string | null

Response

200

id
string
required

Unique custom field identifier

name
string
required

Custom field name

type
enum<string>
required

Field type: DOCUMENT or CONTACT

Available options:
DOCUMENT,
CONTACT
inputType
enum<string>
required

Input type: TEXT, NUMBER, DATE, CHECKBOX, SELECT, TEXTAREA, EMAIL, PHONE, or URL

Available options:
TEXT,
NUMBER,
DATE,
EMAIL,
PHONE,
URL,
BOOLEAN,
SELECT,
JSON,
TEXTAREA
defaultValue
string | null
required

Default value for this field

required
boolean
required

Whether this field is required

options
string | null
required

Comma-separated options for SELECT type fields

createdAt
any
required

Date and time when custom field was created

updatedAt
any
required

Date and time when custom field was last updated