Edit a field
PATCH
/api/v1/fields/{key}
const url = 'http://localhost:3000/api/v1/fields/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"label":"example","options":["example"],"required":true,"position":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”key
required
string
Field key
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
label
string
options
Array<string>
required
boolean
position
integer
Examplegenerated
{ "label": "example", "options": [ "example" ], "required": true, "position": 1}Responses
Section titled “Responses”The field
Media typeapplication/json
object
data
required
object
key
required
string
label
required
string
type
required
string
options
required
Array<string>
required
required
boolean
Example
{ "data": { "type": "text" }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}