curl --request PATCH \
--url https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/public_link \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"public_link_id": "customer-feedback"
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({public_link_id: 'customer-feedback'})
};
fetch('https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/public_link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/public_link"
payload = { "public_link_id": "customer-feedback" }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "6f1c2a8e-4d1b-4f6e-9a57-2f0f3c1d9b10",
"is_published": true,
"public_link_id": "feedback",
"public_link": "https://spinkart.neetoform.com/feedback",
"custom_domain_links": [
"https://forms.spinkart.com/feedback"
],
"embed_codes": {
"inline": "<string>",
"floating_popup": "<string>",
"element_popup": "<string>",
"iframe": "<string>"
}
}{
"error": "Form does not exist."
}{
"error": "Public link may only contain letters, numbers, hyphens, and underscores."
}Update the public link
Change the public link of a form, either to the given public_link_id or to a random new one. The old link stops working at once, including in shared emails and embeds.
curl --request PATCH \
--url https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/public_link \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"public_link_id": "customer-feedback"
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({public_link_id: 'customer-feedback'})
};
fetch('https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/public_link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/public_link"
payload = { "public_link_id": "customer-feedback" }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "6f1c2a8e-4d1b-4f6e-9a57-2f0f3c1d9b10",
"is_published": true,
"public_link_id": "feedback",
"public_link": "https://spinkart.neetoform.com/feedback",
"custom_domain_links": [
"https://forms.spinkart.com/feedback"
],
"embed_codes": {
"inline": "<string>",
"floating_popup": "<string>",
"element_popup": "<string>",
"iframe": "<string>"
}
}{
"error": "Form does not exist."
}{
"error": "Public link may only contain letters, numbers, hyphens, and underscores."
}{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Path Parameters
Unique ID of the form. Refer to Getting the Form ID for detailed instructions.
Body
New public link ID. It can only contain letters, numbers, hyphens and underscores, and it must be unique in the workspace. When omitted, a random one is generated.
"customer-feedback"
Response
OK - Public link updated. Returns the new share details.
Unique ID of the form.
"6f1c2a8e-4d1b-4f6e-9a57-2f0f3c1d9b10"
Whether the form is published. Links and embeds only work on a published form.
true
The last part of the public link of the form.
"feedback"
Public link of the form.
"https://spinkart.neetoform.com/feedback"
The same public link on each custom domain of the workspace.
["https://forms.spinkart.com/feedback"]
HTML snippets to embed the form in a website. Each snippet uses the default settings.