curl --request POST \
--url https://{organization}.rescueconsole.com/api/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Adopt from Contoso Animal Rescue",
"form_kind": "adoption_application",
"slug": "adopt",
"description": "Tell us about your home and the animal you would like to meet.",
"success_message": "Thank you. We read every application within two days."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Adopt from Contoso Animal Rescue',
form_kind: 'adoption_application',
slug: 'adopt',
description: 'Tell us about your home and the animal you would like to meet.',
success_message: 'Thank you. We read every application within two days.'
})
};
fetch('https://{organization}.rescueconsole.com/api/forms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/forms"
payload = {
"title": "Adopt from Contoso Animal Rescue",
"form_kind": "adoption_application",
"slug": "adopt",
"description": "Tell us about your home and the animal you would like to meet.",
"success_message": "Thank you. We read every application within two days."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"form": {
"id": "<string>",
"slug": "<string>",
"title": "<string>",
"form_kind": "adoption_application",
"is_published": true,
"description": "<string>",
"success_message": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Create a form
Creates a form, unpublished, already asking the questions the record it makes cannot do without (for a person, their name). Add the rest with Add a question, then publish it with Change a form. Only the title is required. Needs write on the area of the form’s kind.
curl --request POST \
--url https://{organization}.rescueconsole.com/api/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Adopt from Contoso Animal Rescue",
"form_kind": "adoption_application",
"slug": "adopt",
"description": "Tell us about your home and the animal you would like to meet.",
"success_message": "Thank you. We read every application within two days."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Adopt from Contoso Animal Rescue',
form_kind: 'adoption_application',
slug: 'adopt',
description: 'Tell us about your home and the animal you would like to meet.',
success_message: 'Thank you. We read every application within two days.'
})
};
fetch('https://{organization}.rescueconsole.com/api/forms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/forms"
payload = {
"title": "Adopt from Contoso Animal Rescue",
"form_kind": "adoption_application",
"slug": "adopt",
"description": "Tell us about your home and the animal you would like to meet.",
"success_message": "Thank you. We read every application within two days."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"form": {
"id": "<string>",
"slug": "<string>",
"title": "<string>",
"form_kind": "adoption_application",
"is_published": true,
"description": "<string>",
"success_message": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Body
Cannot be empty.
What a form is for, which decides the area its submissions belong to and so which keys may read them. adoption_application, foster_application and surrender (a surrender request) are Animals; volunteer (a volunteer sign-up) is Shifts; donor is Fundraising; contact and general are People.
adoption_application, foster_application, volunteer, donor, surrender, contact, general The form's address. Made from the title unless you send one. Either way it is lower-cased, anything but letters and digits becomes a hyphen, and it is cut to 60 characters. It must be unused in your organization (409 otherwise), and cannot be submissions.
Response
The form, as it was created. Its questions are not included: read the form to see them.
Show child attributes
Show child attributes