curl --request POST \
--url https://api.sandbox.tesouro.com/identity/v1/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"stateOrProvince": "<string>"
},
"displayName": "<string>",
"email": "<string>",
"legalName": "<string>",
"mccsAllowed": [
"<string>"
],
"shortName": "<string>",
"phoneNumber": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/identity/v1/organizations"
payload = {
"address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"stateOrProvince": "<string>"
},
"displayName": "<string>",
"email": "<string>",
"legalName": "<string>",
"mccsAllowed": ["<string>"],
"shortName": "<string>",
"phoneNumber": "<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({
address: {
address1: '<string>',
address2: '<string>',
city: '<string>',
country: '<string>',
postalCode: '<string>',
stateOrProvince: '<string>'
},
displayName: '<string>',
email: '<string>',
legalName: '<string>',
mccsAllowed: ['<string>'],
shortName: '<string>',
phoneNumber: '<string>'
})
};
fetch('https://api.sandbox.tesouro.com/identity/v1/organizations', 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/organizations",
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([
'address' => [
'address1' => '<string>',
'address2' => '<string>',
'city' => '<string>',
'country' => '<string>',
'postalCode' => '<string>',
'stateOrProvince' => '<string>'
],
'displayName' => '<string>',
'email' => '<string>',
'legalName' => '<string>',
'mccsAllowed' => [
'<string>'
],
'shortName' => '<string>',
'phoneNumber' => '<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/organizations"
payload := strings.NewReader("{\n \"address\": {\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"stateOrProvince\": \"<string>\"\n },\n \"displayName\": \"<string>\",\n \"email\": \"<string>\",\n \"legalName\": \"<string>\",\n \"mccsAllowed\": [\n \"<string>\"\n ],\n \"shortName\": \"<string>\",\n \"phoneNumber\": \"<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/organizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"stateOrProvince\": \"<string>\"\n },\n \"displayName\": \"<string>\",\n \"email\": \"<string>\",\n \"legalName\": \"<string>\",\n \"mccsAllowed\": [\n \"<string>\"\n ],\n \"shortName\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/identity/v1/organizations")
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 \"address\": {\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"stateOrProvince\": \"<string>\"\n },\n \"displayName\": \"<string>\",\n \"email\": \"<string>\",\n \"legalName\": \"<string>\",\n \"mccsAllowed\": [\n \"<string>\"\n ],\n \"shortName\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"stateOrProvince": "<string>"
},
"displayName": "<string>",
"email": "<string>",
"isEnabled": true,
"legalName": "<string>",
"mccsAllowed": [
"<string>"
],
"shortName": "<string>",
"types": [
"BANK"
],
"phoneNumber": "<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 organization
Creates an EMBEDDED, TRANSACTOR, or VERTICAL_SOFTWARE_PROVIDER organization under the caller’s org. A BANKING_SERVICES relationship is automatically established between the caller and the new org. Requires the organization:write:org scope.
Token types: APP, USER | Required scopes: organization:write:org
curl --request POST \
--url https://api.sandbox.tesouro.com/identity/v1/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"stateOrProvince": "<string>"
},
"displayName": "<string>",
"email": "<string>",
"legalName": "<string>",
"mccsAllowed": [
"<string>"
],
"shortName": "<string>",
"phoneNumber": "<string>"
}
'import requests
url = "https://api.sandbox.tesouro.com/identity/v1/organizations"
payload = {
"address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"stateOrProvince": "<string>"
},
"displayName": "<string>",
"email": "<string>",
"legalName": "<string>",
"mccsAllowed": ["<string>"],
"shortName": "<string>",
"phoneNumber": "<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({
address: {
address1: '<string>',
address2: '<string>',
city: '<string>',
country: '<string>',
postalCode: '<string>',
stateOrProvince: '<string>'
},
displayName: '<string>',
email: '<string>',
legalName: '<string>',
mccsAllowed: ['<string>'],
shortName: '<string>',
phoneNumber: '<string>'
})
};
fetch('https://api.sandbox.tesouro.com/identity/v1/organizations', 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/organizations",
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([
'address' => [
'address1' => '<string>',
'address2' => '<string>',
'city' => '<string>',
'country' => '<string>',
'postalCode' => '<string>',
'stateOrProvince' => '<string>'
],
'displayName' => '<string>',
'email' => '<string>',
'legalName' => '<string>',
'mccsAllowed' => [
'<string>'
],
'shortName' => '<string>',
'phoneNumber' => '<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/organizations"
payload := strings.NewReader("{\n \"address\": {\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"stateOrProvince\": \"<string>\"\n },\n \"displayName\": \"<string>\",\n \"email\": \"<string>\",\n \"legalName\": \"<string>\",\n \"mccsAllowed\": [\n \"<string>\"\n ],\n \"shortName\": \"<string>\",\n \"phoneNumber\": \"<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/organizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"stateOrProvince\": \"<string>\"\n },\n \"displayName\": \"<string>\",\n \"email\": \"<string>\",\n \"legalName\": \"<string>\",\n \"mccsAllowed\": [\n \"<string>\"\n ],\n \"shortName\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/identity/v1/organizations")
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 \"address\": {\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"stateOrProvince\": \"<string>\"\n },\n \"displayName\": \"<string>\",\n \"email\": \"<string>\",\n \"legalName\": \"<string>\",\n \"mccsAllowed\": [\n \"<string>\"\n ],\n \"shortName\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": {
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"country": "<string>",
"postalCode": "<string>",
"stateOrProvince": "<string>"
},
"displayName": "<string>",
"email": "<string>",
"isEnabled": true,
"legalName": "<string>",
"mccsAllowed": [
"<string>"
],
"shortName": "<string>",
"types": [
"BANK"
],
"phoneNumber": "<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).
Body
Cancellation token.
Request body for creating a new organization.
The organization's address.
Show child attributes
Show child attributes
The display name of the organization.
The organization's primary email address.
The official legal name of the organization.
The merchant category codes allowed for this organization.
A short alphanumeric identifier for the organization (letters, digits, and hyphens only).
The organizational type.
EMBEDDED, TRANSACTOR, VERTICAL_SOFTWARE_PROVIDER The organization's phone number.
Response
Organization created successfully.
Response DTO returned when a new organization is successfully created.
The unique identifier of the newly created organization.
The organization's address.
Show child attributes
Show child attributes
The display name of the organization.
The organization's primary email address.
Whether the organization is currently enabled.
The legal name of the organization.
The merchant category codes allowed for this organization.
The short identifier for the organization.
The types assigned to the organization.
BANK, EMBEDDED, PLATFORM, TRANSACTOR, VERTICAL_SOFTWARE_PROVIDER The organization's phone number, if provided.
Was this page helpful?