Update the draft (captures.write). The published version does not change until you publish again; a suspended form cannot be edited
PATCH
/v1/forms/{form}
const url = 'https://api.replifier.com/v1/forms/frm_01hx0000000000000000000000';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","document":{"defaultLocale":"es-MX","fields":[{"key":"example","type":"email","label":{"es-MX":"example","es-ES":"example","es-AR":"example","en":"example","pt-BR":"example","fr":"example","de":"example","it":"example","ja":"example","ko":"example","zh-CN":"example","ar":"example"},"required":false,"options":["example"]}],"listChoice":"all","successMessage":{"es-MX":"example","es-ES":"example","es-AR":"example","en":"example","pt-BR":"example","fr":"example","de":"example","it":"example","ja":"example","ko":"example","zh-CN":"example","ar":"example"},"redirectUrl":"https://example.com","redirectIncludeEmail":false,"privacyUrl":"https://example.com","style":{"primary":"#1f4fd8","text":"#1a1a1a","background":"#ffffff","font":"system","radius":8},"appearance":{"delaySeconds":0,"scrollPercent":0,"exitIntent":false,"includePaths":[],"excludePaths":[],"devices":["desktop","mobile"],"frequencyDays":7},"whatsapp":{"phone":"example","position":"bottom-right","welcome":{"es-MX":"example","es-ES":"example","es-AR":"example","en":"example","pt-BR":"example","fr":"example","de":"example","it":"example","ja":"example","ko":"example","zh-CN":"example","ar":"example"},"prefill":{"es-MX":"example","es-ES":"example","es-AR":"example","en":"example","pt-BR":"example","fr":"example","de":"example","it":"example","ja":"example","ko":"example","zh-CN":"example","ar":"example"},"emailConsent":{"es-MX":"example","es-ES":"example","es-AR":"example","en":"example","pt-BR":"example","fr":"example","de":"example","it":"example","ja":"example","ko":"example","zh-CN":"example","ar":"example"},"defaultCountry":"MX"}},"consent":{"version":"example","text":{"es-MX":"example","es-ES":"example","es-AR":"example","en":"example","pt-BR":"example","fr":"example","de":"example","it":"example","ja":"example","ko":"example","zh-CN":"example","ar":"example"},"requireCheckbox":false,"preChecked":false},"listIds":["example"],"allowedOrigins":["example"],"ratePerMinute":1}'};
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://api.replifier.com/v1/forms/frm_01hx0000000000000000000000 \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "document": { "defaultLocale": "es-MX", "fields": [ { "key": "example", "type": "email", "label": { "es-MX": "example", "es-ES": "example", "es-AR": "example", "en": "example", "pt-BR": "example", "fr": "example", "de": "example", "it": "example", "ja": "example", "ko": "example", "zh-CN": "example", "ar": "example" }, "required": false, "options": [ "example" ] } ], "listChoice": "all", "successMessage": { "es-MX": "example", "es-ES": "example", "es-AR": "example", "en": "example", "pt-BR": "example", "fr": "example", "de": "example", "it": "example", "ja": "example", "ko": "example", "zh-CN": "example", "ar": "example" }, "redirectUrl": "https://example.com", "redirectIncludeEmail": false, "privacyUrl": "https://example.com", "style": { "primary": "#1f4fd8", "text": "#1a1a1a", "background": "#ffffff", "font": "system", "radius": 8 }, "appearance": { "delaySeconds": 0, "scrollPercent": 0, "exitIntent": false, "includePaths": [], "excludePaths": [], "devices": [ "desktop", "mobile" ], "frequencyDays": 7 }, "whatsapp": { "phone": "example", "position": "bottom-right", "welcome": { "es-MX": "example", "es-ES": "example", "es-AR": "example", "en": "example", "pt-BR": "example", "fr": "example", "de": "example", "it": "example", "ja": "example", "ko": "example", "zh-CN": "example", "ar": "example" }, "prefill": { "es-MX": "example", "es-ES": "example", "es-AR": "example", "en": "example", "pt-BR": "example", "fr": "example", "de": "example", "it": "example", "ja": "example", "ko": "example", "zh-CN": "example", "ar": "example" }, "emailConsent": { "es-MX": "example", "es-ES": "example", "es-AR": "example", "en": "example", "pt-BR": "example", "fr": "example", "de": "example", "it": "example", "ja": "example", "ko": "example", "zh-CN": "example", "ar": "example" }, "defaultCountry": "MX" } }, "consent": { "version": "example", "text": { "es-MX": "example", "es-ES": "example", "es-AR": "example", "en": "example", "pt-BR": "example", "fr": "example", "de": "example", "it": "example", "ja": "example", "ko": "example", "zh-CN": "example", "ar": "example" }, "requireCheckbox": false, "preChecked": false }, "listIds": [ "example" ], "allowedOrigins": [ "example" ], "ratePerMinute": 1 }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”form
required
string
Example
frm_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
document
object
defaultLocale
string
fields
required
Array<object>
object
key
required
string
type
required
string
label
required
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
required
boolean
options
Array<string>
listChoice
string
successMessage
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
redirectUrl
string format: uri
redirectIncludeEmail
boolean
privacyUrl
required
string format: uri
style
object
primary
string
text
string
background
string
font
string
radius
integer
appearance
object
delaySeconds
integer
scrollPercent
integer
exitIntent
boolean
includePaths
Array<string>
excludePaths
Array<string>
devices
Array<string>
frequencyDays
integer
whatsapp
object
phone
required
string
position
string
welcome
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
prefill
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
emailConsent
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
defaultCountry
string
consent
object
version
required
string
text
required
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
requireCheckbox
boolean
preChecked
boolean
listIds
Array<string>
allowedOrigins
Array<string>
ratePerMinute
integer
Responses
Section titled “Responses”Form
Media typeapplication/json
object
id
required
string
brandId
required
string
name
required
string
kind
required
string
publicId
required
string
status
required
string
currentVersion
required
number
allowedOrigins
required
Array<string>
ratePerMinute
required
number
document
required
object
defaultLocale
string
fields
required
Array<object>
object
key
required
string
type
required
string
label
required
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
required
boolean
options
Array<string>
listChoice
string
successMessage
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
redirectUrl
string format: uri
redirectIncludeEmail
boolean
privacyUrl
required
string format: uri
style
object
primary
string
text
string
background
string
font
string
radius
integer
appearance
object
delaySeconds
integer
scrollPercent
integer
exitIntent
boolean
includePaths
Array<string>
excludePaths
Array<string>
devices
Array<string>
frequencyDays
integer
whatsapp
object
phone
required
string
position
string
welcome
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
prefill
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
emailConsent
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
defaultCountry
string
consent
required
object
version
required
string
text
required
object
es-MX
string
es-ES
string
es-AR
string
en
string
pt-BR
string
fr
string
de
string
it
string
ja
string
ko
string
zh-CN
string
ar
string
requireCheckbox
boolean
preChecked
boolean
listIds
required
Array<string>
suspendedReason
required
string
createdAt
required
string
updatedAt
required
string
Example
{ "kind": "embedded", "status": "draft", "document": { "defaultLocale": "es-MX", "fields": [ { "type": "email", "required": false } ], "listChoice": "all", "redirectIncludeEmail": false, "style": { "primary": "#1f4fd8", "text": "#1a1a1a", "background": "#ffffff", "font": "system", "radius": 8 }, "appearance": { "delaySeconds": 0, "scrollPercent": 0, "exitIntent": false, "includePaths": [], "excludePaths": [], "devices": [ "desktop", "mobile" ], "frequencyDays": 7 }, "whatsapp": { "position": "bottom-right", "defaultCountry": "MX" } }, "consent": { "requireCheckbox": false, "preChecked": false }}Invalid data
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Conflict
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}Internal error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string
Example
{ "error": { "code": "not_found" }}