Delete a form
DELETE
/v1/forms/{id}
const url = 'https://api.submeto.com/v1/forms/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.submeto.com/v1/forms/example \ --header 'Authorization: Bearer <token>'Deletes a form and all its fields and submissions. Requires the
forms:delete scope and an If-Match header carrying the Form validator
from the last GET.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
The form ID.
Header Parameters
Section titled “Header Parameters”If-Match
string
Responses
Section titled “Responses”Form deleted
Media typeapplication/json
object
Examplegenerated
{}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"}