Edit profile properties
curl --request PATCH \
--url http://localhost:3001/api/v1/profiles/{profileId}/properties \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"changes": [
{
"type": "set",
"propertyName": "<string>",
"value": "<string>",
"onlyWithoutValue": false,
"createProperty": true
}
]
}
'import requests
url = "http://localhost:3001/api/v1/profiles/{profileId}/properties"
payload = { "changes": [
{
"type": "set",
"propertyName": "<string>",
"value": "<string>",
"onlyWithoutValue": False,
"createProperty": True
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
changes: [
{
type: 'set',
propertyName: '<string>',
value: '<string>',
onlyWithoutValue: false,
createProperty: true
}
]
})
};
fetch('http://localhost:3001/api/v1/profiles/{profileId}/properties', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/profiles/{profileId}/properties",
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([
'changes' => [
[
'type' => 'set',
'propertyName' => '<string>',
'value' => '<string>',
'onlyWithoutValue' => false,
'createProperty' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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 := "http://localhost:3001/api/v1/profiles/{profileId}/properties"
payload := strings.NewReader("{\n \"changes\": [\n {\n \"type\": \"set\",\n \"propertyName\": \"<string>\",\n \"value\": \"<string>\",\n \"onlyWithoutValue\": false,\n \"createProperty\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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("http://localhost:3001/api/v1/profiles/{profileId}/properties")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": [\n {\n \"type\": \"set\",\n \"propertyName\": \"<string>\",\n \"value\": \"<string>\",\n \"onlyWithoutValue\": false,\n \"createProperty\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/profiles/{profileId}/properties")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"changes\": [\n {\n \"type\": \"set\",\n \"propertyName\": \"<string>\",\n \"value\": \"<string>\",\n \"onlyWithoutValue\": false,\n \"createProperty\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "<string>",
"phone": "<string>",
"language": "<string>",
"country": "<string>",
"sources": [
"<string>"
],
"properties": {},
"segments": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"deliverySuppression": {
"suppressed": true,
"reason": "HardBounced",
"email": "<string>",
"suppressedAt": "<string>",
"latestBounceReason": "<string>",
"latestBounceDiagnosticCode": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}{
"errorCode": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 12 seconds.",
"details": {
"retryAfterSeconds": 12
}
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}Profiles
Edit profile properties
Set or remove one Profile’s own properties. Each value is saved as a manual edit, which later imports and integration syncs don’t overwrite; a removed value is deleted. The same rules as a bulk edit apply: system, computed, identity and order properties can’t be edited, language and country are changed with PATCH /profiles/{profileId}, and a new property is created only when a change sets createProperty. All changes apply together, or none do. The edit is applied at once and can’t be undone. Returns the updated Profile.
PATCH
/
api
/
v1
/
profiles
/
{profileId}
/
properties
Edit profile properties
curl --request PATCH \
--url http://localhost:3001/api/v1/profiles/{profileId}/properties \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"changes": [
{
"type": "set",
"propertyName": "<string>",
"value": "<string>",
"onlyWithoutValue": false,
"createProperty": true
}
]
}
'import requests
url = "http://localhost:3001/api/v1/profiles/{profileId}/properties"
payload = { "changes": [
{
"type": "set",
"propertyName": "<string>",
"value": "<string>",
"onlyWithoutValue": False,
"createProperty": True
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
changes: [
{
type: 'set',
propertyName: '<string>',
value: '<string>',
onlyWithoutValue: false,
createProperty: true
}
]
})
};
fetch('http://localhost:3001/api/v1/profiles/{profileId}/properties', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/profiles/{profileId}/properties",
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([
'changes' => [
[
'type' => 'set',
'propertyName' => '<string>',
'value' => '<string>',
'onlyWithoutValue' => false,
'createProperty' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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 := "http://localhost:3001/api/v1/profiles/{profileId}/properties"
payload := strings.NewReader("{\n \"changes\": [\n {\n \"type\": \"set\",\n \"propertyName\": \"<string>\",\n \"value\": \"<string>\",\n \"onlyWithoutValue\": false,\n \"createProperty\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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("http://localhost:3001/api/v1/profiles/{profileId}/properties")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": [\n {\n \"type\": \"set\",\n \"propertyName\": \"<string>\",\n \"value\": \"<string>\",\n \"onlyWithoutValue\": false,\n \"createProperty\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/profiles/{profileId}/properties")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"changes\": [\n {\n \"type\": \"set\",\n \"propertyName\": \"<string>\",\n \"value\": \"<string>\",\n \"onlyWithoutValue\": false,\n \"createProperty\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "<string>",
"phone": "<string>",
"language": "<string>",
"country": "<string>",
"sources": [
"<string>"
],
"properties": {},
"segments": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"deliverySuppression": {
"suppressed": true,
"reason": "HardBounced",
"email": "<string>",
"suppressedAt": "<string>",
"latestBounceReason": "<string>",
"latestBounceDiagnosticCode": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}{
"errorCode": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 12 seconds.",
"details": {
"retryAfterSeconds": 12
}
}{
"errorCode": "TEMPLATE_NAME_EXISTS",
"message": "Template name 'Hello' already exists in this organization.",
"details": {
"issues": [
{
"path": "name",
"code": "duplicate",
"message": "Template name already exists in this organization."
}
]
}
}Body
application/json
Response
Default Response
Unified API view of a Profile row, with property data-lineage envelope and segment memberships.

