Change a site's form
const url = 'https://digize.com/api/v1/sites/example/forms/example';const options = { method: 'PATCH', headers: { 'Idempotency-Key': '5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69', 'x-api-key': '<x-api-key>', 'Content-Type': 'application/json' }, body: '{"label":"example","tags":["example"],"ownerId":"example","newsletter":"off"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://digize.com/api/v1/sites/example/forms/example \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \ --header 'x-api-key: <x-api-key>' \ --data '{ "label": "example", "tags": [ "example" ], "ownerId": "example", "newsletter": "off" }'Changes a form’s label, tags or owner; what’s left out stays. Its tags go on everyone who sends it from then on, and new contacts from it belong to its owner (null for CRM settings’ rule). Sets the form up if the site hasn’t sent it yet. A visitor’s own tags field tags no one.
Needs the sites:write permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The form’s name, as the site posts it in _form, such as quote.
Header Parameters
Section titled “Header Parameters”Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.
Example
5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Done
object
What the site posts as _form. A post matches it whatever its case.
What the app calls it; empty to show the name.
Tags everyone who sends it gets on their contact.
The member, by user id, new contacts from it belong to; null for CRM settings’ rule. A member who has left is passed over.
Whether sending it subscribes people to newsletters: off, always, or checkbox when they tick a field named subscribe.
How many times it’s been sent.
When it was first sent or saved.
Example
{ "newsletter": "off"}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}A request with the same Idempotency-Key is still running (conflict).
object
object
object
Example
{ "error": { "code": "invalid" }}The Idempotency-Key was used with a different request.
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}