Update a customer
curl --request PATCH \
--url https://api.globalstack.io/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"profile": {
"phone": "<string>",
"address": "<string>",
"date_of_birth": "<string>",
"id_number": "<string>",
"id_type": "<string>",
"business_licence": "<string>"
}
}
'import requests
url = "https://api.globalstack.io/v1/customers/{customerId}"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"profile": {
"phone": "<string>",
"address": "<string>",
"date_of_birth": "<string>",
"id_number": "<string>",
"id_type": "<string>",
"business_licence": "<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({
name: '<string>',
email: 'jsmith@example.com',
metadata: {},
profile: {
phone: '<string>',
address: '<string>',
date_of_birth: '<string>',
id_number: '<string>',
id_type: '<string>',
business_licence: '<string>'
}
})
};
fetch('https://api.globalstack.io/v1/customers/{customerId}', 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.globalstack.io/v1/customers/{customerId}",
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([
'name' => '<string>',
'email' => 'jsmith@example.com',
'metadata' => [
],
'profile' => [
'phone' => '<string>',
'address' => '<string>',
'date_of_birth' => '<string>',
'id_number' => '<string>',
'id_type' => '<string>',
'business_licence' => '<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.globalstack.io/v1/customers/{customerId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\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://api.globalstack.io/v1/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/customers/{customerId}")
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 \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Customer updated successfully",
"code": "ok",
"data": {
"id": "cust_01HXYZABC1234567890ABCDEFG",
"type": "individual",
"name": "Alice Johnson",
"email": "alice@example.com",
"merchant_reference": "ref_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"country_code": "NG",
"tier": "tier_0",
"kyc_status": "not_started",
"metadata": {
"source": "checkout"
},
"created_at": "2026-04-16T16:14:08.000Z",
"updated_at": "2026-04-16T16:14:08.000Z",
"profile": {
"phone": "+2348012345678",
"address": "1 Marina Rd, Lagos",
"date_of_birth": "01/15/1990",
"id_number": "A12345678",
"id_type": "passport",
"business_licence": "RC123456"
}
},
"meta": {
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}Customers
Update a customer
Updates a customer scoped to the calling merchant’s integration. Supports partial updates —
omit any field to leave it unchanged. An empty body is valid and returns the current customer
with 200.
Mutable fields
name— optional. Full name. Max 255 chars. Re-validated only when present in the patch;individualcustomers must still have a whitespace-separated first + last name.email— optional. Valid email. Max 255 chars. Per-integration uniqueness is enforced case-insensitively — colliding with another customer’s email returns409 duplicate_resource.metadata— optional. Free-formRecord<string, string>. Sendingmetadatareplaces the entire object — existing keys not present in the new value are removed.profile— optional. Field-by-field merge: only the sub-keys you send are written; untouched slots are preserved. Sub-fields:phone,address,id_number,id_type,business_licence— strings.date_of_birth— must bemm/dd/yyyy.
There is no way to clear a profile or metadata key via this endpoint — omit a key to
leave it; send a value to overwrite it.
Read-only fields
These are rejected with 400 bad_request if included in the body (DTO validation rejects
any unknown top-level key). Set them at create time and they remain fixed:
typecountry_codemerchant_reference
Example
PATCH /v1/customers/cust_01HXYZABC1234567890ABCDEFG
{
"profile": {
"phone": "+2349999999999"
},
"metadata": {
"plan": "gold"
}
}
PATCH
/
v1
/
customers
/
{customerId}
Update a customer
curl --request PATCH \
--url https://api.globalstack.io/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"profile": {
"phone": "<string>",
"address": "<string>",
"date_of_birth": "<string>",
"id_number": "<string>",
"id_type": "<string>",
"business_licence": "<string>"
}
}
'import requests
url = "https://api.globalstack.io/v1/customers/{customerId}"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"metadata": {},
"profile": {
"phone": "<string>",
"address": "<string>",
"date_of_birth": "<string>",
"id_number": "<string>",
"id_type": "<string>",
"business_licence": "<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({
name: '<string>',
email: 'jsmith@example.com',
metadata: {},
profile: {
phone: '<string>',
address: '<string>',
date_of_birth: '<string>',
id_number: '<string>',
id_type: '<string>',
business_licence: '<string>'
}
})
};
fetch('https://api.globalstack.io/v1/customers/{customerId}', 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.globalstack.io/v1/customers/{customerId}",
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([
'name' => '<string>',
'email' => 'jsmith@example.com',
'metadata' => [
],
'profile' => [
'phone' => '<string>',
'address' => '<string>',
'date_of_birth' => '<string>',
'id_number' => '<string>',
'id_type' => '<string>',
'business_licence' => '<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.globalstack.io/v1/customers/{customerId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\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://api.globalstack.io/v1/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/customers/{customerId}")
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 \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"metadata\": {},\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Customer updated successfully",
"code": "ok",
"data": {
"id": "cust_01HXYZABC1234567890ABCDEFG",
"type": "individual",
"name": "Alice Johnson",
"email": "alice@example.com",
"merchant_reference": "ref_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"country_code": "NG",
"tier": "tier_0",
"kyc_status": "not_started",
"metadata": {
"source": "checkout"
},
"created_at": "2026-04-16T16:14:08.000Z",
"updated_at": "2026-04-16T16:14:08.000Z",
"profile": {
"phone": "+2348012345678",
"address": "1 Marina Rd, Lagos",
"date_of_birth": "01/15/1990",
"id_number": "A12345678",
"id_type": "passport",
"business_licence": "RC123456"
}
},
"meta": {
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}Authorizations
API key issued during merchant onboarding.
Path Parameters
Pattern:
[^\/#\?]+?Body
application/json
UpdateCustomerDto
Response
Customer updated successfully
⌘I