Skip to content

Change a site's form

PATCH
/api/v1/sites/{site}/forms/{form}
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.

site
required
string
>= 1 characters <= 64 characters
form
required

The form’s name, as the site posts it in _form, such as quote.

string
>= 1 characters <= 100 characters
Idempotency-Key
string
>= 1 characters <= 255 characters

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-1f2d3c4b5a69
Media typeapplication/json
object
label
string
<= 100 characters
tags

Replaces its tags.

Array<string>
<= 50 items
ownerId
Any of:
string
>= 1 characters <= 64 characters
newsletter

Whether sending it subscribes people to newsletters: off, always, or checkbox when they tick a field named subscribe.

string
Allowed values: off always checkbox

Done

Media typeapplication/json
object
name
required

What the site posts as _form. A post matches it whatever its case.

string
label
required

What the app calls it; empty to show the name.

string
tags
required

Tags everyone who sends it gets on their contact.

Array<string>
ownerId
required

The member, by user id, new contacts from it belong to; null for CRM settings’ rule. A member who has left is passed over.

string | null
newsletter
required

Whether sending it subscribes people to newsletters: off, always, or checkbox when they tick a field named subscribe.

string
Allowed values: off always checkbox
submissions
required

How many times it’s been sent.

number
lastSubmissionAt
required
Any of:
string format: date-time
createdAt
required

When it was first sent or saved.

string format: date-time

Example

{
"newsletter": "off"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}