curl --request POST \
--url https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "phone",
"value": "(207) 555-0177",
"phone_country": "1",
"label": "Work",
"is_primary": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kind: 'phone',
value: '(207) 555-0177',
phone_country: '1',
label: 'Work',
is_primary: false
})
};
fetch('https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts"
payload = {
"kind": "phone",
"value": "(207) 555-0177",
"phone_country": "1",
"label": "Work",
"is_primary": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"person_id": "<string>",
"kind": "phone",
"label": "<string>",
"value": "<string>",
"phone_country": "<string>",
"is_primary": true,
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>"
}{
"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)"
}Add a phone or email
Adds a phone number or an email address. The first of its kind is primary whatever you send; a later one becomes primary when you send is_primary: true. The primary email and phone are copied onto the person’s own email, phone and phone_country. A phone is kept as digits only and an email in lower case. Adding one the person already has is refused. Needs write on People.
curl --request POST \
--url https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "phone",
"value": "(207) 555-0177",
"phone_country": "1",
"label": "Work",
"is_primary": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kind: 'phone',
value: '(207) 555-0177',
phone_country: '1',
label: 'Work',
is_primary: false
})
};
fetch('https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts"
payload = {
"kind": "phone",
"value": "(207) 555-0177",
"phone_country": "1",
"label": "Work",
"is_primary": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"person_id": "<string>",
"kind": "phone",
"label": "<string>",
"value": "<string>",
"phone_country": "<string>",
"is_primary": true,
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>"
}{
"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 person's ID.
Body
phone, email The phone number or email address. A phone has at most 15 digits together with its calling code; an email is cut to 320 characters.
Such as Home, Work or Mobile. Cut to 60 characters.
60For a phone: the calling code, one to three digits, like 1 or 44.
Cut to 500 characters.
500Make this the primary one of its kind.
Response
The phone or email.
phone, email Digits only for a phone, lower case for an email.
Your organization's ID.