Update an invite recipient
Updates the contact details or metadata of a single invite recipient. Changing email gives the recipient a new link, and the previous link stops working. Sending null on phone_number or metadata clears it. An invite can be amended as long as it hasn’t been canceled, expired, or converted into an application. Changing only metadata doesn’t send an invite_recipient.updated webhook.
curl --request PATCH \
--url https://api.theguarantors.com/v1/invite-recipients/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Jordyn",
"phone_number": null
}
'import requests
url = "https://api.theguarantors.com/v1/invite-recipients/{id}"
payload = {
"first_name": "Jordyn",
"phone_number": None
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({first_name: 'Jordyn', phone_number: null})
};
fetch('https://api.theguarantors.com/v1/invite-recipients/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.theguarantors.com/v1/invite-recipients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Jordyn',
'phone_number' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.theguarantors.com/v1/invite-recipients/{id}"
payload := strings.NewReader("{\n \"first_name\": \"Jordyn\",\n \"phone_number\": null\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.theguarantors.com/v1/invite-recipients/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jordyn\",\n \"phone_number\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.theguarantors.com/v1/invite-recipients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Jordyn\",\n \"phone_number\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "ivre_m2kd8xq4hz7tw1pa",
"link": "https://qualify.sandbox.theguarantors.com/invite/sign-up/ivre_m2kd8xq4hz7tw1pa",
"first_name": "Jordyn",
"last_name": "Lee",
"email": "jordan.lee@example.com",
"phone_number": null,
"metadata": {
"pms_reference": "occupant-3"
},
"object": "invite_recipient"
}{
"message": "validation error: email: must be a valid email address.",
"error_code": "validation_error",
"field_errors": [
{
"field": "email",
"code": "invalid_format",
"message": "must be a valid email address"
}
],
"object": "error"
}{
"message": "Missing authorization header",
"object": "error"
}{
"message": "cannot amend invite, property is inactive",
"error_code": "invite_property_inactive",
"object": "error"
}{
"message": "recipient not found",
"error_code": "invite_recipient_not_found",
"object": "error"
}{
"message": "cannot amend invite, a recipient has already accepted it",
"error_code": "invite_accepted",
"object": "error"
}{
"message": "unable to update invite recipient",
"error_code": "internal_error",
"object": "error"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Invite Recipient ID
Body
Fields to update
"jordan.lee@example.com"
1 - 100"Jordyn"
1 - 100"Lee"
Key-value object. Replaces the existing metadata in full; send null to clear it. Each key must be a string, and values can be strings, numbers, booleans, or null.
Phone number in E.164 format, for example +12125551234. Spaces and formatting characters such as parentheses, dashes and dots are removed. A 10-digit number without a country code is treated as a US number and gets +1 added. Include the + and country code for any other number. Send null to clear it.
"+12125551236"
Response
OK
"dana.whitfield@example.com"
"Dana"
"ivre_01HQ8Y"
"Whitfield"
URL that links the prospective renter to their prefilled TheGuarantors application.
"https://qualify.theguarantors.com/invite/sign-up/k3v9q2m7x1p4r8tz"
"invite_recipient"
Phone number in E.164 format, for example +12125551234. Spaces and formatting characters such as parentheses, dashes and dots are removed. A 10-digit number without a country code is treated as a US number and gets +1 added. Include the + and country code for any other number.
"+15551234567"
curl --request PATCH \
--url https://api.theguarantors.com/v1/invite-recipients/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Jordyn",
"phone_number": null
}
'import requests
url = "https://api.theguarantors.com/v1/invite-recipients/{id}"
payload = {
"first_name": "Jordyn",
"phone_number": None
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({first_name: 'Jordyn', phone_number: null})
};
fetch('https://api.theguarantors.com/v1/invite-recipients/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.theguarantors.com/v1/invite-recipients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Jordyn',
'phone_number' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.theguarantors.com/v1/invite-recipients/{id}"
payload := strings.NewReader("{\n \"first_name\": \"Jordyn\",\n \"phone_number\": null\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.theguarantors.com/v1/invite-recipients/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jordyn\",\n \"phone_number\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.theguarantors.com/v1/invite-recipients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Jordyn\",\n \"phone_number\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "ivre_m2kd8xq4hz7tw1pa",
"link": "https://qualify.sandbox.theguarantors.com/invite/sign-up/ivre_m2kd8xq4hz7tw1pa",
"first_name": "Jordyn",
"last_name": "Lee",
"email": "jordan.lee@example.com",
"phone_number": null,
"metadata": {
"pms_reference": "occupant-3"
},
"object": "invite_recipient"
}{
"message": "validation error: email: must be a valid email address.",
"error_code": "validation_error",
"field_errors": [
{
"field": "email",
"code": "invalid_format",
"message": "must be a valid email address"
}
],
"object": "error"
}{
"message": "Missing authorization header",
"object": "error"
}{
"message": "cannot amend invite, property is inactive",
"error_code": "invite_property_inactive",
"object": "error"
}{
"message": "recipient not found",
"error_code": "invite_recipient_not_found",
"object": "error"
}{
"message": "cannot amend invite, a recipient has already accepted it",
"error_code": "invite_accepted",
"object": "error"
}{
"message": "unable to update invite recipient",
"error_code": "internal_error",
"object": "error"
}