Update Contact
Update an existing contact's information. Only the fields you include in the request body will be updated — all other fields remain unchanged.
Endpoint
PATCH /contacts/:id
Returns: 200 OK
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <your-api-key> | Yes |
Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The contact ID to update |
Body Parameters
All fields are optional. Only include the fields you want to change.
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | null | No | Updated email address. Set to null to clear. |
phone_number | string | null | No | Updated phone number in E.164 format. Set to null to clear. |
external_id | string | null | No | Your own identifier for this person. Max 255 characters, unique within your organization — reusing another contact's returns 409. Set to null to clear. |
first_name | string | null | No | Updated first name. Max 100 characters. Set to null to clear. |
last_name | string | null | No | Updated last name. Max 100 characters. Set to null to clear. |
properties | object | No | Custom property values. Replaces the previous values. |
list_ids | string[] | No | Replaces the contact's list membership with exactly these lists — it is not additive. Send [] to remove the contact from every list; omit the field to leave membership untouched. |
info
Setting a field to null clears its value. Omitting a field leaves it unchanged. These are different behaviors — be intentional about which you use.
Response
Returns the full updated contact object. See Create Contact for the complete response schema.
{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"email": "john.updated@example.com",
"phone_number": "+201234567890",
"external_id": "user_10294",
"first_name": "John",
"last_name": "Doe",
"source": "api",
"properties": {
"company": "New Company"
},
"is_suppressed": false,
"created_at": "2026-01-15T10:00:00.000Z",
"updated_at": "2026-03-08T14:30:00.000Z"
}
Examples
Update Email and Name
- cURL
- JavaScript
- Python
- C#
- PHP
curl -X PATCH "https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer $ARSEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "john.updated@example.com",
"first_name": "Jonathan"
}'
const response = await fetch("https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.ARSEL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
email: "john.updated@example.com",
first_name: "Jonathan",
}),
});
const data = await response.json();
if (!response.ok) {
throw new Error(`${data.name}: ${data.message}`);
}
console.log(data);
import os
import requests
response = requests.patch(
"https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
headers={"Authorization": f"Bearer {os.environ['ARSEL_API_KEY']}"},
json={
"email": "john.updated@example.com",
"first_name": "Jonathan",
},
)
response.raise_for_status()
print(response.json())
using System.Net.Http.Headers;
using System.Text;
var client = new HttpClient(); // share one instance across requests
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("ARSEL_API_KEY"));
var request = new HttpRequestMessage(HttpMethod.Patch, "https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a")
{
Content = new StringContent(
"""
{
"email": "john.updated@example.com",
"first_name": "Jonathan"
}
""",
Encoding.UTF8,
"application/json"),
};
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
throw new HttpRequestException($"{(int)response.StatusCode}: {body}");
Console.WriteLine(body);
<?php
$ch = curl_init("https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ARSEL_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"email" => "john.updated@example.com",
"first_name" => "Jonathan",
]),
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) {
throw new Exception("{$data['name']}: {$data['message']}");
}
print_r($data);
Update Custom Properties
- cURL
- JavaScript
- Python
- C#
- PHP
curl -X PATCH "https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer $ARSEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"properties": {
"company": "New Company",
"city": "Jeddah"
}
}'
const response = await fetch("https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.ARSEL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
properties: {
company: "New Company",
city: "Jeddah",
},
}),
});
const data = await response.json();
if (!response.ok) {
throw new Error(`${data.name}: ${data.message}`);
}
console.log(data);
import os
import requests
response = requests.patch(
"https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
headers={"Authorization": f"Bearer {os.environ['ARSEL_API_KEY']}"},
json={
"properties": {
"company": "New Company",
"city": "Jeddah",
},
},
)
response.raise_for_status()
print(response.json())
using System.Net.Http.Headers;
using System.Text;
var client = new HttpClient(); // share one instance across requests
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("ARSEL_API_KEY"));
var request = new HttpRequestMessage(HttpMethod.Patch, "https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a")
{
Content = new StringContent(
"""
{
"properties": {
"company": "New Company",
"city": "Jeddah"
}
}
""",
Encoding.UTF8,
"application/json"),
};
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
throw new HttpRequestException($"{(int)response.StatusCode}: {body}");
Console.WriteLine(body);
<?php
$ch = curl_init("https://api.arsel.sa/v1/contacts/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ARSEL_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"properties" => [
"company" => "New Company",
"city" => "Jeddah",
],
]),
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) {
throw new Exception("{$data['name']}: {$data['message']}");
}
print_r($data);
Error Responses
- 422 Validation Error
- 409 Conflict
- 404 Not Found
- 401 Unauthorized
{
"status_code": 422,
"name": "validation_error",
"message": "email must be an email"
}
{
"status_code": 409,
"name": "conflict",
"message": "A contact with this email already exists in your organization"
}
{
"status_code": 404,
"name": "not_found",
"message": "Contact not found"
}
{
"status_code": 401,
"name": "unauthorized",
"message": "Invalid API Key"
}