Update customer
curl --request PATCH \
--url https://api.clarian.finance/v1/{env}/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Id: <api-key>' \
--data '
{
"display_name": "<string>",
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"external_id": "<string>",
"metadata": {}
}
'import requests
url = "https://api.clarian.finance/v1/{env}/customers/{id}"
payload = {
"display_name": "<string>",
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"external_id": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"X-Workspace-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Workspace-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
display_name: '<string>',
email: '<string>',
phone: '<string>',
status: '<string>',
external_id: '<string>',
metadata: {}
})
};
fetch('https://api.clarian.finance/v1/{env}/customers/{id}', 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.clarian.finance/v1/{env}/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'status' => '<string>',
'external_id' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Workspace-Id: <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.clarian.finance/v1/{env}/customers/{id}"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Workspace-Id", "<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.patch("https://api.clarian.finance/v1/{env}/customers/{id}")
.header("Authorization", "Bearer <token>")
.header("X-Workspace-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clarian.finance/v1/{env}/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Workspace-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "person",
"display_name": "<string>",
"legal_name": "<string>",
"document_type": "<string>",
"document_number": "<string>",
"email": "<string>",
"phone": "<string>",
"country": "<string>",
"status": "<string>",
"kyc_status": "<string>",
"external_id": "<string>",
"payout_mode": "<string>",
"payout_asset": "<string>",
"payout_wallet_address": "<string>",
"payout_wallet_network": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Customers
Update customer
Workspace-level caller only.
PATCH
/
v1
/
{env}
/
customers
/
{id}
Update customer
curl --request PATCH \
--url https://api.clarian.finance/v1/{env}/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Id: <api-key>' \
--data '
{
"display_name": "<string>",
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"external_id": "<string>",
"metadata": {}
}
'import requests
url = "https://api.clarian.finance/v1/{env}/customers/{id}"
payload = {
"display_name": "<string>",
"email": "<string>",
"phone": "<string>",
"status": "<string>",
"external_id": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"X-Workspace-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Workspace-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
display_name: '<string>',
email: '<string>',
phone: '<string>',
status: '<string>',
external_id: '<string>',
metadata: {}
})
};
fetch('https://api.clarian.finance/v1/{env}/customers/{id}', 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.clarian.finance/v1/{env}/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'status' => '<string>',
'external_id' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Workspace-Id: <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.clarian.finance/v1/{env}/customers/{id}"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Workspace-Id", "<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.patch("https://api.clarian.finance/v1/{env}/customers/{id}")
.header("Authorization", "Bearer <token>")
.header("X-Workspace-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clarian.finance/v1/{env}/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Workspace-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"status\": \"<string>\",\n \"external_id\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "person",
"display_name": "<string>",
"legal_name": "<string>",
"document_type": "<string>",
"document_number": "<string>",
"email": "<string>",
"phone": "<string>",
"country": "<string>",
"status": "<string>",
"kyc_status": "<string>",
"external_id": "<string>",
"payout_mode": "<string>",
"payout_asset": "<string>",
"payout_wallet_address": "<string>",
"payout_wallet_network": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Authorization: Bearer cl_test_sk_... (sandbox) or Bearer cl_live_sk_... (live). A live key additionally needs production enabled by the workspace owner. Using a live key against the sandbox path revokes it on sight (leak signal); a sandbox key on live is refused and logged, but not revoked.
The workspace (tenant) UUID. Always required, including on session-authenticated dashboard calls.
Path Parameters
test is also accepted on the wire as an alias of sandbox; the key prefix must match (cl_test_sk_ for sandbox/test, cl_live_sk_ for live).
Available options:
sandbox, live Customer id.
Body
application/json
Response
OK
A party of kind customer. Fields mirror CreateCustomerRequest plus server-assigned ones.
Show child attributes
Show child attributes