Update the compliance profile
curl --request PATCH \
--url https://production.hifi.com/v3/users/{userId}/compliance/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"middleName": "<string>",
"lastName": "<string>",
"nationality": "<string>",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"physicalAddress": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"dateOfBirth": "2023-12-25",
"gender": "<string>",
"taxId": "<string>",
"taxIdType": "<string>",
"taxIdCountry": "<string>"
}
'import requests
url = "https://production.hifi.com/v3/users/{userId}/compliance/profile"
payload = {
"firstName": "<string>",
"middleName": "<string>",
"lastName": "<string>",
"nationality": "<string>",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"physicalAddress": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"dateOfBirth": "2023-12-25",
"gender": "<string>",
"taxId": "<string>",
"taxIdType": "<string>",
"taxIdCountry": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
middleName: '<string>',
lastName: '<string>',
nationality: '<string>',
email: 'jsmith@example.com',
phoneNumber: '<string>',
physicalAddress: {
addressLine1: '<string>',
addressLine2: '<string>',
city: '<string>',
stateProvinceRegion: '<string>',
postalCode: '<string>',
country: '<string>'
},
dateOfBirth: '2023-12-25',
gender: '<string>',
taxId: '<string>',
taxIdType: '<string>',
taxIdCountry: '<string>'
})
};
fetch('https://production.hifi.com/v3/users/{userId}/compliance/profile', 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://production.hifi.com/v3/users/{userId}/compliance/profile",
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([
'firstName' => '<string>',
'middleName' => '<string>',
'lastName' => '<string>',
'nationality' => '<string>',
'email' => 'jsmith@example.com',
'phoneNumber' => '<string>',
'physicalAddress' => [
'addressLine1' => '<string>',
'addressLine2' => '<string>',
'city' => '<string>',
'stateProvinceRegion' => '<string>',
'postalCode' => '<string>',
'country' => '<string>'
],
'dateOfBirth' => '2023-12-25',
'gender' => '<string>',
'taxId' => '<string>',
'taxIdType' => '<string>',
'taxIdCountry' => '<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://production.hifi.com/v3/users/{userId}/compliance/profile"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"middleName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"nationality\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phoneNumber\": \"<string>\",\n \"physicalAddress\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"stateProvinceRegion\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"taxId\": \"<string>\",\n \"taxIdType\": \"<string>\",\n \"taxIdCountry\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://production.hifi.com/v3/users/{userId}/compliance/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"middleName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"nationality\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phoneNumber\": \"<string>\",\n \"physicalAddress\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"stateProvinceRegion\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"taxId\": \"<string>\",\n \"taxIdType\": \"<string>\",\n \"taxIdCountry\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/users/{userId}/compliance/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"middleName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"nationality\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phoneNumber\": \"<string>\",\n \"physicalAddress\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"stateProvinceRegion\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"taxId\": \"<string>\",\n \"taxIdType\": \"<string>\",\n \"taxIdCountry\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"firstName": "<string>",
"middleName": "<string>",
"lastName": "<string>",
"nationality": "<string>",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"physicalAddress": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"dateOfBirth": "2023-12-25",
"gender": "<string>",
"taxId": "<string>",
"taxIdType": "<string>",
"taxIdCountry": "<string>"
}{
"type": "VALIDATION_ERROR",
"message": "One or more fields are invalid or missing.",
"fields": [
{
"code": "invalid_value",
"message": "Must be a valid email address",
"field": "email"
}
]
}{
"type": "UNAUTHORIZED",
"message": "Authentication required"
}{
"type": "RESOURCE_NOT_FOUND",
"message": "<string>",
"fields": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Compliance
Update the compliance profile
Update the compliance (KYC/KYB) profile for a user. The accepted fields depend on whether the user is an individual or a business. All fields are optional on update — only the fields you provide are changed. Sensitive fields (tax ID, phone number) are stored encrypted and returned in full only on the profile endpoints.
PATCH
/
v3
/
users
/
{userId}
/
compliance
/
profile
Update the compliance profile
curl --request PATCH \
--url https://production.hifi.com/v3/users/{userId}/compliance/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "<string>",
"middleName": "<string>",
"lastName": "<string>",
"nationality": "<string>",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"physicalAddress": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"dateOfBirth": "2023-12-25",
"gender": "<string>",
"taxId": "<string>",
"taxIdType": "<string>",
"taxIdCountry": "<string>"
}
'import requests
url = "https://production.hifi.com/v3/users/{userId}/compliance/profile"
payload = {
"firstName": "<string>",
"middleName": "<string>",
"lastName": "<string>",
"nationality": "<string>",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"physicalAddress": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"dateOfBirth": "2023-12-25",
"gender": "<string>",
"taxId": "<string>",
"taxIdType": "<string>",
"taxIdCountry": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
middleName: '<string>',
lastName: '<string>',
nationality: '<string>',
email: 'jsmith@example.com',
phoneNumber: '<string>',
physicalAddress: {
addressLine1: '<string>',
addressLine2: '<string>',
city: '<string>',
stateProvinceRegion: '<string>',
postalCode: '<string>',
country: '<string>'
},
dateOfBirth: '2023-12-25',
gender: '<string>',
taxId: '<string>',
taxIdType: '<string>',
taxIdCountry: '<string>'
})
};
fetch('https://production.hifi.com/v3/users/{userId}/compliance/profile', 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://production.hifi.com/v3/users/{userId}/compliance/profile",
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([
'firstName' => '<string>',
'middleName' => '<string>',
'lastName' => '<string>',
'nationality' => '<string>',
'email' => 'jsmith@example.com',
'phoneNumber' => '<string>',
'physicalAddress' => [
'addressLine1' => '<string>',
'addressLine2' => '<string>',
'city' => '<string>',
'stateProvinceRegion' => '<string>',
'postalCode' => '<string>',
'country' => '<string>'
],
'dateOfBirth' => '2023-12-25',
'gender' => '<string>',
'taxId' => '<string>',
'taxIdType' => '<string>',
'taxIdCountry' => '<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://production.hifi.com/v3/users/{userId}/compliance/profile"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"middleName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"nationality\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phoneNumber\": \"<string>\",\n \"physicalAddress\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"stateProvinceRegion\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"taxId\": \"<string>\",\n \"taxIdType\": \"<string>\",\n \"taxIdCountry\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://production.hifi.com/v3/users/{userId}/compliance/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"middleName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"nationality\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phoneNumber\": \"<string>\",\n \"physicalAddress\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"stateProvinceRegion\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"taxId\": \"<string>\",\n \"taxIdType\": \"<string>\",\n \"taxIdCountry\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/users/{userId}/compliance/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"middleName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"nationality\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phoneNumber\": \"<string>\",\n \"physicalAddress\": {\n \"addressLine1\": \"<string>\",\n \"addressLine2\": \"<string>\",\n \"city\": \"<string>\",\n \"stateProvinceRegion\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"dateOfBirth\": \"2023-12-25\",\n \"gender\": \"<string>\",\n \"taxId\": \"<string>\",\n \"taxIdType\": \"<string>\",\n \"taxIdCountry\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"firstName": "<string>",
"middleName": "<string>",
"lastName": "<string>",
"nationality": "<string>",
"email": "jsmith@example.com",
"phoneNumber": "<string>",
"physicalAddress": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"stateProvinceRegion": "<string>",
"postalCode": "<string>",
"country": "<string>"
},
"dateOfBirth": "2023-12-25",
"gender": "<string>",
"taxId": "<string>",
"taxIdType": "<string>",
"taxIdCountry": "<string>"
}{
"type": "VALIDATION_ERROR",
"message": "One or more fields are invalid or missing.",
"fields": [
{
"code": "invalid_value",
"message": "Must be a valid email address",
"field": "email"
}
]
}{
"type": "UNAUTHORIZED",
"message": "Authentication required"
}{
"type": "RESOURCE_NOT_FOUND",
"message": "<string>",
"fields": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the user.
Pattern:
^user_[A-Za-z0-9]+$Body
application/json
- Individual
- Business
Maximum string length:
255Pattern:
^[\x20-\x7E\n]*$Maximum string length:
255Pattern:
^[\x20-\x7E\n]*$Maximum string length:
255Pattern:
^[\x20-\x7E\n]*$Required string length:
3Pattern:
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Pattern:
^\+[1-9]\d{6,14}$Show child attributes
Show child attributes
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Maximum string length:
255Pattern:
^[\x20-\x7E\n]*$Required string length:
3Response
Compliance profile.
- Individual
- Business
Maximum string length:
255Pattern:
^[\x20-\x7E\n]*$Maximum string length:
255Pattern:
^[\x20-\x7E\n]*$Maximum string length:
255Pattern:
^[\x20-\x7E\n]*$Required string length:
3Pattern:
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Pattern:
^\+[1-9]\d{6,14}$Show child attributes
Show child attributes
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Maximum string length:
255Pattern:
^[\x20-\x7E\n]*$Required string length:
3⌘I