Skip to main content
POST
/
customer-aliases
Create a new Customer Alias
curl --request POST \
  --url https://eu.sequencehq.com/api/customer-aliases \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "01849e70-703e-705a-b59a-d3fd575587e0",
  "value": "external-customer-alias-123",
  "label": "CRM ID"
}
'
import requests

url = "https://eu.sequencehq.com/api/customer-aliases"

payload = {
"customerId": "01849e70-703e-705a-b59a-d3fd575587e0",
"value": "external-customer-alias-123",
"label": "CRM ID"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '01849e70-703e-705a-b59a-d3fd575587e0',
value: 'external-customer-alias-123',
label: 'CRM ID'
})
};

fetch('https://eu.sequencehq.com/api/customer-aliases', 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/customer-aliases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerId' => '01849e70-703e-705a-b59a-d3fd575587e0',
'value' => 'external-customer-alias-123',
'label' => 'CRM ID'
]),
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/customer-aliases"

payload := strings.NewReader("{\n \"customerId\": \"01849e70-703e-705a-b59a-d3fd575587e0\",\n \"value\": \"external-customer-alias-123\",\n \"label\": \"CRM ID\"\n}")

req, _ := http.NewRequest("POST", 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.post("https://eu.sequencehq.com/api/customer-aliases")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"01849e70-703e-705a-b59a-d3fd575587e0\",\n \"value\": \"external-customer-alias-123\",\n \"label\": \"CRM ID\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://eu.sequencehq.com/api/customer-aliases")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"01849e70-703e-705a-b59a-d3fd575587e0\",\n \"value\": \"external-customer-alias-123\",\n \"label\": \"CRM ID\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "01849e70-0a0f-72ca-ba07-5557dd734d43",
  "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1",
  "customerId": "01849e70-703e-705a-b59a-d3fd575587e0",
  "value": "external-customer-alias-123",
  "createdAt": "2022-10-01T00:00:00Z",
  "deletedAt": "2022-10-01T00:00:00Z",
  "label": "CRM ID",
  "archivedAt": "2022-10-01T00:00:00Z"
}
This response has no body data.
This response has no body data.
This response has no body data.

Headers

Authorization
string
required

Your API credentials. Eg. Basic {credentials}.

sequence-version
enum<string>

Use this header to select an API version

Available options:
2024-07-30

Body

application/json
customerId
string
required

Customer ID

Example:

"01849e70-703e-705a-b59a-d3fd575587e0"

value
string
required

Alias value

Example:

"external-customer-alias-123"

label
string

Alias label

Example:

"CRM ID"

Response

Created

id
string
required

Unique ID

Example:

"01849e70-0a0f-72ca-ba07-5557dd734d43"

sequenceAccountId
string
required

Sequence Account ID

Example:

"ec1479a2-6ba1-421f-a7de-0853a20d17a1"

customerId
string
required

Customer ID

Example:

"01849e70-703e-705a-b59a-d3fd575587e0"

value
string
required

Alias value

Example:

"external-customer-alias-123"

createdAt
string
required

Created At

Example:

"2022-10-01T00:00:00Z"

deletedAt
string

Deleted At

Example:

"2022-10-01T00:00:00Z"

label
string

Alias label

Example:

"CRM ID"

archivedAt
string

Archived At

Example:

"2022-10-01T00:00:00Z"