curl --request POST \
--url https://api.clearpolicy.app/api/v1/groups/{group}/people \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person_ids": [
"<string>"
]
}
'import requests
url = "https://api.clearpolicy.app/api/v1/groups/{group}/people"
payload = { "person_ids": ["<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({person_ids: ['<string>']})
};
fetch('https://api.clearpolicy.app/api/v1/groups/{group}/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/groups/{group}/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([
'person_ids' => [
'<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/groups/{group}/people"
payload := strings.NewReader("{\n \"person_ids\": [\n \"<string>\"\n ]\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/groups/{group}/people")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"person_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clearpolicy.app/api/v1/groups/{group}/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 \"person_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"group_id": "<string>",
"person_id": "<string>"
}
]
}{
"error": "<string>"
}{
"message": "<string>",
"payment_url": "<string>"
}{
"error": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "Too Many Attempts."
}Add people to a group
Adds one or more active people to a group. People who are already members are accepted and returned without error. The response always uses status 200 and lists one membership object per requested person ID, in the same order as the request.
Adding people may assign the group’s documents to them. When the group has automatic request issuance enabled, ClearPolicy creates signature requests for newly assigned published documents and sends grouped notification emails asynchronously.
curl --request POST \
--url https://api.clearpolicy.app/api/v1/groups/{group}/people \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"person_ids": [
"<string>"
]
}
'import requests
url = "https://api.clearpolicy.app/api/v1/groups/{group}/people"
payload = { "person_ids": ["<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({person_ids: ['<string>']})
};
fetch('https://api.clearpolicy.app/api/v1/groups/{group}/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/groups/{group}/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([
'person_ids' => [
'<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/groups/{group}/people"
payload := strings.NewReader("{\n \"person_ids\": [\n \"<string>\"\n ]\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/groups/{group}/people")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"person_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clearpolicy.app/api/v1/groups/{group}/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 \"person_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"group_id": "<string>",
"person_id": "<string>"
}
]
}{
"error": "<string>"
}{
"message": "<string>",
"payment_url": "<string>"
}{
"error": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "Too Many Attempts."
}Authorizations
Bearer token created in ClearPolicy API settings with the api:use scope.
Path Parameters
The ULID of the group.
Body
Distinct ULIDs of active (non-archived) people in your organization to add to the group.
1 - 100 elementsResponse
Memberships for the requested people (including any who were already members).
One membership per requested person_id, in request order.
Show child attributes
Show child attributes
Was this page helpful?