curl --request POST \
--url https://api.clearpolicy.app/api/v1/people \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"last_name": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"phone": "<string>"
}
'import requests
url = "https://api.clearpolicy.app/api/v1/people"
payload = {
"last_name": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"phone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
last_name: '<string>',
email: '[email protected]',
first_name: '<string>',
phone: '<string>'
})
};
fetch('https://api.clearpolicy.app/api/v1/people', 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.clearpolicy.app/api/v1/people",
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([
'last_name' => '<string>',
'email' => '[email protected]',
'first_name' => '<string>',
'phone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.clearpolicy.app/api/v1/people"
payload := strings.NewReader("{\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"first_name\": \"<string>\",\n \"phone\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.clearpolicy.app/api/v1/people")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"first_name\": \"<string>\",\n \"phone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clearpolicy.app/api/v1/people")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"first_name\": \"<string>\",\n \"phone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organization_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"name": "<string>",
"email": "[email protected]",
"source": "oauth",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"phone": "<string>",
"source_id": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"message": "<string>",
"payment_url": "<string>"
}{
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"errors": {}
}{
"message": "Too Many Attempts."
}Add a person
Adds a person to your organization. Provide last_name and email; first_name and phone are optional. This does not send a team invitation or a document request.
curl --request POST \
--url https://api.clearpolicy.app/api/v1/people \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"last_name": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"phone": "<string>"
}
'import requests
url = "https://api.clearpolicy.app/api/v1/people"
payload = {
"last_name": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"phone": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
last_name: '<string>',
email: '[email protected]',
first_name: '<string>',
phone: '<string>'
})
};
fetch('https://api.clearpolicy.app/api/v1/people', 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.clearpolicy.app/api/v1/people",
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([
'last_name' => '<string>',
'email' => '[email protected]',
'first_name' => '<string>',
'phone' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.clearpolicy.app/api/v1/people"
payload := strings.NewReader("{\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"first_name\": \"<string>\",\n \"phone\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.clearpolicy.app/api/v1/people")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"first_name\": \"<string>\",\n \"phone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clearpolicy.app/api/v1/people")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"last_name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"first_name\": \"<string>\",\n \"phone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organization_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"name": "<string>",
"email": "[email protected]",
"source": "oauth",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"phone": "<string>",
"source_id": "<string>",
"archived_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"message": "<string>",
"payment_url": "<string>"
}{
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"errors": {}
}{
"message": "Too Many Attempts."
}Authorizations
Bearer token created in ClearPolicy API settings with the api:use scope.
Body
The person's last name. Required.
255The email address. Must be unique within your organization.
255The person's first name. Optional.
255Phone number in international format (e.g. +12025550147).
Response
The created person.
The ULID of the person.
The ULID of the organization.
The person's first name, if provided.
The person's last name.
The full name assembled from first_name and last_name.
The email address of the person.
How the person was created.
oauth, web, system, planning_center When the person was created.
When the person was last updated.
The phone number in international format, or null.
An external identifier from the originating system, or null.
When the person was archived, or null if active.
Was this page helpful?