Skip to main content
PATCH
/
api
/
v1
/
templates
/
{id}
/
fields
/
{fieldId}
Update a template field
curl --request PATCH \
  --url https://app.sajn.se/api/v1/templates/{id}/fields/{fieldId} \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "position": 123,
  "key": "<string>",
  "fieldMeta": "<unknown>"
}
'
{
  "message": "<string>",
  "code": "<string>"
}

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
fieldId
string
required

Body

application/json

Body

type
enum<string>

Field type

Available options:
TEXT,
HTML,
FORM,
PDF,
PRODUCT_TABLE,
TABLE
position
number

Field position/order

key
string

Unique key identifier for API access

Pattern: ^[a-z0-9_-]*$
fieldMeta
any

Field-specific metadata. For FORM subfield updates via key: prefix, pass the subfield metadata structure with properties like type and value (e.g., {"type": "input", "value": "new value"}).

Response

Error response

Error response

message
string
required

Error message describing what went wrong

code
string

Machine-readable error code (e.g. APPROVAL_REQUIRED)