Add access control invitations
curl --request POST \
--url https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/access_control_invitations \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"emails": [
"oliver.smith@example.com"
]
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({emails: ['oliver.smith@example.com']})
};
fetch('https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/access_control_invitations', 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}/access_control_invitations"
payload = { "emails": ["oliver.smith@example.com"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"invited_emails": [
"oliver.smith@example.com"
]
}{
"error": "Form does not exist."
}{
"error": "Invitations can be added only when the form's access is restricted to invited emails."
}Form settings
Add access control invitations
Add emails that can open the form. The form access must be invited. This does not send any email. Emails that are not valid are skipped and repeated emails are ignored.
POST
/
forms
/
{form_id}
/
access_control_invitations
Add access control invitations
curl --request POST \
--url https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/access_control_invitations \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"emails": [
"oliver.smith@example.com"
]
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({emails: ['oliver.smith@example.com']})
};
fetch('https://{your-subdomain}.neetoform.com/api/external/v2/forms/{form_id}/access_control_invitations', 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}/access_control_invitations"
payload = { "emails": ["oliver.smith@example.com"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"invited_emails": [
"oliver.smith@example.com"
]
}{
"error": "Form does not exist."
}{
"error": "Invitations can be added only when the form's access is restricted to invited emails."
}Replace
Learn how to find your subdomain in Workspace subdomain.
{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
application/json
Email addresses, at most 100.
Required array length:
1 - 100 elementsExample:
["oliver.smith@example.com"]
Response
Created - Invitations added
Example:
["oliver.smith@example.com"]