Skip to content

Edit a field

PATCH
/api/v1/fields/{key}
curl --request PATCH \
--url http://localhost:3000/api/v1/fields/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "label": "example", "options": [ "example" ], "required": true, "position": 1 }'

Scope: write.

key
required
string

Field key

Media typeapplication/json
object
label
string
>= 1 characters <= 80 characters
options
Array<string>
>= 1 items <= 100 items
required
boolean
position
integer
>= -9007199254740991 <= 9007199254740991
Examplegenerated
{
"label": "example",
"options": [
"example"
],
"required": true,
"position": 1
}

The field

Media typeapplication/json
object
data
required
object
key
required
string
label
required
string
type
required
string
Allowed values: text number date boolean select
options
required
Array<string>
required
required
boolean
Example
{
"data": {
"type": "text"
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}