Change a phone or email
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts/{contactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_primary": true,
"label": "Mobile"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_primary: true, label: 'Mobile'})
};
fetch('https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts/{contactId}', 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/{contactId}"
payload = {
"is_primary": True,
"label": "Mobile"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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)"
}Person contacts
Change a phone or email
Send only what changes. The kind cannot change: remove it and add a new one. To change which one is primary, send is_primary: true on the new one; is_primary: false on the primary one is refused. Needs write on People.
PATCH
/
api
/
people
/
persons
/
{id}
/
contacts
/
{contactId}
Change a phone or email
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts/{contactId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_primary": true,
"label": "Mobile"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_primary: true, label: 'Mobile'})
};
fetch('https://{organization}.rescueconsole.com/api/people/persons/{id}/contacts/{contactId}', 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/{contactId}"
payload = {
"is_primary": True,
"label": "Mobile"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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.
The phone number's or email address's ID.
Body
application/json
The new number or address. A phone is checked with its calling code.
Such as Home, Work or Mobile. Cut to 60 characters.
Maximum string length:
60For a phone: the calling code, one to three digits, like 1 or 44.
Cut to 500 characters.
Maximum string length:
500true makes this the primary one of its kind.
Response
The phone or email, as it now is.
Available options:
phone, email Digits only for a phone, lower case for an email.
Your organization's ID.