Add an invite recipient
Adds a new recipient to an existing invite. An invite can be amended as long as it hasn’t been canceled, expired, or converted into an application.
curl --request POST \
--url https://api.theguarantors.com/v1/invites/{id}/invite-recipients \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Jordan",
"last_name": "Lee",
"email": "jordan.lee@example.com",
"phone_number": "+12125551236",
"metadata": {
"pms_reference": "occupant-3"
}
}
'import requests
url = "https://api.theguarantors.com/v1/invites/{id}/invite-recipients"
payload = {
"first_name": "Jordan",
"last_name": "Lee",
"email": "jordan.lee@example.com",
"phone_number": "+12125551236",
"metadata": { "pms_reference": "occupant-3" }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Jordan',
last_name: 'Lee',
email: 'jordan.lee@example.com',
phone_number: '+12125551236',
metadata: {pms_reference: 'occupant-3'}
})
};
fetch('https://api.theguarantors.com/v1/invites/{id}/invite-recipients', 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/invites/{id}/invite-recipients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Jordan',
'last_name' => 'Lee',
'email' => 'jordan.lee@example.com',
'phone_number' => '+12125551236',
'metadata' => [
'pms_reference' => 'occupant-3'
]
]),
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/invites/{id}/invite-recipients"
payload := strings.NewReader("{\n \"first_name\": \"Jordan\",\n \"last_name\": \"Lee\",\n \"email\": \"jordan.lee@example.com\",\n \"phone_number\": \"+12125551236\",\n \"metadata\": {\n \"pms_reference\": \"occupant-3\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.theguarantors.com/v1/invites/{id}/invite-recipients")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jordan\",\n \"last_name\": \"Lee\",\n \"email\": \"jordan.lee@example.com\",\n \"phone_number\": \"+12125551236\",\n \"metadata\": {\n \"pms_reference\": \"occupant-3\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.theguarantors.com/v1/invites/{id}/invite-recipients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Jordan\",\n \"last_name\": \"Lee\",\n \"email\": \"jordan.lee@example.com\",\n \"phone_number\": \"+12125551236\",\n \"metadata\": {\n \"pms_reference\": \"occupant-3\"\n }\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": "Jordan",
"last_name": "Lee",
"email": "jordan.lee@example.com",
"phone_number": "+12125551236",
"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": "invite not found",
"error_code": "invite_not_found",
"object": "error"
}{
"message": "email is already used by another recipient on this invite",
"error_code": "duplicate_email_conflict",
"object": "error"
}{
"message": "cannot add recipient, total would exceed maximum of 6",
"error_code": "recipient_limit_exceeded",
"object": "error"
}{
"message": "unable to add 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 ID
Body
Recipient to add
Must be unique among the invite's recipients. It's trimmed and lowercased before it's saved.
"jordan.lee@example.com"
1 - 100"Jordan"
1 - 100"Lee"
Key-value object. 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.
"+12125551236"
Response
Created
"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 POST \
--url https://api.theguarantors.com/v1/invites/{id}/invite-recipients \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Jordan",
"last_name": "Lee",
"email": "jordan.lee@example.com",
"phone_number": "+12125551236",
"metadata": {
"pms_reference": "occupant-3"
}
}
'import requests
url = "https://api.theguarantors.com/v1/invites/{id}/invite-recipients"
payload = {
"first_name": "Jordan",
"last_name": "Lee",
"email": "jordan.lee@example.com",
"phone_number": "+12125551236",
"metadata": { "pms_reference": "occupant-3" }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'Jordan',
last_name: 'Lee',
email: 'jordan.lee@example.com',
phone_number: '+12125551236',
metadata: {pms_reference: 'occupant-3'}
})
};
fetch('https://api.theguarantors.com/v1/invites/{id}/invite-recipients', 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/invites/{id}/invite-recipients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Jordan',
'last_name' => 'Lee',
'email' => 'jordan.lee@example.com',
'phone_number' => '+12125551236',
'metadata' => [
'pms_reference' => 'occupant-3'
]
]),
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/invites/{id}/invite-recipients"
payload := strings.NewReader("{\n \"first_name\": \"Jordan\",\n \"last_name\": \"Lee\",\n \"email\": \"jordan.lee@example.com\",\n \"phone_number\": \"+12125551236\",\n \"metadata\": {\n \"pms_reference\": \"occupant-3\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.theguarantors.com/v1/invites/{id}/invite-recipients")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jordan\",\n \"last_name\": \"Lee\",\n \"email\": \"jordan.lee@example.com\",\n \"phone_number\": \"+12125551236\",\n \"metadata\": {\n \"pms_reference\": \"occupant-3\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.theguarantors.com/v1/invites/{id}/invite-recipients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Jordan\",\n \"last_name\": \"Lee\",\n \"email\": \"jordan.lee@example.com\",\n \"phone_number\": \"+12125551236\",\n \"metadata\": {\n \"pms_reference\": \"occupant-3\"\n }\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": "Jordan",
"last_name": "Lee",
"email": "jordan.lee@example.com",
"phone_number": "+12125551236",
"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": "invite not found",
"error_code": "invite_not_found",
"object": "error"
}{
"message": "email is already used by another recipient on this invite",
"error_code": "duplicate_email_conflict",
"object": "error"
}{
"message": "cannot add recipient, total would exceed maximum of 6",
"error_code": "recipient_limit_exceeded",
"object": "error"
}{
"message": "unable to add invite recipient",
"error_code": "internal_error",
"object": "error"
}