Update a customer
Patches an existing customer. Only the fields provided in the request body are modified. Supplying contacts or aliases replaces the full list. The id path parameter accepts the Alguna account ID, a customer alias, or a connected-account external ID (such as a Stripe customer ID).
curl --request PATCH \
--url https://api.alguna.io/customers/{id} \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aliases": [
"<string>"
],
"billing_address": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"postal_code": "94105",
"state": "CA",
"line2": "Suite 100"
},
"contacts": [
{
"email": "john@example.com",
"is_primary": true,
"email_preferences": [
"<string>"
],
"first_name": "John",
"id": "<string>",
"last_name": "Doe"
}
],
"currency": "USD",
"name": "Acme Corp"
}
'import requests
url = "https://api.alguna.io/customers/{id}"
payload = {
"aliases": ["<string>"],
"billing_address": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"postal_code": "94105",
"state": "CA",
"line2": "Suite 100"
},
"contacts": [
{
"email": "john@example.com",
"is_primary": True,
"email_preferences": ["<string>"],
"first_name": "John",
"id": "<string>",
"last_name": "Doe"
}
],
"currency": "USD",
"name": "Acme Corp"
}
headers = {
"Alguna-Version": "<alguna-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Alguna-Version': '<alguna-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
aliases: ['<string>'],
billing_address: {
city: 'San Francisco',
country: 'USA',
line1: '123 Main St',
postal_code: '94105',
state: 'CA',
line2: 'Suite 100'
},
contacts: [
{
email: 'john@example.com',
is_primary: true,
email_preferences: ['<string>'],
first_name: 'John',
id: '<string>',
last_name: 'Doe'
}
],
currency: 'USD',
name: 'Acme Corp'
})
};
fetch('https://api.alguna.io/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.alguna.io/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([
'aliases' => [
'<string>'
],
'billing_address' => [
'city' => 'San Francisco',
'country' => 'USA',
'line1' => '123 Main St',
'postal_code' => '94105',
'state' => 'CA',
'line2' => 'Suite 100'
],
'contacts' => [
[
'email' => 'john@example.com',
'is_primary' => true,
'email_preferences' => [
'<string>'
],
'first_name' => 'John',
'id' => '<string>',
'last_name' => 'Doe'
]
],
'currency' => 'USD',
'name' => 'Acme Corp'
]),
CURLOPT_HTTPHEADER => [
"Alguna-Version: <alguna-version>",
"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.alguna.io/customers/{id}"
payload := strings.NewReader("{\n \"aliases\": [\n \"<string>\"\n ],\n \"billing_address\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"postal_code\": \"94105\",\n \"state\": \"CA\",\n \"line2\": \"Suite 100\"\n },\n \"contacts\": [\n {\n \"email\": \"john@example.com\",\n \"is_primary\": true,\n \"email_preferences\": [\n \"<string>\"\n ],\n \"first_name\": \"John\",\n \"id\": \"<string>\",\n \"last_name\": \"Doe\"\n }\n ],\n \"currency\": \"USD\",\n \"name\": \"Acme Corp\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Alguna-Version", "<alguna-version>")
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.alguna.io/customers/{id}")
.header("Alguna-Version", "<alguna-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aliases\": [\n \"<string>\"\n ],\n \"billing_address\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"postal_code\": \"94105\",\n \"state\": \"CA\",\n \"line2\": \"Suite 100\"\n },\n \"contacts\": [\n {\n \"email\": \"john@example.com\",\n \"is_primary\": true,\n \"email_preferences\": [\n \"<string>\"\n ],\n \"first_name\": \"John\",\n \"id\": \"<string>\",\n \"last_name\": \"Doe\"\n }\n ],\n \"currency\": \"USD\",\n \"name\": \"Acme Corp\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alguna.io/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Alguna-Version"] = '<alguna-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"aliases\": [\n \"<string>\"\n ],\n \"billing_address\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"postal_code\": \"94105\",\n \"state\": \"CA\",\n \"line2\": \"Suite 100\"\n },\n \"contacts\": [\n {\n \"email\": \"john@example.com\",\n \"is_primary\": true,\n \"email_preferences\": [\n \"<string>\"\n ],\n \"first_name\": \"John\",\n \"id\": \"<string>\",\n \"last_name\": \"Doe\"\n }\n ],\n \"currency\": \"USD\",\n \"name\": \"Acme Corp\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-04-01T10:00:00Z",
"currency": "USD",
"id": "cust_abc123",
"name": "Acme Corp",
"updated_at": "2026-04-01T12:30:00Z",
"aliases": [
"<string>"
],
"billing_address": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"postal_code": "94105",
"state": "CA",
"line2": "Suite 100"
},
"contacts": [
{
"email": "john@example.com",
"id": "cont_abc123",
"is_primary": true,
"email_preferences": [
"<string>"
],
"first_name": "John",
"last_name": "Doe"
}
],
"tax_country": "DE",
"tax_id": "DE123456789",
"tax_rate": "0.20",
"tax_reason": "standard_rated",
"tax_status": "taxable",
"tax_type": "vat"
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
2026-04-01 A unique string used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.
255"ik_a1b2c3d4e5f6"
Path Parameters
Unique identifier for the customer
Body
Alternative identifiers for the customer
Customer billing address
Show child attributes
Show child attributes
Customer contacts. Replaces all existing contacts when provided
Show child attributes
Show child attributes
ISO 4217 currency code
"USD"
The name of the customer
"Acme Corp"
Response
Success
Timestamp when the customer was created
"2026-04-01T10:00:00Z"
ISO 4217 currency code
"USD"
Unique identifier for the customer
"cust_abc123"
Customer name
"Acme Corp"
Timestamp when the customer was last updated
"2026-04-01T12:30:00Z"
Alternative identifiers for the customer
Customer billing address
Show child attributes
Show child attributes
Customer contacts
Show child attributes
Show child attributes
ISO 3166-1 alpha-2 country code used for tax determination
"DE"
Customer tax identification number
"DE123456789"
Tax rate applied to the customer, expressed as a decimal fraction (0.20 = 20%)
"0.20"
Reason determining how tax is applied to the customer
standard_rated, reverse_charge, not_collecting, customer_exempt, zero_rated, other "standard_rated"
Customer tax status
"taxable"
Type of tax applied to the customer
gst, hst, igst, jct, lease_tax, pst, qst, sales_tax, service_tax, vat "vat"
curl --request PATCH \
--url https://api.alguna.io/customers/{id} \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aliases": [
"<string>"
],
"billing_address": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"postal_code": "94105",
"state": "CA",
"line2": "Suite 100"
},
"contacts": [
{
"email": "john@example.com",
"is_primary": true,
"email_preferences": [
"<string>"
],
"first_name": "John",
"id": "<string>",
"last_name": "Doe"
}
],
"currency": "USD",
"name": "Acme Corp"
}
'import requests
url = "https://api.alguna.io/customers/{id}"
payload = {
"aliases": ["<string>"],
"billing_address": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"postal_code": "94105",
"state": "CA",
"line2": "Suite 100"
},
"contacts": [
{
"email": "john@example.com",
"is_primary": True,
"email_preferences": ["<string>"],
"first_name": "John",
"id": "<string>",
"last_name": "Doe"
}
],
"currency": "USD",
"name": "Acme Corp"
}
headers = {
"Alguna-Version": "<alguna-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Alguna-Version': '<alguna-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
aliases: ['<string>'],
billing_address: {
city: 'San Francisco',
country: 'USA',
line1: '123 Main St',
postal_code: '94105',
state: 'CA',
line2: 'Suite 100'
},
contacts: [
{
email: 'john@example.com',
is_primary: true,
email_preferences: ['<string>'],
first_name: 'John',
id: '<string>',
last_name: 'Doe'
}
],
currency: 'USD',
name: 'Acme Corp'
})
};
fetch('https://api.alguna.io/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.alguna.io/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([
'aliases' => [
'<string>'
],
'billing_address' => [
'city' => 'San Francisco',
'country' => 'USA',
'line1' => '123 Main St',
'postal_code' => '94105',
'state' => 'CA',
'line2' => 'Suite 100'
],
'contacts' => [
[
'email' => 'john@example.com',
'is_primary' => true,
'email_preferences' => [
'<string>'
],
'first_name' => 'John',
'id' => '<string>',
'last_name' => 'Doe'
]
],
'currency' => 'USD',
'name' => 'Acme Corp'
]),
CURLOPT_HTTPHEADER => [
"Alguna-Version: <alguna-version>",
"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.alguna.io/customers/{id}"
payload := strings.NewReader("{\n \"aliases\": [\n \"<string>\"\n ],\n \"billing_address\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"postal_code\": \"94105\",\n \"state\": \"CA\",\n \"line2\": \"Suite 100\"\n },\n \"contacts\": [\n {\n \"email\": \"john@example.com\",\n \"is_primary\": true,\n \"email_preferences\": [\n \"<string>\"\n ],\n \"first_name\": \"John\",\n \"id\": \"<string>\",\n \"last_name\": \"Doe\"\n }\n ],\n \"currency\": \"USD\",\n \"name\": \"Acme Corp\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Alguna-Version", "<alguna-version>")
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.alguna.io/customers/{id}")
.header("Alguna-Version", "<alguna-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"aliases\": [\n \"<string>\"\n ],\n \"billing_address\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"postal_code\": \"94105\",\n \"state\": \"CA\",\n \"line2\": \"Suite 100\"\n },\n \"contacts\": [\n {\n \"email\": \"john@example.com\",\n \"is_primary\": true,\n \"email_preferences\": [\n \"<string>\"\n ],\n \"first_name\": \"John\",\n \"id\": \"<string>\",\n \"last_name\": \"Doe\"\n }\n ],\n \"currency\": \"USD\",\n \"name\": \"Acme Corp\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alguna.io/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Alguna-Version"] = '<alguna-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"aliases\": [\n \"<string>\"\n ],\n \"billing_address\": {\n \"city\": \"San Francisco\",\n \"country\": \"USA\",\n \"line1\": \"123 Main St\",\n \"postal_code\": \"94105\",\n \"state\": \"CA\",\n \"line2\": \"Suite 100\"\n },\n \"contacts\": [\n {\n \"email\": \"john@example.com\",\n \"is_primary\": true,\n \"email_preferences\": [\n \"<string>\"\n ],\n \"first_name\": \"John\",\n \"id\": \"<string>\",\n \"last_name\": \"Doe\"\n }\n ],\n \"currency\": \"USD\",\n \"name\": \"Acme Corp\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-04-01T10:00:00Z",
"currency": "USD",
"id": "cust_abc123",
"name": "Acme Corp",
"updated_at": "2026-04-01T12:30:00Z",
"aliases": [
"<string>"
],
"billing_address": {
"city": "San Francisco",
"country": "USA",
"line1": "123 Main St",
"postal_code": "94105",
"state": "CA",
"line2": "Suite 100"
},
"contacts": [
{
"email": "john@example.com",
"id": "cont_abc123",
"is_primary": true,
"email_preferences": [
"<string>"
],
"first_name": "John",
"last_name": "Doe"
}
],
"tax_country": "DE",
"tax_id": "DE123456789",
"tax_rate": "0.20",
"tax_reason": "standard_rated",
"tax_status": "taxable",
"tax_type": "vat"
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}