Create or update a contact
curl --request POST \
--url https://{notifuseDomain}/api/contacts.upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "ws_1234567890",
"contact": {
"email": "user@example.com",
"external_id": "user_12345",
"timezone": "America/New_York",
"language": "en-US",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"phone": "+15551234567",
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"country": "US",
"postcode": "10001",
"state": "NY",
"job_title": "Software Engineer",
"custom_string_1": "Premium tier",
"custom_string_2": "<string>",
"custom_string_3": "<string>",
"custom_string_4": "<string>",
"custom_string_5": "<string>",
"custom_number_1": 42,
"custom_number_2": 123,
"custom_number_3": 123,
"custom_number_4": 123,
"custom_number_5": 123,
"custom_datetime_1": "2023-06-01T09:00:00Z",
"custom_datetime_2": "2023-11-07T05:31:56Z",
"custom_datetime_3": "2023-11-07T05:31:56Z",
"custom_datetime_4": "2023-11-07T05:31:56Z",
"custom_datetime_5": "2023-11-07T05:31:56Z",
"custom_json_1": {
"preferences": {
"theme": "dark",
"notifications": true
}
},
"custom_json_2": {},
"custom_json_3": {},
"custom_json_4": {},
"custom_json_5": {}
}
}
'import requests
url = "https://{notifuseDomain}/api/contacts.upsert"
payload = {
"workspace_id": "ws_1234567890",
"contact": {
"email": "user@example.com",
"external_id": "user_12345",
"timezone": "America/New_York",
"language": "en-US",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"phone": "+15551234567",
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"country": "US",
"postcode": "10001",
"state": "NY",
"job_title": "Software Engineer",
"custom_string_1": "Premium tier",
"custom_string_2": "<string>",
"custom_string_3": "<string>",
"custom_string_4": "<string>",
"custom_string_5": "<string>",
"custom_number_1": 42,
"custom_number_2": 123,
"custom_number_3": 123,
"custom_number_4": 123,
"custom_number_5": 123,
"custom_datetime_1": "2023-06-01T09:00:00Z",
"custom_datetime_2": "2023-11-07T05:31:56Z",
"custom_datetime_3": "2023-11-07T05:31:56Z",
"custom_datetime_4": "2023-11-07T05:31:56Z",
"custom_datetime_5": "2023-11-07T05:31:56Z",
"custom_json_1": { "preferences": {
"theme": "dark",
"notifications": True
} },
"custom_json_2": {},
"custom_json_3": {},
"custom_json_4": {},
"custom_json_5": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: 'ws_1234567890',
contact: {
email: 'user@example.com',
external_id: 'user_12345',
timezone: 'America/New_York',
language: 'en-US',
first_name: 'John',
last_name: 'Doe',
full_name: 'John Doe',
phone: '+15551234567',
address_line_1: '123 Main St',
address_line_2: 'Apt 4B',
country: 'US',
postcode: '10001',
state: 'NY',
job_title: 'Software Engineer',
custom_string_1: 'Premium tier',
custom_string_2: '<string>',
custom_string_3: '<string>',
custom_string_4: '<string>',
custom_string_5: '<string>',
custom_number_1: 42,
custom_number_2: 123,
custom_number_3: 123,
custom_number_4: 123,
custom_number_5: 123,
custom_datetime_1: '2023-06-01T09:00:00Z',
custom_datetime_2: '2023-11-07T05:31:56Z',
custom_datetime_3: '2023-11-07T05:31:56Z',
custom_datetime_4: '2023-11-07T05:31:56Z',
custom_datetime_5: '2023-11-07T05:31:56Z',
custom_json_1: {preferences: {theme: 'dark', notifications: true}},
custom_json_2: {},
custom_json_3: {},
custom_json_4: {},
custom_json_5: {}
}
})
};
fetch('https://{notifuseDomain}/api/contacts.upsert', 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://{notifuseDomain}/api/contacts.upsert",
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([
'workspace_id' => 'ws_1234567890',
'contact' => [
'email' => 'user@example.com',
'external_id' => 'user_12345',
'timezone' => 'America/New_York',
'language' => 'en-US',
'first_name' => 'John',
'last_name' => 'Doe',
'full_name' => 'John Doe',
'phone' => '+15551234567',
'address_line_1' => '123 Main St',
'address_line_2' => 'Apt 4B',
'country' => 'US',
'postcode' => '10001',
'state' => 'NY',
'job_title' => 'Software Engineer',
'custom_string_1' => 'Premium tier',
'custom_string_2' => '<string>',
'custom_string_3' => '<string>',
'custom_string_4' => '<string>',
'custom_string_5' => '<string>',
'custom_number_1' => 42,
'custom_number_2' => 123,
'custom_number_3' => 123,
'custom_number_4' => 123,
'custom_number_5' => 123,
'custom_datetime_1' => '2023-06-01T09:00:00Z',
'custom_datetime_2' => '2023-11-07T05:31:56Z',
'custom_datetime_3' => '2023-11-07T05:31:56Z',
'custom_datetime_4' => '2023-11-07T05:31:56Z',
'custom_datetime_5' => '2023-11-07T05:31:56Z',
'custom_json_1' => [
'preferences' => [
'theme' => 'dark',
'notifications' => true
]
],
'custom_json_2' => [
],
'custom_json_3' => [
],
'custom_json_4' => [
],
'custom_json_5' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"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://{notifuseDomain}/api/contacts.upsert"
payload := strings.NewReader("{\n \"workspace_id\": \"ws_1234567890\",\n \"contact\": {\n \"email\": \"user@example.com\",\n \"external_id\": \"user_12345\",\n \"timezone\": \"America/New_York\",\n \"language\": \"en-US\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\",\n \"phone\": \"+15551234567\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 4B\",\n \"country\": \"US\",\n \"postcode\": \"10001\",\n \"state\": \"NY\",\n \"job_title\": \"Software Engineer\",\n \"custom_string_1\": \"Premium tier\",\n \"custom_string_2\": \"<string>\",\n \"custom_string_3\": \"<string>\",\n \"custom_string_4\": \"<string>\",\n \"custom_string_5\": \"<string>\",\n \"custom_number_1\": 42,\n \"custom_number_2\": 123,\n \"custom_number_3\": 123,\n \"custom_number_4\": 123,\n \"custom_number_5\": 123,\n \"custom_datetime_1\": \"2023-06-01T09:00:00Z\",\n \"custom_datetime_2\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_3\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_4\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_5\": \"2023-11-07T05:31:56Z\",\n \"custom_json_1\": {\n \"preferences\": {\n \"theme\": \"dark\",\n \"notifications\": true\n }\n },\n \"custom_json_2\": {},\n \"custom_json_3\": {},\n \"custom_json_4\": {},\n \"custom_json_5\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://{notifuseDomain}/api/contacts.upsert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"ws_1234567890\",\n \"contact\": {\n \"email\": \"user@example.com\",\n \"external_id\": \"user_12345\",\n \"timezone\": \"America/New_York\",\n \"language\": \"en-US\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\",\n \"phone\": \"+15551234567\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 4B\",\n \"country\": \"US\",\n \"postcode\": \"10001\",\n \"state\": \"NY\",\n \"job_title\": \"Software Engineer\",\n \"custom_string_1\": \"Premium tier\",\n \"custom_string_2\": \"<string>\",\n \"custom_string_3\": \"<string>\",\n \"custom_string_4\": \"<string>\",\n \"custom_string_5\": \"<string>\",\n \"custom_number_1\": 42,\n \"custom_number_2\": 123,\n \"custom_number_3\": 123,\n \"custom_number_4\": 123,\n \"custom_number_5\": 123,\n \"custom_datetime_1\": \"2023-06-01T09:00:00Z\",\n \"custom_datetime_2\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_3\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_4\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_5\": \"2023-11-07T05:31:56Z\",\n \"custom_json_1\": {\n \"preferences\": {\n \"theme\": \"dark\",\n \"notifications\": true\n }\n },\n \"custom_json_2\": {},\n \"custom_json_3\": {},\n \"custom_json_4\": {},\n \"custom_json_5\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/contacts.upsert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": \"ws_1234567890\",\n \"contact\": {\n \"email\": \"user@example.com\",\n \"external_id\": \"user_12345\",\n \"timezone\": \"America/New_York\",\n \"language\": \"en-US\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\",\n \"phone\": \"+15551234567\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 4B\",\n \"country\": \"US\",\n \"postcode\": \"10001\",\n \"state\": \"NY\",\n \"job_title\": \"Software Engineer\",\n \"custom_string_1\": \"Premium tier\",\n \"custom_string_2\": \"<string>\",\n \"custom_string_3\": \"<string>\",\n \"custom_string_4\": \"<string>\",\n \"custom_string_5\": \"<string>\",\n \"custom_number_1\": 42,\n \"custom_number_2\": 123,\n \"custom_number_3\": 123,\n \"custom_number_4\": 123,\n \"custom_number_5\": 123,\n \"custom_datetime_1\": \"2023-06-01T09:00:00Z\",\n \"custom_datetime_2\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_3\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_4\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_5\": \"2023-11-07T05:31:56Z\",\n \"custom_json_1\": {\n \"preferences\": {\n \"theme\": \"dark\",\n \"notifications\": true\n }\n },\n \"custom_json_2\": {},\n \"custom_json_3\": {},\n \"custom_json_4\": {},\n \"custom_json_5\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"email": "user@example.com",
"action": "create",
"error": null
}Contacts
Create or update a contact
Creates a new contact or updates an existing one based on email address. Returns information about whether the contact was created or updated.
POST
/
api
/
contacts.upsert
Create or update a contact
curl --request POST \
--url https://{notifuseDomain}/api/contacts.upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "ws_1234567890",
"contact": {
"email": "user@example.com",
"external_id": "user_12345",
"timezone": "America/New_York",
"language": "en-US",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"phone": "+15551234567",
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"country": "US",
"postcode": "10001",
"state": "NY",
"job_title": "Software Engineer",
"custom_string_1": "Premium tier",
"custom_string_2": "<string>",
"custom_string_3": "<string>",
"custom_string_4": "<string>",
"custom_string_5": "<string>",
"custom_number_1": 42,
"custom_number_2": 123,
"custom_number_3": 123,
"custom_number_4": 123,
"custom_number_5": 123,
"custom_datetime_1": "2023-06-01T09:00:00Z",
"custom_datetime_2": "2023-11-07T05:31:56Z",
"custom_datetime_3": "2023-11-07T05:31:56Z",
"custom_datetime_4": "2023-11-07T05:31:56Z",
"custom_datetime_5": "2023-11-07T05:31:56Z",
"custom_json_1": {
"preferences": {
"theme": "dark",
"notifications": true
}
},
"custom_json_2": {},
"custom_json_3": {},
"custom_json_4": {},
"custom_json_5": {}
}
}
'import requests
url = "https://{notifuseDomain}/api/contacts.upsert"
payload = {
"workspace_id": "ws_1234567890",
"contact": {
"email": "user@example.com",
"external_id": "user_12345",
"timezone": "America/New_York",
"language": "en-US",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"phone": "+15551234567",
"address_line_1": "123 Main St",
"address_line_2": "Apt 4B",
"country": "US",
"postcode": "10001",
"state": "NY",
"job_title": "Software Engineer",
"custom_string_1": "Premium tier",
"custom_string_2": "<string>",
"custom_string_3": "<string>",
"custom_string_4": "<string>",
"custom_string_5": "<string>",
"custom_number_1": 42,
"custom_number_2": 123,
"custom_number_3": 123,
"custom_number_4": 123,
"custom_number_5": 123,
"custom_datetime_1": "2023-06-01T09:00:00Z",
"custom_datetime_2": "2023-11-07T05:31:56Z",
"custom_datetime_3": "2023-11-07T05:31:56Z",
"custom_datetime_4": "2023-11-07T05:31:56Z",
"custom_datetime_5": "2023-11-07T05:31:56Z",
"custom_json_1": { "preferences": {
"theme": "dark",
"notifications": True
} },
"custom_json_2": {},
"custom_json_3": {},
"custom_json_4": {},
"custom_json_5": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspace_id: 'ws_1234567890',
contact: {
email: 'user@example.com',
external_id: 'user_12345',
timezone: 'America/New_York',
language: 'en-US',
first_name: 'John',
last_name: 'Doe',
full_name: 'John Doe',
phone: '+15551234567',
address_line_1: '123 Main St',
address_line_2: 'Apt 4B',
country: 'US',
postcode: '10001',
state: 'NY',
job_title: 'Software Engineer',
custom_string_1: 'Premium tier',
custom_string_2: '<string>',
custom_string_3: '<string>',
custom_string_4: '<string>',
custom_string_5: '<string>',
custom_number_1: 42,
custom_number_2: 123,
custom_number_3: 123,
custom_number_4: 123,
custom_number_5: 123,
custom_datetime_1: '2023-06-01T09:00:00Z',
custom_datetime_2: '2023-11-07T05:31:56Z',
custom_datetime_3: '2023-11-07T05:31:56Z',
custom_datetime_4: '2023-11-07T05:31:56Z',
custom_datetime_5: '2023-11-07T05:31:56Z',
custom_json_1: {preferences: {theme: 'dark', notifications: true}},
custom_json_2: {},
custom_json_3: {},
custom_json_4: {},
custom_json_5: {}
}
})
};
fetch('https://{notifuseDomain}/api/contacts.upsert', 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://{notifuseDomain}/api/contacts.upsert",
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([
'workspace_id' => 'ws_1234567890',
'contact' => [
'email' => 'user@example.com',
'external_id' => 'user_12345',
'timezone' => 'America/New_York',
'language' => 'en-US',
'first_name' => 'John',
'last_name' => 'Doe',
'full_name' => 'John Doe',
'phone' => '+15551234567',
'address_line_1' => '123 Main St',
'address_line_2' => 'Apt 4B',
'country' => 'US',
'postcode' => '10001',
'state' => 'NY',
'job_title' => 'Software Engineer',
'custom_string_1' => 'Premium tier',
'custom_string_2' => '<string>',
'custom_string_3' => '<string>',
'custom_string_4' => '<string>',
'custom_string_5' => '<string>',
'custom_number_1' => 42,
'custom_number_2' => 123,
'custom_number_3' => 123,
'custom_number_4' => 123,
'custom_number_5' => 123,
'custom_datetime_1' => '2023-06-01T09:00:00Z',
'custom_datetime_2' => '2023-11-07T05:31:56Z',
'custom_datetime_3' => '2023-11-07T05:31:56Z',
'custom_datetime_4' => '2023-11-07T05:31:56Z',
'custom_datetime_5' => '2023-11-07T05:31:56Z',
'custom_json_1' => [
'preferences' => [
'theme' => 'dark',
'notifications' => true
]
],
'custom_json_2' => [
],
'custom_json_3' => [
],
'custom_json_4' => [
],
'custom_json_5' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"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://{notifuseDomain}/api/contacts.upsert"
payload := strings.NewReader("{\n \"workspace_id\": \"ws_1234567890\",\n \"contact\": {\n \"email\": \"user@example.com\",\n \"external_id\": \"user_12345\",\n \"timezone\": \"America/New_York\",\n \"language\": \"en-US\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\",\n \"phone\": \"+15551234567\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 4B\",\n \"country\": \"US\",\n \"postcode\": \"10001\",\n \"state\": \"NY\",\n \"job_title\": \"Software Engineer\",\n \"custom_string_1\": \"Premium tier\",\n \"custom_string_2\": \"<string>\",\n \"custom_string_3\": \"<string>\",\n \"custom_string_4\": \"<string>\",\n \"custom_string_5\": \"<string>\",\n \"custom_number_1\": 42,\n \"custom_number_2\": 123,\n \"custom_number_3\": 123,\n \"custom_number_4\": 123,\n \"custom_number_5\": 123,\n \"custom_datetime_1\": \"2023-06-01T09:00:00Z\",\n \"custom_datetime_2\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_3\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_4\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_5\": \"2023-11-07T05:31:56Z\",\n \"custom_json_1\": {\n \"preferences\": {\n \"theme\": \"dark\",\n \"notifications\": true\n }\n },\n \"custom_json_2\": {},\n \"custom_json_3\": {},\n \"custom_json_4\": {},\n \"custom_json_5\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://{notifuseDomain}/api/contacts.upsert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace_id\": \"ws_1234567890\",\n \"contact\": {\n \"email\": \"user@example.com\",\n \"external_id\": \"user_12345\",\n \"timezone\": \"America/New_York\",\n \"language\": \"en-US\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\",\n \"phone\": \"+15551234567\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 4B\",\n \"country\": \"US\",\n \"postcode\": \"10001\",\n \"state\": \"NY\",\n \"job_title\": \"Software Engineer\",\n \"custom_string_1\": \"Premium tier\",\n \"custom_string_2\": \"<string>\",\n \"custom_string_3\": \"<string>\",\n \"custom_string_4\": \"<string>\",\n \"custom_string_5\": \"<string>\",\n \"custom_number_1\": 42,\n \"custom_number_2\": 123,\n \"custom_number_3\": 123,\n \"custom_number_4\": 123,\n \"custom_number_5\": 123,\n \"custom_datetime_1\": \"2023-06-01T09:00:00Z\",\n \"custom_datetime_2\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_3\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_4\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_5\": \"2023-11-07T05:31:56Z\",\n \"custom_json_1\": {\n \"preferences\": {\n \"theme\": \"dark\",\n \"notifications\": true\n }\n },\n \"custom_json_2\": {},\n \"custom_json_3\": {},\n \"custom_json_4\": {},\n \"custom_json_5\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/contacts.upsert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace_id\": \"ws_1234567890\",\n \"contact\": {\n \"email\": \"user@example.com\",\n \"external_id\": \"user_12345\",\n \"timezone\": \"America/New_York\",\n \"language\": \"en-US\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"full_name\": \"John Doe\",\n \"phone\": \"+15551234567\",\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"Apt 4B\",\n \"country\": \"US\",\n \"postcode\": \"10001\",\n \"state\": \"NY\",\n \"job_title\": \"Software Engineer\",\n \"custom_string_1\": \"Premium tier\",\n \"custom_string_2\": \"<string>\",\n \"custom_string_3\": \"<string>\",\n \"custom_string_4\": \"<string>\",\n \"custom_string_5\": \"<string>\",\n \"custom_number_1\": 42,\n \"custom_number_2\": 123,\n \"custom_number_3\": 123,\n \"custom_number_4\": 123,\n \"custom_number_5\": 123,\n \"custom_datetime_1\": \"2023-06-01T09:00:00Z\",\n \"custom_datetime_2\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_3\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_4\": \"2023-11-07T05:31:56Z\",\n \"custom_datetime_5\": \"2023-11-07T05:31:56Z\",\n \"custom_json_1\": {\n \"preferences\": {\n \"theme\": \"dark\",\n \"notifications\": true\n }\n },\n \"custom_json_2\": {},\n \"custom_json_3\": {},\n \"custom_json_4\": {},\n \"custom_json_5\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"email": "user@example.com",
"action": "create",
"error": null
}Authorizations
API token for authentication
Body
application/json
Response
Contact upserted successfully
Email address of the contact
Example:
"user@example.com"
The action that was performed: 'create' for new contacts, 'update' for existing contacts, 'error' if validation failed
Available options:
create, update, error Example:
"create"
Error message if the operation failed
Example:
null
⌘I
