curl --request POST \
--url https://api.sandbox.tesouro.com/identity/v1/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"name": "<string>",
"status": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"jobTitle": "<string>",
"permissionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"permissionKeys": [],
"phoneNumber": "<string>",
"postalCode": "<string>",
"redirectUri": "<string>",
"reportingManagerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stateOrProvince": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/identity/v1/users"
payload = {
"email": "<string>",
"name": "<string>",
"status": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"jobTitle": "<string>",
"permissionIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"permissionKeys": [],
"phoneNumber": "<string>",
"postalCode": "<string>",
"redirectUri": "<string>",
"reportingManagerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stateOrProvince": "<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({
email: '<string>',
name: '<string>',
status: '<string>',
address1: '<string>',
address2: '<string>',
city: '<string>',
country: '<string>',
jobTitle: '<string>',
permissionIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
permissionKeys: [],
phoneNumber: '<string>',
postalCode: '<string>',
redirectUri: '<string>',
reportingManagerUserId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stateOrProvince: '<string>'
})
};
fetch('https://api.sandbox.tesouro.com/identity/v1/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.sandbox.tesouro.com/identity/v1/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([
'email' => '<string>',
'name' => '<string>',
'status' => '<string>',
'address1' => '<string>',
'address2' => '<string>',
'city' => '<string>',
'country' => '<string>',
'jobTitle' => '<string>',
'permissionIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'permissionKeys' => [
],
'phoneNumber' => '<string>',
'postalCode' => '<string>',
'redirectUri' => '<string>',
'reportingManagerUserId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'stateOrProvince' => '<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.sandbox.tesouro.com/identity/v1/users"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"permissionIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"permissionKeys\": [],\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"redirectUri\": \"<string>\",\n \"reportingManagerUserId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stateOrProvince\": \"<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.sandbox.tesouro.com/identity/v1/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"permissionIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"permissionKeys\": [],\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"redirectUri\": \"<string>\",\n \"reportingManagerUserId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stateOrProvince\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/identity/v1/users")
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 \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"permissionIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"permissionKeys\": [],\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"redirectUri\": \"<string>\",\n \"reportingManagerUserId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stateOrProvince\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"name": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"jobTitle": "<string>",
"reportingManagerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Create user
Creates an ACTIVE or INVITED user in an organization accessible to the caller. Creating a user in the caller’s own organization requires the user:write:org scope. Creating a user in another (downstream) organization additionally requires the user:write:all scope.
Token types: APP, USER | Accepted scopes (any of): user:write:all, user:write:org
curl --request POST \
--url https://api.sandbox.tesouro.com/identity/v1/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"name": "<string>",
"status": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"jobTitle": "<string>",
"permissionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"permissionKeys": [],
"phoneNumber": "<string>",
"postalCode": "<string>",
"redirectUri": "<string>",
"reportingManagerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stateOrProvince": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/identity/v1/users"
payload = {
"email": "<string>",
"name": "<string>",
"status": "<string>",
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"jobTitle": "<string>",
"permissionIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"permissionKeys": [],
"phoneNumber": "<string>",
"postalCode": "<string>",
"redirectUri": "<string>",
"reportingManagerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stateOrProvince": "<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({
email: '<string>',
name: '<string>',
status: '<string>',
address1: '<string>',
address2: '<string>',
city: '<string>',
country: '<string>',
jobTitle: '<string>',
permissionIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
permissionKeys: [],
phoneNumber: '<string>',
postalCode: '<string>',
redirectUri: '<string>',
reportingManagerUserId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stateOrProvince: '<string>'
})
};
fetch('https://api.sandbox.tesouro.com/identity/v1/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.sandbox.tesouro.com/identity/v1/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([
'email' => '<string>',
'name' => '<string>',
'status' => '<string>',
'address1' => '<string>',
'address2' => '<string>',
'city' => '<string>',
'country' => '<string>',
'jobTitle' => '<string>',
'permissionIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'permissionKeys' => [
],
'phoneNumber' => '<string>',
'postalCode' => '<string>',
'redirectUri' => '<string>',
'reportingManagerUserId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'stateOrProvince' => '<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.sandbox.tesouro.com/identity/v1/users"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"permissionIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"permissionKeys\": [],\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"redirectUri\": \"<string>\",\n \"reportingManagerUserId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stateOrProvince\": \"<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.sandbox.tesouro.com/identity/v1/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"permissionIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"permissionKeys\": [],\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"redirectUri\": \"<string>\",\n \"reportingManagerUserId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stateOrProvince\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/identity/v1/users")
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 \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"status\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"permissionIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"permissionKeys\": [],\n \"phoneNumber\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"redirectUri\": \"<string>\",\n \"reportingManagerUserId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stateOrProvince\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"name": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"jobTitle": "<string>",
"reportingManagerUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Authorizations
Application (M2M) OAuth2 access token (client credentials).
Headers
ID of the organization to scope this operation to. When omitted, the request creates the user in the caller's own organization. Must be a valid non-empty UUID. Present but empty or malformed values return 400.
Body
Cancellation token.
Permission GUIDs to grant the user. Mutually exclusive with permissionKeys;
exactly one must be supplied. Prefer permissionKeys for new integrations.
Permission keys (e.g. "user:write:org") to grant the user. Resolved server-side to the
underlying permission IDs. Mutually exclusive with permissionIds; exactly one
must be supplied.
acceptor:application:read, acceptor:application:secondaryapproval, acceptor:application:write, accounting_config:read:org, accounting_config:write:org, acquiring:report:read, approval_policy:read:org, approval_policy:write:org, approval_request:create:org, approval_request:delete:org, approval_request:read:org, approval_request:update:org, authorization_control:read:org, authorization_control:write:org, bank_account:read:org, bank_account:write:org, bank_account_application:read:org, bank_account_application:write:org, beneficial_owner:read:org, check_deposit:write:org, comment:read:org, comment:write:org, counterpart:read:org, counterpart:write:org, credit_card:activate:org, credit_card:issue:org, credit_card:read:org, credit_card_application:read:org, credit_card_application:write:org, debit_card:activate:org, debit_card:close:org, debit_card:issue:org, debit_card:lock:org, debit_card:read:org, developer_portal, dispute:read, dispute:write, expense:approve:org, expense:read:org, expense:read:self, expense:write:org, expense:write:self, export:read:org, export:write:org, external_bank_account:micro_deposit:org, external_bank_account:read:org, external_bank_account:set_verification:org, external_bank_account:write:org, invoice:read:org, invoice:write:org, mailbox:read:org, mailbox:write:org, notification:subscription:read, notification:subscription:write, ocr_task:read:org, ocr_task:write:org, oidc:app:manage, oidc:app:read, oidc:app:write, org:write:all, organization:read:org, organization:write:org, organization_settings:read:org, organization_settings:write:org, partner_portal, payable:approve:org, payable:pay:org, payable:read:org, payable:write:org, payment_link:write, payment_rail:ach, payment_rail:fednow, payment_rail:rtp, payment_record:read:org, payment_record:write:org, product:read:org, product:write:org, role:read:org, role:write:org, transfer:write:org, underwriting:application:approval:escalation, underwriting:application:approval:secondary, underwriting:application:read, underwriting:application:write, user:read:org, user:read:self, user:write:all, user:write:org, user_profile:write:all, user_profile:write:self Was this page helpful?