Add a question
curl --request POST \
--url https://{organization}.rescueconsole.com/api/forms/{id}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_key": "person.phone",
"label": "Best number to reach you",
"required": true,
"help_text": "We call between 9am and 5pm."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
field_key: 'person.phone',
label: 'Best number to reach you',
required: true,
help_text: 'We call between 9am and 5pm.'
})
};
fetch('https://{organization}.rescueconsole.com/api/forms/{id}/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/forms/{id}/fields"
payload = {
"field_key": "person.phone",
"label": "Best number to reach you",
"required": True,
"help_text": "We call between 9am and 5pm."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"field": {
"id": "<string>",
"field_key": "<string>",
"label": "<string>",
"field_type": "text",
"options": [
"<string>"
],
"required": true,
"help_text": "<string>",
"sort_order": 123
}
}{
"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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Forms
Add a question
Adds one of the questions List questions a form may ask offers. You may reword its label and add help text; its type and choices are the record’s. It goes last unless you give a sort_order. Needs write on the area of the form’s kind.
POST
/
api
/
forms
/
{id}
/
fields
Add a question
curl --request POST \
--url https://{organization}.rescueconsole.com/api/forms/{id}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_key": "person.phone",
"label": "Best number to reach you",
"required": true,
"help_text": "We call between 9am and 5pm."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
field_key: 'person.phone',
label: 'Best number to reach you',
required: true,
help_text: 'We call between 9am and 5pm.'
})
};
fetch('https://{organization}.rescueconsole.com/api/forms/{id}/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/forms/{id}/fields"
payload = {
"field_key": "person.phone",
"label": "Best number to reach you",
"required": True,
"help_text": "We call between 9am and 5pm."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"field": {
"id": "<string>",
"field_key": "<string>",
"label": "<string>",
"field_type": "text",
"options": [
"<string>"
],
"required": true,
"help_text": "<string>",
"sort_order": 123
}
}{
"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)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Path Parameters
The form's record ID.
Body
application/json
One of the field_key values List questions a form may ask gives. Anything else is refused. A question already on the form is refused with 409.
The question as the form asks it. The field's own label unless you send one.
Whether it must be answered. What the record needs unless you say.
Its place on the form. Last unless you say.
Response
The question, as it was added.
One question on a form.
Show child attributes
Show child attributes