Skip to Content

Update a custom field definition

You're viewing API version 2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.
PATCH
/api/v1/custom-fields/{id}

Update custom field properties. All fields are optional.

Note: Changing field type may affect existing data.

Authorization

headerAuthorizationBearer <token>

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Path Parameters

id*string

Header Parameters

authorization*string

Bearer token for API authentication

Idempotency-Key?string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Lengthlength <= 255

Request Body

Body

application/json
  1. body
name?string
Length1 <= length
inputType?string
Value in"TEXT""NUMBER""DATE""EMAIL""PHONE""URL""BOOLEAN""SELECT""JSON""TEXTAREA"
defaultValue?string|null
required?boolean
options?string|null

Response Body

200

application/json
  1. response
id*string

Unique custom field identifier

name*string

Custom field name

type*string

Field type: DOCUMENT or CONTACT

Value in"DOCUMENT""CONTACT"
inputType*string

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

Value in"TEXT""NUMBER""DATE""EMAIL""PHONE""URL""BOOLEAN""SELECT""JSON""TEXTAREA"
defaultValue*|

Default value for this field

required*boolean

Whether this field is required

options*|

Options for SELECT type fields as a JSON-encoded string array, for example ["Small","Large"]

createdAt*string

Date and time when custom field was created

Formatdate-time
updatedAt*string

Date and time when custom field was last updated

Formatdate-time
Example Request
curl -X PATCH 'https://app.sajn.se/api/v1/custom-fields/string' \  -H 'authorization: string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "name": "string",  "type": "DOCUMENT",  "inputType": "TEXT",  "defaultValue": "string",  "required": true,  "options": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Was this page helpful?