curl --request POST \
--url https://api.dev.endaoment.org/v1/auth/partner/users \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f",
"firstName": "Ada",
"lastName": "Lovelace",
"address": {
"line1": "123 Main Street",
"city": "San Francisco",
"line2": "Suite 100",
"state": "CA",
"zip": "94105",
"country": "USA"
},
"email": "new-user@altruist.com"
}
'import requests
url = "https://api.dev.endaoment.org/v1/auth/partner/users"
payload = {
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f",
"firstName": "Ada",
"lastName": "Lovelace",
"address": {
"line1": "123 Main Street",
"city": "San Francisco",
"line2": "Suite 100",
"state": "CA",
"zip": "94105",
"country": "USA"
},
"email": "new-user@altruist.com"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
partnerUserIdentifier: 'c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f',
firstName: 'Ada',
lastName: 'Lovelace',
address: {
line1: '123 Main Street',
city: 'San Francisco',
line2: 'Suite 100',
state: 'CA',
zip: '94105',
country: 'USA'
},
email: 'new-user@altruist.com'
})
};
fetch('https://api.dev.endaoment.org/v1/auth/partner/users', 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.dev.endaoment.org/v1/auth/partner/users",
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([
'partnerUserIdentifier' => 'c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f',
'firstName' => 'Ada',
'lastName' => 'Lovelace',
'address' => [
'line1' => '123 Main Street',
'city' => 'San Francisco',
'line2' => 'Suite 100',
'state' => 'CA',
'zip' => '94105',
'country' => 'USA'
],
'email' => 'new-user@altruist.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.dev.endaoment.org/v1/auth/partner/users"
payload := strings.NewReader("{\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n },\n \"email\": \"new-user@altruist.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.dev.endaoment.org/v1/auth/partner/users")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n },\n \"email\": \"new-user@altruist.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.endaoment.org/v1/auth/partner/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n },\n \"email\": \"new-user@altruist.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0b3e6f2a-9d1a-4f6b-8e2c-7a5d90c41b3f",
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f",
"email": "new-user@altruist.com",
"techPlatformClientId": "altruist",
"emailVerificationStatus": "PENDING"
}{
"id": "0b3e6f2a-9d1a-4f6b-8e2c-7a5d90c41b3f",
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f",
"email": "new-user@altruist.com",
"techPlatformClientId": "altruist",
"emailVerificationStatus": "PENDING"
}Provision user
Creates (or idempotently returns) an Endaoment user owned by the calling partner. The partner-scoped idempotency key is partnerUserIdentifier. Returns 201 when a user is created and 200 when an existing user is returned and its non-email identity is refreshed.
curl --request POST \
--url https://api.dev.endaoment.org/v1/auth/partner/users \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f",
"firstName": "Ada",
"lastName": "Lovelace",
"address": {
"line1": "123 Main Street",
"city": "San Francisco",
"line2": "Suite 100",
"state": "CA",
"zip": "94105",
"country": "USA"
},
"email": "new-user@altruist.com"
}
'import requests
url = "https://api.dev.endaoment.org/v1/auth/partner/users"
payload = {
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f",
"firstName": "Ada",
"lastName": "Lovelace",
"address": {
"line1": "123 Main Street",
"city": "San Francisco",
"line2": "Suite 100",
"state": "CA",
"zip": "94105",
"country": "USA"
},
"email": "new-user@altruist.com"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
partnerUserIdentifier: 'c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f',
firstName: 'Ada',
lastName: 'Lovelace',
address: {
line1: '123 Main Street',
city: 'San Francisco',
line2: 'Suite 100',
state: 'CA',
zip: '94105',
country: 'USA'
},
email: 'new-user@altruist.com'
})
};
fetch('https://api.dev.endaoment.org/v1/auth/partner/users', 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.dev.endaoment.org/v1/auth/partner/users",
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([
'partnerUserIdentifier' => 'c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f',
'firstName' => 'Ada',
'lastName' => 'Lovelace',
'address' => [
'line1' => '123 Main Street',
'city' => 'San Francisco',
'line2' => 'Suite 100',
'state' => 'CA',
'zip' => '94105',
'country' => 'USA'
],
'email' => 'new-user@altruist.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.dev.endaoment.org/v1/auth/partner/users"
payload := strings.NewReader("{\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n },\n \"email\": \"new-user@altruist.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.dev.endaoment.org/v1/auth/partner/users")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n },\n \"email\": \"new-user@altruist.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.endaoment.org/v1/auth/partner/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"partnerUserIdentifier\": \"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f\",\n \"firstName\": \"Ada\",\n \"lastName\": \"Lovelace\",\n \"address\": {\n \"line1\": \"123 Main Street\",\n \"city\": \"San Francisco\",\n \"line2\": \"Suite 100\",\n \"state\": \"CA\",\n \"zip\": \"94105\",\n \"country\": \"USA\"\n },\n \"email\": \"new-user@altruist.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0b3e6f2a-9d1a-4f6b-8e2c-7a5d90c41b3f",
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f",
"email": "new-user@altruist.com",
"techPlatformClientId": "altruist",
"emailVerificationStatus": "PENDING"
}{
"id": "0b3e6f2a-9d1a-4f6b-8e2c-7a5d90c41b3f",
"partnerUserIdentifier": "c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f",
"email": "new-user@altruist.com",
"techPlatformClientId": "altruist",
"emailVerificationStatus": "PENDING"
}Authorizations
Body
Opaque partner-generated identifier for this user, used as the partner-scoped idempotency key. Must be 8–64 printable ASCII characters; leading/trailing whitespace is trimmed before validation.
8 - 64^[\x20-\x7E]{8,64}$"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f"
First name of the partner-managed user
255"Ada"
Last name of the partner-managed user
255"Lovelace"
Physical address of the partner-managed user
Show child attributes
Show child attributes
Email address of the partner-managed user. Omit when the partner is configured for no-email provisioning.
"new-user@altruist.com"
Response
An existing partner-managed user was returned and its non-email identity refreshed.
Endaoment user id. Persist this and use it for all subsequent operations for this user.
"0b3e6f2a-9d1a-4f6b-8e2c-7a5d90c41b3f"
The opaque partner-generated identifier, echoed back from the request.
"c3f8b2e4-9d1a-4f6b-8e2c-7a5d90c41b3f"
The partner-managed user's email address, normalized to lowercase.
"new-user@altruist.com"
The tech platform client id that owns this user (derived server-side from the API key).
"altruist"
Email verification status. PENDING until the user completes a first-party login.
PENDING, VERIFIED "PENDING"
Was this page helpful?