Create a partner client
curl --request POST \
--url https://api-sandbox.circle.com/v1/partner/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientName": "Acme Trust Co.",
"country": "US",
"clientType": "business",
"businessDetails": {
"natureOfBusiness": "paymentProcessorPlatform",
"institutionType": "privateCo"
}
}
'import requests
url = "https://api-sandbox.circle.com/v1/partner/clients"
payload = {
"clientName": "Acme Trust Co.",
"country": "US",
"clientType": "business",
"businessDetails": {
"natureOfBusiness": "paymentProcessorPlatform",
"institutionType": "privateCo"
}
}
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({
clientName: 'Acme Trust Co.',
country: 'US',
clientType: 'business',
businessDetails: {natureOfBusiness: 'paymentProcessorPlatform', institutionType: 'privateCo'}
})
};
fetch('https://api-sandbox.circle.com/v1/partner/clients', 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.circle.com/v1/partner/clients",
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([
'clientName' => 'Acme Trust Co.',
'country' => 'US',
'clientType' => 'business',
'businessDetails' => [
'natureOfBusiness' => 'paymentProcessorPlatform',
'institutionType' => 'privateCo'
]
]),
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.circle.com/v1/partner/clients"
payload := strings.NewReader("{\n \"clientName\": \"Acme Trust Co.\",\n \"country\": \"US\",\n \"clientType\": \"business\",\n \"businessDetails\": {\n \"natureOfBusiness\": \"paymentProcessorPlatform\",\n \"institutionType\": \"privateCo\"\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-sandbox.circle.com/v1/partner/clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientName\": \"Acme Trust Co.\",\n \"country\": \"US\",\n \"clientType\": \"business\",\n \"businessDetails\": {\n \"natureOfBusiness\": \"paymentProcessorPlatform\",\n \"institutionType\": \"privateCo\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/partner/clients")
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 \"clientName\": \"Acme Trust Co.\",\n \"country\": \"US\",\n \"clientType\": \"business\",\n \"businessDetails\": {\n \"natureOfBusiness\": \"paymentProcessorPlatform\",\n \"institutionType\": \"privateCo\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"clientEntityId": "880e8400-e29b-41d4-a716-446655440099",
"applicationId": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"code": 401,
"message": "Malformed authorization."
}{
"code": 403,
"message": "Forbidden"
}{
"code": 409,
"message": "A client with this name and country already exists."
}Create a partner client
Creates a new client entity and initializes an onboarding application in a single request. The response contains both the clientEntityId and the applicationId for the newly created draft application.
Each clientName and country combination identifies one client. Submitting a combination that already exists returns the existing client’s clientEntityId and applicationId instead of creating a new client. A 409 Conflict error means two requests created the same client at once; retry the request.
POST
/
v1
/
partner
/
clients
Create a partner client
curl --request POST \
--url https://api-sandbox.circle.com/v1/partner/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientName": "Acme Trust Co.",
"country": "US",
"clientType": "business",
"businessDetails": {
"natureOfBusiness": "paymentProcessorPlatform",
"institutionType": "privateCo"
}
}
'import requests
url = "https://api-sandbox.circle.com/v1/partner/clients"
payload = {
"clientName": "Acme Trust Co.",
"country": "US",
"clientType": "business",
"businessDetails": {
"natureOfBusiness": "paymentProcessorPlatform",
"institutionType": "privateCo"
}
}
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({
clientName: 'Acme Trust Co.',
country: 'US',
clientType: 'business',
businessDetails: {natureOfBusiness: 'paymentProcessorPlatform', institutionType: 'privateCo'}
})
};
fetch('https://api-sandbox.circle.com/v1/partner/clients', 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.circle.com/v1/partner/clients",
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([
'clientName' => 'Acme Trust Co.',
'country' => 'US',
'clientType' => 'business',
'businessDetails' => [
'natureOfBusiness' => 'paymentProcessorPlatform',
'institutionType' => 'privateCo'
]
]),
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.circle.com/v1/partner/clients"
payload := strings.NewReader("{\n \"clientName\": \"Acme Trust Co.\",\n \"country\": \"US\",\n \"clientType\": \"business\",\n \"businessDetails\": {\n \"natureOfBusiness\": \"paymentProcessorPlatform\",\n \"institutionType\": \"privateCo\"\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-sandbox.circle.com/v1/partner/clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientName\": \"Acme Trust Co.\",\n \"country\": \"US\",\n \"clientType\": \"business\",\n \"businessDetails\": {\n \"natureOfBusiness\": \"paymentProcessorPlatform\",\n \"institutionType\": \"privateCo\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/partner/clients")
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 \"clientName\": \"Acme Trust Co.\",\n \"country\": \"US\",\n \"clientType\": \"business\",\n \"businessDetails\": {\n \"natureOfBusiness\": \"paymentProcessorPlatform\",\n \"institutionType\": \"privateCo\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"clientEntityId": "880e8400-e29b-41d4-a716-446655440099",
"applicationId": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"code": 401,
"message": "Malformed authorization."
}{
"code": 403,
"message": "Forbidden"
}{
"code": 409,
"message": "A client with this name and country already exists."
}Authorizations
Body
application/json
Was this page helpful?