Create a form field
POST
/v1/forms/{form}/fields
const url = 'https://api.submeto.com/v1/forms/example/fields';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","label":"example","type":"string","required":true,"options":{},"validation":"email"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.submeto.com/v1/forms/example/fields \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "label": "example", "type": "string", "required": true, "options": {}, "validation": "email" }'Adds a field to a form. Requires the forms:update scope, an
Idempotency-Key header, and an If-Match header carrying the current
Form validator. Field validation accepts only a reviewed validation preset,
never raw regex.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”form
required
string
The form ID.
Header Parameters
Section titled “Header Parameters”Idempotency-Key
string
If-Match
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Must match the regex /^[a-z][a-z0-9_]{0,63}$/.
string
label
Must not be greater than 255 characters.
string
type
required
string
required
required
boolean
options
One of:
object
key
additional properties
any
Array<string>
validation
string
Responses
Section titled “Responses”Field created
Media typeapplication/json
object
data
object
id
string
name
string
label
string
type
string
required
boolean
options
string
validation
object
kind
string
preset
string
position
integer
created_at
string
updated_at
string
request_id
string
Example
{ "data": { "id": "REQUEST_ID", "name": "email", "label": "Email", "type": "string", "required": true, "options": null, "validation": { "kind": "preset", "preset": "email" }, "position": 4, "created_at": "2026-08-31T10:00:00.000Z", "updated_at": "2026-08-31T10:00:00.000Z" }, "request_id": "REQUEST_ID"}Missing idempotency key
Media typeapplication/json
object
error
object
code
string
message
string
details
object
request_id
string
Example
{ "error": { "code": "idempotency_key_required", "message": "The Idempotency-Key header is required.", "details": {} }, "request_id": "REQUEST_ID"}Stale ETag
Media typeapplication/json
object
error
object
code
string
message
string
details
object
request_id
string
Example
{ "error": { "code": "precondition_failed", "message": "The Form revision does not match the If-Match ETag.", "details": {} }, "request_id": "REQUEST_ID"}Validation failed
Media typeapplication/json
object
error
object
code
string
message
string
details
object
name
Array<string>
request_id
string
Example
{ "error": { "code": "validation_failed", "message": "The request validation failed.", "details": { "name": [ "The name field is required." ] } }, "request_id": "REQUEST_ID"}Missing If-Match
Media typeapplication/json
object
error
object
code
string
message
string
details
object
request_id
string
Example
{ "error": { "code": "precondition_required", "message": "A current If-Match Form validator is required.", "details": {} }, "request_id": "REQUEST_ID"}