curl --request PUT \
--url https://eu.sequencehq.com/api/customers/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"legalName": "John Doe",
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
},
"addresses": [
{
"purposes": [
"BILLING",
"SHIPPING"
],
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
}
],
"url": "https://example.com/",
"label": "Example customer",
"taxStatus": "TAXED",
"customerAliases": [
"b1c87177-088a-40ec-8917-9809343f3f9c"
],
"integrationIds": [
{
"service": "Xero",
"id": "123456789"
},
{
"service": "Stripe",
"id": "cus_OCtCxqQDgu1uX9"
},
{
"service": "HubSpot",
"id": "123456789"
}
],
"parentId": "50af5191-05a3-42a5-802a-6b59091157af",
"contacts": [
{
"name": "John Smith",
"email": "john.smith@example.com",
"billingPreference": "PRIMARY",
"purposes": [
"BILLING"
],
"notificationSubscriptions": [
"BILLING"
]
},
{
"name": "Anna Smith",
"email": "anna.smith@example.com",
"billingPreference": "STANDARD",
"purposes": [
"SHIPPING"
],
"notificationSubscriptions": [
"BILLING"
]
},
{
"name": "Penny Smith",
"email": "penny.smith@example.com",
"billingPreference": "NONE",
"purposes": [],
"notificationSubscriptions": []
}
],
"pushToIntegrations": [
"Xero"
],
"status": "ACTIVE",
"customProperties": {
"region": "EU",
"tier": "gold"
}
}
'import requests
url = "https://eu.sequencehq.com/api/customers/{id}"
payload = {
"legalName": "John Doe",
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
},
"addresses": [
{
"purposes": ["BILLING", "SHIPPING"],
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
}
],
"url": "https://example.com/",
"label": "Example customer",
"taxStatus": "TAXED",
"customerAliases": ["b1c87177-088a-40ec-8917-9809343f3f9c"],
"integrationIds": [
{
"service": "Xero",
"id": "123456789"
},
{
"service": "Stripe",
"id": "cus_OCtCxqQDgu1uX9"
},
{
"service": "HubSpot",
"id": "123456789"
}
],
"parentId": "50af5191-05a3-42a5-802a-6b59091157af",
"contacts": [
{
"name": "John Smith",
"email": "john.smith@example.com",
"billingPreference": "PRIMARY",
"purposes": ["BILLING"],
"notificationSubscriptions": ["BILLING"]
},
{
"name": "Anna Smith",
"email": "anna.smith@example.com",
"billingPreference": "STANDARD",
"purposes": ["SHIPPING"],
"notificationSubscriptions": ["BILLING"]
},
{
"name": "Penny Smith",
"email": "penny.smith@example.com",
"billingPreference": "NONE",
"purposes": [],
"notificationSubscriptions": []
}
],
"pushToIntegrations": ["Xero"],
"status": "ACTIVE",
"customProperties": {
"region": "EU",
"tier": "gold"
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
legalName: 'John Doe',
address: {
line1: 'Flat 1',
line2: '123 Fake Street',
town: 'New York',
state: 'NY',
postcode: 'AB1 2EF',
country: 'US'
},
addresses: [
{
purposes: ['BILLING', 'SHIPPING'],
address: {
line1: 'Flat 1',
line2: '123 Fake Street',
town: 'New York',
state: 'NY',
postcode: 'AB1 2EF',
country: 'US'
}
}
],
url: 'https://example.com/',
label: 'Example customer',
taxStatus: 'TAXED',
customerAliases: ['b1c87177-088a-40ec-8917-9809343f3f9c'],
integrationIds: [
{service: 'Xero', id: '123456789'},
{service: 'Stripe', id: 'cus_OCtCxqQDgu1uX9'},
{service: 'HubSpot', id: '123456789'}
],
parentId: '50af5191-05a3-42a5-802a-6b59091157af',
contacts: [
{
name: 'John Smith',
email: 'john.smith@example.com',
billingPreference: 'PRIMARY',
purposes: ['BILLING'],
notificationSubscriptions: ['BILLING']
},
{
name: 'Anna Smith',
email: 'anna.smith@example.com',
billingPreference: 'STANDARD',
purposes: ['SHIPPING'],
notificationSubscriptions: ['BILLING']
},
{
name: 'Penny Smith',
email: 'penny.smith@example.com',
billingPreference: 'NONE',
purposes: [],
notificationSubscriptions: []
}
],
pushToIntegrations: ['Xero'],
status: 'ACTIVE',
customProperties: {region: 'EU', tier: 'gold'}
})
};
fetch('https://eu.sequencehq.com/api/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://eu.sequencehq.com/api/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'legalName' => 'John Doe',
'address' => [
'line1' => 'Flat 1',
'line2' => '123 Fake Street',
'town' => 'New York',
'state' => 'NY',
'postcode' => 'AB1 2EF',
'country' => 'US'
],
'addresses' => [
[
'purposes' => [
'BILLING',
'SHIPPING'
],
'address' => [
'line1' => 'Flat 1',
'line2' => '123 Fake Street',
'town' => 'New York',
'state' => 'NY',
'postcode' => 'AB1 2EF',
'country' => 'US'
]
]
],
'url' => 'https://example.com/',
'label' => 'Example customer',
'taxStatus' => 'TAXED',
'customerAliases' => [
'b1c87177-088a-40ec-8917-9809343f3f9c'
],
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123456789'
],
[
'service' => 'Stripe',
'id' => 'cus_OCtCxqQDgu1uX9'
],
[
'service' => 'HubSpot',
'id' => '123456789'
]
],
'parentId' => '50af5191-05a3-42a5-802a-6b59091157af',
'contacts' => [
[
'name' => 'John Smith',
'email' => 'john.smith@example.com',
'billingPreference' => 'PRIMARY',
'purposes' => [
'BILLING'
],
'notificationSubscriptions' => [
'BILLING'
]
],
[
'name' => 'Anna Smith',
'email' => 'anna.smith@example.com',
'billingPreference' => 'STANDARD',
'purposes' => [
'SHIPPING'
],
'notificationSubscriptions' => [
'BILLING'
]
],
[
'name' => 'Penny Smith',
'email' => 'penny.smith@example.com',
'billingPreference' => 'NONE',
'purposes' => [
],
'notificationSubscriptions' => [
]
]
],
'pushToIntegrations' => [
'Xero'
],
'status' => 'ACTIVE',
'customProperties' => [
'region' => 'EU',
'tier' => 'gold'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://eu.sequencehq.com/api/customers/{id}"
payload := strings.NewReader("{\n \"legalName\": \"John Doe\",\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n },\n \"addresses\": [\n {\n \"purposes\": [\n \"BILLING\",\n \"SHIPPING\"\n ],\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n }\n }\n ],\n \"url\": \"https://example.com/\",\n \"label\": \"Example customer\",\n \"taxStatus\": \"TAXED\",\n \"customerAliases\": [\n \"b1c87177-088a-40ec-8917-9809343f3f9c\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123456789\"\n },\n {\n \"service\": \"Stripe\",\n \"id\": \"cus_OCtCxqQDgu1uX9\"\n },\n {\n \"service\": \"HubSpot\",\n \"id\": \"123456789\"\n }\n ],\n \"parentId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"contacts\": [\n {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@example.com\",\n \"billingPreference\": \"PRIMARY\",\n \"purposes\": [\n \"BILLING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Anna Smith\",\n \"email\": \"anna.smith@example.com\",\n \"billingPreference\": \"STANDARD\",\n \"purposes\": [\n \"SHIPPING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Penny Smith\",\n \"email\": \"penny.smith@example.com\",\n \"billingPreference\": \"NONE\",\n \"purposes\": [],\n \"notificationSubscriptions\": []\n }\n ],\n \"pushToIntegrations\": [\n \"Xero\"\n ],\n \"status\": \"ACTIVE\",\n \"customProperties\": {\n \"region\": \"EU\",\n \"tier\": \"gold\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.put("https://eu.sequencehq.com/api/customers/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"legalName\": \"John Doe\",\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n },\n \"addresses\": [\n {\n \"purposes\": [\n \"BILLING\",\n \"SHIPPING\"\n ],\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n }\n }\n ],\n \"url\": \"https://example.com/\",\n \"label\": \"Example customer\",\n \"taxStatus\": \"TAXED\",\n \"customerAliases\": [\n \"b1c87177-088a-40ec-8917-9809343f3f9c\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123456789\"\n },\n {\n \"service\": \"Stripe\",\n \"id\": \"cus_OCtCxqQDgu1uX9\"\n },\n {\n \"service\": \"HubSpot\",\n \"id\": \"123456789\"\n }\n ],\n \"parentId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"contacts\": [\n {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@example.com\",\n \"billingPreference\": \"PRIMARY\",\n \"purposes\": [\n \"BILLING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Anna Smith\",\n \"email\": \"anna.smith@example.com\",\n \"billingPreference\": \"STANDARD\",\n \"purposes\": [\n \"SHIPPING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Penny Smith\",\n \"email\": \"penny.smith@example.com\",\n \"billingPreference\": \"NONE\",\n \"purposes\": [],\n \"notificationSubscriptions\": []\n }\n ],\n \"pushToIntegrations\": [\n \"Xero\"\n ],\n \"status\": \"ACTIVE\",\n \"customProperties\": {\n \"region\": \"EU\",\n \"tier\": \"gold\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legalName\": \"John Doe\",\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n },\n \"addresses\": [\n {\n \"purposes\": [\n \"BILLING\",\n \"SHIPPING\"\n ],\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n }\n }\n ],\n \"url\": \"https://example.com/\",\n \"label\": \"Example customer\",\n \"taxStatus\": \"TAXED\",\n \"customerAliases\": [\n \"b1c87177-088a-40ec-8917-9809343f3f9c\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123456789\"\n },\n {\n \"service\": \"Stripe\",\n \"id\": \"cus_OCtCxqQDgu1uX9\"\n },\n {\n \"service\": \"HubSpot\",\n \"id\": \"123456789\"\n }\n ],\n \"parentId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"contacts\": [\n {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@example.com\",\n \"billingPreference\": \"PRIMARY\",\n \"purposes\": [\n \"BILLING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Anna Smith\",\n \"email\": \"anna.smith@example.com\",\n \"billingPreference\": \"STANDARD\",\n \"purposes\": [\n \"SHIPPING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Penny Smith\",\n \"email\": \"penny.smith@example.com\",\n \"billingPreference\": \"NONE\",\n \"purposes\": [],\n \"notificationSubscriptions\": []\n }\n ],\n \"pushToIntegrations\": [\n \"Xero\"\n ],\n \"status\": \"ACTIVE\",\n \"customProperties\": {\n \"region\": \"EU\",\n \"tier\": \"gold\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "e309e948-088e-4d77-b654-cd85498f1555",
"createdAt": "2021-01-02T10:55:00Z",
"organizations": [
{
"id": "c0dc4e79-ec52-4811-8cf5-addb2527915c",
"owner": {
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "FinTech Solutions Inc."
},
"members": [
{
"id": "e309e948-088e-4d77-b654-cd85498f1555",
"name": "Fintech Payment Processing"
},
{
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "Fintech Lending Services"
}
]
}
],
"legalName": "Fintech Payment Processing",
"address": {
"line1": "7500 Bluewater Rd NW",
"town": "Albuquerque",
"state": "NY",
"postcode": "87121",
"country": "US"
},
"addresses": [
{
"purposes": [
"BILLING"
],
"address": {
"line1": "7500 Bluewater Rd NW",
"town": "Albuquerque",
"state": "NY",
"postcode": "87121",
"country": "US"
}
},
{
"purposes": [
"SHIPPING"
],
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
}
],
"url": "https://example.com/",
"domain": "example.com",
"label": "Example customer",
"integrationIds": [
{
"service": "Xero",
"id": "2aaff66f-ef30-4599-b192-c168fd4cd226",
"lastSynced": "2024-03-28T16:47:00Z",
"isPending": false
},
{
"service": "Stripe",
"id": "cus_OCtCxqQDgu1uX9",
"lastSynced": "2024-03-28T16:47:00Z",
"isPending": false
}
],
"archivedAt": "2025-08-28T12:00:00Z",
"taxStatus": "TAXED",
"contacts": [
{
"id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc",
"name": "John Smith",
"email": "john.smith@example.com",
"billingPreference": "NONE",
"purposes": [],
"notificationSubscriptions": [],
"createdAt": "2022-06-28T16:47:00Z",
"updatedAt": "2022-06-28T16:47:00Z",
"archivedAt": "2023-06-28T16:47:00Z"
}
],
"status": "ACTIVE",
"customProperties": {
"region": "EU",
"tier": "gold"
}
}This response has no body data.This response has no body data.This response has no body data.Update customer
Update the details of one of your customers.
curl --request PUT \
--url https://eu.sequencehq.com/api/customers/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"legalName": "John Doe",
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
},
"addresses": [
{
"purposes": [
"BILLING",
"SHIPPING"
],
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
}
],
"url": "https://example.com/",
"label": "Example customer",
"taxStatus": "TAXED",
"customerAliases": [
"b1c87177-088a-40ec-8917-9809343f3f9c"
],
"integrationIds": [
{
"service": "Xero",
"id": "123456789"
},
{
"service": "Stripe",
"id": "cus_OCtCxqQDgu1uX9"
},
{
"service": "HubSpot",
"id": "123456789"
}
],
"parentId": "50af5191-05a3-42a5-802a-6b59091157af",
"contacts": [
{
"name": "John Smith",
"email": "john.smith@example.com",
"billingPreference": "PRIMARY",
"purposes": [
"BILLING"
],
"notificationSubscriptions": [
"BILLING"
]
},
{
"name": "Anna Smith",
"email": "anna.smith@example.com",
"billingPreference": "STANDARD",
"purposes": [
"SHIPPING"
],
"notificationSubscriptions": [
"BILLING"
]
},
{
"name": "Penny Smith",
"email": "penny.smith@example.com",
"billingPreference": "NONE",
"purposes": [],
"notificationSubscriptions": []
}
],
"pushToIntegrations": [
"Xero"
],
"status": "ACTIVE",
"customProperties": {
"region": "EU",
"tier": "gold"
}
}
'import requests
url = "https://eu.sequencehq.com/api/customers/{id}"
payload = {
"legalName": "John Doe",
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
},
"addresses": [
{
"purposes": ["BILLING", "SHIPPING"],
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
}
],
"url": "https://example.com/",
"label": "Example customer",
"taxStatus": "TAXED",
"customerAliases": ["b1c87177-088a-40ec-8917-9809343f3f9c"],
"integrationIds": [
{
"service": "Xero",
"id": "123456789"
},
{
"service": "Stripe",
"id": "cus_OCtCxqQDgu1uX9"
},
{
"service": "HubSpot",
"id": "123456789"
}
],
"parentId": "50af5191-05a3-42a5-802a-6b59091157af",
"contacts": [
{
"name": "John Smith",
"email": "john.smith@example.com",
"billingPreference": "PRIMARY",
"purposes": ["BILLING"],
"notificationSubscriptions": ["BILLING"]
},
{
"name": "Anna Smith",
"email": "anna.smith@example.com",
"billingPreference": "STANDARD",
"purposes": ["SHIPPING"],
"notificationSubscriptions": ["BILLING"]
},
{
"name": "Penny Smith",
"email": "penny.smith@example.com",
"billingPreference": "NONE",
"purposes": [],
"notificationSubscriptions": []
}
],
"pushToIntegrations": ["Xero"],
"status": "ACTIVE",
"customProperties": {
"region": "EU",
"tier": "gold"
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
legalName: 'John Doe',
address: {
line1: 'Flat 1',
line2: '123 Fake Street',
town: 'New York',
state: 'NY',
postcode: 'AB1 2EF',
country: 'US'
},
addresses: [
{
purposes: ['BILLING', 'SHIPPING'],
address: {
line1: 'Flat 1',
line2: '123 Fake Street',
town: 'New York',
state: 'NY',
postcode: 'AB1 2EF',
country: 'US'
}
}
],
url: 'https://example.com/',
label: 'Example customer',
taxStatus: 'TAXED',
customerAliases: ['b1c87177-088a-40ec-8917-9809343f3f9c'],
integrationIds: [
{service: 'Xero', id: '123456789'},
{service: 'Stripe', id: 'cus_OCtCxqQDgu1uX9'},
{service: 'HubSpot', id: '123456789'}
],
parentId: '50af5191-05a3-42a5-802a-6b59091157af',
contacts: [
{
name: 'John Smith',
email: 'john.smith@example.com',
billingPreference: 'PRIMARY',
purposes: ['BILLING'],
notificationSubscriptions: ['BILLING']
},
{
name: 'Anna Smith',
email: 'anna.smith@example.com',
billingPreference: 'STANDARD',
purposes: ['SHIPPING'],
notificationSubscriptions: ['BILLING']
},
{
name: 'Penny Smith',
email: 'penny.smith@example.com',
billingPreference: 'NONE',
purposes: [],
notificationSubscriptions: []
}
],
pushToIntegrations: ['Xero'],
status: 'ACTIVE',
customProperties: {region: 'EU', tier: 'gold'}
})
};
fetch('https://eu.sequencehq.com/api/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://eu.sequencehq.com/api/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'legalName' => 'John Doe',
'address' => [
'line1' => 'Flat 1',
'line2' => '123 Fake Street',
'town' => 'New York',
'state' => 'NY',
'postcode' => 'AB1 2EF',
'country' => 'US'
],
'addresses' => [
[
'purposes' => [
'BILLING',
'SHIPPING'
],
'address' => [
'line1' => 'Flat 1',
'line2' => '123 Fake Street',
'town' => 'New York',
'state' => 'NY',
'postcode' => 'AB1 2EF',
'country' => 'US'
]
]
],
'url' => 'https://example.com/',
'label' => 'Example customer',
'taxStatus' => 'TAXED',
'customerAliases' => [
'b1c87177-088a-40ec-8917-9809343f3f9c'
],
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123456789'
],
[
'service' => 'Stripe',
'id' => 'cus_OCtCxqQDgu1uX9'
],
[
'service' => 'HubSpot',
'id' => '123456789'
]
],
'parentId' => '50af5191-05a3-42a5-802a-6b59091157af',
'contacts' => [
[
'name' => 'John Smith',
'email' => 'john.smith@example.com',
'billingPreference' => 'PRIMARY',
'purposes' => [
'BILLING'
],
'notificationSubscriptions' => [
'BILLING'
]
],
[
'name' => 'Anna Smith',
'email' => 'anna.smith@example.com',
'billingPreference' => 'STANDARD',
'purposes' => [
'SHIPPING'
],
'notificationSubscriptions' => [
'BILLING'
]
],
[
'name' => 'Penny Smith',
'email' => 'penny.smith@example.com',
'billingPreference' => 'NONE',
'purposes' => [
],
'notificationSubscriptions' => [
]
]
],
'pushToIntegrations' => [
'Xero'
],
'status' => 'ACTIVE',
'customProperties' => [
'region' => 'EU',
'tier' => 'gold'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://eu.sequencehq.com/api/customers/{id}"
payload := strings.NewReader("{\n \"legalName\": \"John Doe\",\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n },\n \"addresses\": [\n {\n \"purposes\": [\n \"BILLING\",\n \"SHIPPING\"\n ],\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n }\n }\n ],\n \"url\": \"https://example.com/\",\n \"label\": \"Example customer\",\n \"taxStatus\": \"TAXED\",\n \"customerAliases\": [\n \"b1c87177-088a-40ec-8917-9809343f3f9c\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123456789\"\n },\n {\n \"service\": \"Stripe\",\n \"id\": \"cus_OCtCxqQDgu1uX9\"\n },\n {\n \"service\": \"HubSpot\",\n \"id\": \"123456789\"\n }\n ],\n \"parentId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"contacts\": [\n {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@example.com\",\n \"billingPreference\": \"PRIMARY\",\n \"purposes\": [\n \"BILLING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Anna Smith\",\n \"email\": \"anna.smith@example.com\",\n \"billingPreference\": \"STANDARD\",\n \"purposes\": [\n \"SHIPPING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Penny Smith\",\n \"email\": \"penny.smith@example.com\",\n \"billingPreference\": \"NONE\",\n \"purposes\": [],\n \"notificationSubscriptions\": []\n }\n ],\n \"pushToIntegrations\": [\n \"Xero\"\n ],\n \"status\": \"ACTIVE\",\n \"customProperties\": {\n \"region\": \"EU\",\n \"tier\": \"gold\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.put("https://eu.sequencehq.com/api/customers/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"legalName\": \"John Doe\",\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n },\n \"addresses\": [\n {\n \"purposes\": [\n \"BILLING\",\n \"SHIPPING\"\n ],\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n }\n }\n ],\n \"url\": \"https://example.com/\",\n \"label\": \"Example customer\",\n \"taxStatus\": \"TAXED\",\n \"customerAliases\": [\n \"b1c87177-088a-40ec-8917-9809343f3f9c\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123456789\"\n },\n {\n \"service\": \"Stripe\",\n \"id\": \"cus_OCtCxqQDgu1uX9\"\n },\n {\n \"service\": \"HubSpot\",\n \"id\": \"123456789\"\n }\n ],\n \"parentId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"contacts\": [\n {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@example.com\",\n \"billingPreference\": \"PRIMARY\",\n \"purposes\": [\n \"BILLING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Anna Smith\",\n \"email\": \"anna.smith@example.com\",\n \"billingPreference\": \"STANDARD\",\n \"purposes\": [\n \"SHIPPING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Penny Smith\",\n \"email\": \"penny.smith@example.com\",\n \"billingPreference\": \"NONE\",\n \"purposes\": [],\n \"notificationSubscriptions\": []\n }\n ],\n \"pushToIntegrations\": [\n \"Xero\"\n ],\n \"status\": \"ACTIVE\",\n \"customProperties\": {\n \"region\": \"EU\",\n \"tier\": \"gold\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legalName\": \"John Doe\",\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n },\n \"addresses\": [\n {\n \"purposes\": [\n \"BILLING\",\n \"SHIPPING\"\n ],\n \"address\": {\n \"line1\": \"Flat 1\",\n \"line2\": \"123 Fake Street\",\n \"town\": \"New York\",\n \"state\": \"NY\",\n \"postcode\": \"AB1 2EF\",\n \"country\": \"US\"\n }\n }\n ],\n \"url\": \"https://example.com/\",\n \"label\": \"Example customer\",\n \"taxStatus\": \"TAXED\",\n \"customerAliases\": [\n \"b1c87177-088a-40ec-8917-9809343f3f9c\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123456789\"\n },\n {\n \"service\": \"Stripe\",\n \"id\": \"cus_OCtCxqQDgu1uX9\"\n },\n {\n \"service\": \"HubSpot\",\n \"id\": \"123456789\"\n }\n ],\n \"parentId\": \"50af5191-05a3-42a5-802a-6b59091157af\",\n \"contacts\": [\n {\n \"name\": \"John Smith\",\n \"email\": \"john.smith@example.com\",\n \"billingPreference\": \"PRIMARY\",\n \"purposes\": [\n \"BILLING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Anna Smith\",\n \"email\": \"anna.smith@example.com\",\n \"billingPreference\": \"STANDARD\",\n \"purposes\": [\n \"SHIPPING\"\n ],\n \"notificationSubscriptions\": [\n \"BILLING\"\n ]\n },\n {\n \"name\": \"Penny Smith\",\n \"email\": \"penny.smith@example.com\",\n \"billingPreference\": \"NONE\",\n \"purposes\": [],\n \"notificationSubscriptions\": []\n }\n ],\n \"pushToIntegrations\": [\n \"Xero\"\n ],\n \"status\": \"ACTIVE\",\n \"customProperties\": {\n \"region\": \"EU\",\n \"tier\": \"gold\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "e309e948-088e-4d77-b654-cd85498f1555",
"createdAt": "2021-01-02T10:55:00Z",
"organizations": [
{
"id": "c0dc4e79-ec52-4811-8cf5-addb2527915c",
"owner": {
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "FinTech Solutions Inc."
},
"members": [
{
"id": "e309e948-088e-4d77-b654-cd85498f1555",
"name": "Fintech Payment Processing"
},
{
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "Fintech Lending Services"
}
]
}
],
"legalName": "Fintech Payment Processing",
"address": {
"line1": "7500 Bluewater Rd NW",
"town": "Albuquerque",
"state": "NY",
"postcode": "87121",
"country": "US"
},
"addresses": [
{
"purposes": [
"BILLING"
],
"address": {
"line1": "7500 Bluewater Rd NW",
"town": "Albuquerque",
"state": "NY",
"postcode": "87121",
"country": "US"
}
},
{
"purposes": [
"SHIPPING"
],
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
}
],
"url": "https://example.com/",
"domain": "example.com",
"label": "Example customer",
"integrationIds": [
{
"service": "Xero",
"id": "2aaff66f-ef30-4599-b192-c168fd4cd226",
"lastSynced": "2024-03-28T16:47:00Z",
"isPending": false
},
{
"service": "Stripe",
"id": "cus_OCtCxqQDgu1uX9",
"lastSynced": "2024-03-28T16:47:00Z",
"isPending": false
}
],
"archivedAt": "2025-08-28T12:00:00Z",
"taxStatus": "TAXED",
"contacts": [
{
"id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc",
"name": "John Smith",
"email": "john.smith@example.com",
"billingPreference": "NONE",
"purposes": [],
"notificationSubscriptions": [],
"createdAt": "2022-06-28T16:47:00Z",
"updatedAt": "2022-06-28T16:47:00Z",
"archivedAt": "2023-06-28T16:47:00Z"
}
],
"status": "ACTIVE",
"customProperties": {
"region": "EU",
"tier": "gold"
}
}This response has no body data.This response has no body data.This response has no body data.Headers
Your API credentials. Eg. Basic {credentials}.
Use this header to select an API version
2024-07-30 Path Parameters
Customer ID
Body
Legal name
"John Doe"
Tax status applicable to customer. Can be one of TAXED, TAX_EXEMPT or REVERSE_CHARGED. The default is TAXED.
TAXED, TAX_EXEMPT, REVERSE_CHARGED "TAXED"
Contacts to create for this customer. This will replace all existing contacts for this customer. When any contact sends purposes, exactly one contact must have BILLING in purposes. When only the deprecated billingPreference is sent, at most one contact can be 'PRIMARY', and one is required if any contact is 'STANDARD'.
Show child attributes
Show child attributes
[
{
"name": "John Smith",
"email": "john.smith@example.com",
"billingPreference": "PRIMARY",
"purposes": ["BILLING"],
"notificationSubscriptions": ["BILLING"]
},
{
"name": "Anna Smith",
"email": "anna.smith@example.com",
"billingPreference": "STANDARD",
"purposes": ["SHIPPING"],
"notificationSubscriptions": ["BILLING"]
},
{
"name": "Penny Smith",
"email": "penny.smith@example.com",
"billingPreference": "NONE",
"purposes": [],
"notificationSubscriptions": []
}
]
Address
- Option 1
- Option 2
Show child attributes
Show child attributes
{
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
The customer's addresses, each with the purposes it serves. At most one address can be BILLING and at most one SHIPPING, and one address can be both. When sent, this list replaces all of the customer's addresses and the deprecated address field is ignored. Send an empty list to remove every address. null is not accepted. When this field is left out, the deprecated address field becomes the customer's only address, serving billing: sending an address replaces every address with it, and leaving address out or sending null removes every address, shipping included.
Show child attributes
Show child attributes
[
{
"purposes": ["BILLING", "SHIPPING"],
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
}
]
URL
"https://example.com/"
Label
"Example customer"
Customer aliases
["b1c87177-088a-40ec-8917-9809343f3f9c"]
IDs in external integrations
Show child attributes
Show child attributes
[
{ "service": "Xero", "id": "123456789" },
{
"service": "Stripe",
"id": "cus_OCtCxqQDgu1uX9"
},
{ "service": "HubSpot", "id": "123456789" }
]
ID of a parent customer. Populate this field to create a new customeras a child customer of another, existing customer.
"50af5191-05a3-42a5-802a-6b59091157af"
Automatically create customer in these linked integrations
Xero ["Xero"]
Customer status:
- DRAFT means the customer has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.
- ACTIVE is the default state when a customer is created via API or dashboard.
DRAFT, ACTIVE "ACTIVE"
Custom key-value properties. Providing this field replaces all existing custom properties. Omitting it leaves them unchanged.
Show child attributes
Show child attributes
{ "region": "EU", "tier": "gold" }
Response
OK
Unique ID
"e309e948-088e-4d77-b654-cd85498f1555"
Time at which the customer was initially created, in ISO 8601 format
"2021-01-02T10:55:00Z"
Organizations that this customer is a member of
Show child attributes
Show child attributes
[
{
"id": "c0dc4e79-ec52-4811-8cf5-addb2527915c",
"owner": {
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "FinTech Solutions Inc."
},
"members": [
{
"id": "e309e948-088e-4d77-b654-cd85498f1555",
"name": "Fintech Payment Processing"
},
{
"id": "50af5191-05a3-42a5-802a-6b59091157af",
"name": "Fintech Lending Services"
}
]
}
]
Legal name
"Fintech Payment Processing"
Address
Show child attributes
Show child attributes
{
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
The customer's addresses, each with the purposes it serves. At most one address is BILLING and at most one SHIPPING, and one address can be both. Empty when the customer has no addresses. The deprecated address field holds the BILLING address, or a placeholder with an empty line1, town and postcode when there is none.
Show child attributes
Show child attributes
[
{
"purposes": ["BILLING"],
"address": {
"line1": "7500 Bluewater Rd NW",
"town": "Albuquerque",
"state": "NY",
"postcode": "87121",
"country": "US"
}
},
{
"purposes": ["SHIPPING"],
"address": {
"line1": "Flat 1",
"line2": "123 Fake Street",
"town": "New York",
"state": "NY",
"postcode": "AB1 2EF",
"country": "US"
}
}
]
External services which are linked to this customer
Show child attributes
Show child attributes
[
{
"service": "Xero",
"id": "2aaff66f-ef30-4599-b192-c168fd4cd226",
"lastSynced": "2024-03-28T16:47:00Z",
"isPending": false
},
{
"service": "Stripe",
"id": "cus_OCtCxqQDgu1uX9",
"lastSynced": "2024-03-28T16:47:00Z",
"isPending": false
}
]
Tax status applicable to customer. Can be one of TAXED, TAX_EXEMPT or REVERSE_CHARGED. The default is TAXED.
TAXED, TAX_EXEMPT, REVERSE_CHARGED "TAXED"
Contacts for this customer
Show child attributes
Show child attributes
[
{
"id": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc",
"name": "John Smith",
"email": "john.smith@example.com",
"billingPreference": "NONE",
"purposes": [],
"notificationSubscriptions": [],
"createdAt": "2022-06-28T16:47:00Z",
"updatedAt": "2022-06-28T16:47:00Z",
"archivedAt": "2023-06-28T16:47:00Z"
}
]
Customer status:
- DRAFT means the customer has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.
- ACTIVE is the default state when a customer is created via API or dashboard.
DRAFT, ACTIVE "ACTIVE"
Custom key-value properties for this customer
Show child attributes
Show child attributes
{ "region": "EU", "tier": "gold" }
URL
"https://example.com/"
Customer's primary domain name
"example.com"
Label
"Example customer"
Time at which the customer was archived, in ISO 8601 format
"2025-08-28T12:00:00Z"