Skip to content

Update a form

PATCH
/v1/forms/{id}
curl --request PATCH \
--url https://api.submeto.com/v1/forms/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "status": "enabled", "allowed_origins": [ "n" ], "validate_fields": true, "notifications_enabled": true }'

Updates form attributes. Requires the forms:update scope and an If-Match header carrying the Form validator from the last GET. A stale ETag returns 412; a missing ETag returns 428.

id
required
string

The form ID.

If-Match
string
Media typeapplication/json
object
name

Must not be greater than 255 characters.

string
status
string
Allowed values: enabled disabled
allowed_origins

Must not be greater than 255 characters.

Array<string>
Example
[
"n"
]
validate_fields
boolean
notifications_enabled
boolean

Form updated

Media typeapplication/json
object
data
object
id
string
name
string
status
string
endpoint_url
string
allowed_origins
Array<string>
validate_fields
boolean
notifications_enabled
boolean
delivery_channel_types
Array<string>
revision
integer
field_count
integer
submissions_count
integer
unread_count
integer
latest_submission_at
string
fields
array
created_at
string
updated_at
string
request_id
string
Example
{
"data": {
"id": "REQUEST_ID",
"name": "Contact Form",
"status": "enabled",
"endpoint_url": "https://api.submeto.com/api/v1/forms/REQUEST_ID/submit",
"allowed_origins": [
"https://example.com"
],
"validate_fields": true,
"notifications_enabled": true,
"delivery_channel_types": [
"database"
],
"revision": 4,
"field_count": 4,
"submissions_count": 128,
"unread_count": 5,
"latest_submission_at": "2026-08-30T14:22:00.000Z",
"fields": [],
"created_at": "2026-01-15T09:00:00.000Z",
"updated_at": "2026-08-31T10:15:00.000Z"
},
"request_id": "REQUEST_ID"
}

Not found or not granted

Media typeapplication/json
object
error
object
code
string
message
string
details
object
request_id
string
Example
{
"error": {
"code": "resource_not_found",
"message": "Resource not found.",
"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"
}

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"
}