Update Contact
curl --request PUT \
--url https://api.sonderplan.com/v2/contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sam Smith",
"type": "person",
"linked_organization_id": 137834,
"client": true,
"email_1": "[email protected]",
"email_2": "[email protected]",
"email_3": "",
"phone_1": "+1-541-754-3010",
"phone_2": "",
"phone_3": "",
"address_line_1": "Unit 1/43",
"address_line_2": "123 Example Street",
"address_line_3": "",
"address_city": "Surry Hills",
"address_state": "NSW",
"address_postcode": "2010",
"address_country": "Australia",
"website": "www.example.com",
"icon": {},
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
]
}
'import requests
url = "https://api.sonderplan.com/v2/contact"
payload = {
"name": "Sam Smith",
"type": "person",
"linked_organization_id": 137834,
"client": True,
"email_1": "[email protected]",
"email_2": "[email protected]",
"email_3": "",
"phone_1": "+1-541-754-3010",
"phone_2": "",
"phone_3": "",
"address_line_1": "Unit 1/43",
"address_line_2": "123 Example Street",
"address_line_3": "",
"address_city": "Surry Hills",
"address_state": "NSW",
"address_postcode": "2010",
"address_country": "Australia",
"website": "www.example.com",
"icon": {},
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sam Smith',
type: 'person',
linked_organization_id: 137834,
client: true,
email_1: '[email protected]',
email_2: '[email protected]',
email_3: '',
phone_1: '+1-541-754-3010',
phone_2: '',
phone_3: '',
address_line_1: 'Unit 1/43',
address_line_2: '123 Example Street',
address_line_3: '',
address_city: 'Surry Hills',
address_state: 'NSW',
address_postcode: '2010',
address_country: 'Australia',
website: 'www.example.com',
icon: {},
custom_fields: [
{
id: 7823,
name: 'Type',
value: 'Video Editing',
value_id: 8973,
update_key: '2_1_7823'
}
]
})
};
fetch('https://api.sonderplan.com/v2/contact', 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://api.sonderplan.com/v2/contact",
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([
'name' => 'Sam Smith',
'type' => 'person',
'linked_organization_id' => 137834,
'client' => true,
'email_1' => '[email protected]',
'email_2' => '[email protected]',
'email_3' => '',
'phone_1' => '+1-541-754-3010',
'phone_2' => '',
'phone_3' => '',
'address_line_1' => 'Unit 1/43',
'address_line_2' => '123 Example Street',
'address_line_3' => '',
'address_city' => 'Surry Hills',
'address_state' => 'NSW',
'address_postcode' => '2010',
'address_country' => 'Australia',
'website' => 'www.example.com',
'icon' => [
],
'custom_fields' => [
[
'id' => 7823,
'name' => 'Type',
'value' => 'Video Editing',
'value_id' => 8973,
'update_key' => '2_1_7823'
]
]
]),
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://api.sonderplan.com/v2/contact"
payload := strings.NewReader("{\n \"name\": \"Sam Smith\",\n \"type\": \"person\",\n \"linked_organization_id\": 137834,\n \"client\": true,\n \"email_1\": \"[email protected]\",\n \"email_2\": \"[email protected]\",\n \"email_3\": \"\",\n \"phone_1\": \"+1-541-754-3010\",\n \"phone_2\": \"\",\n \"phone_3\": \"\",\n \"address_line_1\": \"Unit 1/43\",\n \"address_line_2\": \"123 Example Street\",\n \"address_line_3\": \"\",\n \"address_city\": \"Surry Hills\",\n \"address_state\": \"NSW\",\n \"address_postcode\": \"2010\",\n \"address_country\": \"Australia\",\n \"website\": \"www.example.com\",\n \"icon\": {},\n \"custom_fields\": [\n {\n \"id\": 7823,\n \"name\": \"Type\",\n \"value\": \"Video Editing\",\n \"value_id\": 8973,\n \"update_key\": \"2_1_7823\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sonderplan.com/v2/contact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sam Smith\",\n \"type\": \"person\",\n \"linked_organization_id\": 137834,\n \"client\": true,\n \"email_1\": \"[email protected]\",\n \"email_2\": \"[email protected]\",\n \"email_3\": \"\",\n \"phone_1\": \"+1-541-754-3010\",\n \"phone_2\": \"\",\n \"phone_3\": \"\",\n \"address_line_1\": \"Unit 1/43\",\n \"address_line_2\": \"123 Example Street\",\n \"address_line_3\": \"\",\n \"address_city\": \"Surry Hills\",\n \"address_state\": \"NSW\",\n \"address_postcode\": \"2010\",\n \"address_country\": \"Australia\",\n \"website\": \"www.example.com\",\n \"icon\": {},\n \"custom_fields\": [\n {\n \"id\": 7823,\n \"name\": \"Type\",\n \"value\": \"Video Editing\",\n \"value_id\": 8973,\n \"update_key\": \"2_1_7823\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sam Smith\",\n \"type\": \"person\",\n \"linked_organization_id\": 137834,\n \"client\": true,\n \"email_1\": \"[email protected]\",\n \"email_2\": \"[email protected]\",\n \"email_3\": \"\",\n \"phone_1\": \"+1-541-754-3010\",\n \"phone_2\": \"\",\n \"phone_3\": \"\",\n \"address_line_1\": \"Unit 1/43\",\n \"address_line_2\": \"123 Example Street\",\n \"address_line_3\": \"\",\n \"address_city\": \"Surry Hills\",\n \"address_state\": \"NSW\",\n \"address_postcode\": \"2010\",\n \"address_country\": \"Australia\",\n \"website\": \"www.example.com\",\n \"icon\": {},\n \"custom_fields\": [\n {\n \"id\": 7823,\n \"name\": \"Type\",\n \"value\": \"Video Editing\",\n \"value_id\": 8973,\n \"update_key\": \"2_1_7823\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": {
"id": 1
}
}{
"error": {
"code": "404",
"message": "Requested resource was not found"
}
}Contact
Update Contact
WRITE access to the CONTACT module is required to access this endpointThe
contactEdited webhook will be fired when this endpoint has run successfullyUnlike virtually every other model, contact
Contacts may be either people or organizations and these are stored in separate tables in the database, each with its own auto-incrementing identifier.
The contacts model creates a union between these two tables to allow simplified operations under a single namespace.
id cannot be assumed to be unique. Use uuid instead.Contacts may be either people or organizations and these are stored in separate tables in the database, each with its own auto-incrementing identifier.
The contacts model creates a union between these two tables to allow simplified operations under a single namespace.
PUT
/
v2
/
contact
Update Contact
curl --request PUT \
--url https://api.sonderplan.com/v2/contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Sam Smith",
"type": "person",
"linked_organization_id": 137834,
"client": true,
"email_1": "[email protected]",
"email_2": "[email protected]",
"email_3": "",
"phone_1": "+1-541-754-3010",
"phone_2": "",
"phone_3": "",
"address_line_1": "Unit 1/43",
"address_line_2": "123 Example Street",
"address_line_3": "",
"address_city": "Surry Hills",
"address_state": "NSW",
"address_postcode": "2010",
"address_country": "Australia",
"website": "www.example.com",
"icon": {},
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
]
}
'import requests
url = "https://api.sonderplan.com/v2/contact"
payload = {
"name": "Sam Smith",
"type": "person",
"linked_organization_id": 137834,
"client": True,
"email_1": "[email protected]",
"email_2": "[email protected]",
"email_3": "",
"phone_1": "+1-541-754-3010",
"phone_2": "",
"phone_3": "",
"address_line_1": "Unit 1/43",
"address_line_2": "123 Example Street",
"address_line_3": "",
"address_city": "Surry Hills",
"address_state": "NSW",
"address_postcode": "2010",
"address_country": "Australia",
"website": "www.example.com",
"icon": {},
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Sam Smith',
type: 'person',
linked_organization_id: 137834,
client: true,
email_1: '[email protected]',
email_2: '[email protected]',
email_3: '',
phone_1: '+1-541-754-3010',
phone_2: '',
phone_3: '',
address_line_1: 'Unit 1/43',
address_line_2: '123 Example Street',
address_line_3: '',
address_city: 'Surry Hills',
address_state: 'NSW',
address_postcode: '2010',
address_country: 'Australia',
website: 'www.example.com',
icon: {},
custom_fields: [
{
id: 7823,
name: 'Type',
value: 'Video Editing',
value_id: 8973,
update_key: '2_1_7823'
}
]
})
};
fetch('https://api.sonderplan.com/v2/contact', 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://api.sonderplan.com/v2/contact",
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([
'name' => 'Sam Smith',
'type' => 'person',
'linked_organization_id' => 137834,
'client' => true,
'email_1' => '[email protected]',
'email_2' => '[email protected]',
'email_3' => '',
'phone_1' => '+1-541-754-3010',
'phone_2' => '',
'phone_3' => '',
'address_line_1' => 'Unit 1/43',
'address_line_2' => '123 Example Street',
'address_line_3' => '',
'address_city' => 'Surry Hills',
'address_state' => 'NSW',
'address_postcode' => '2010',
'address_country' => 'Australia',
'website' => 'www.example.com',
'icon' => [
],
'custom_fields' => [
[
'id' => 7823,
'name' => 'Type',
'value' => 'Video Editing',
'value_id' => 8973,
'update_key' => '2_1_7823'
]
]
]),
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://api.sonderplan.com/v2/contact"
payload := strings.NewReader("{\n \"name\": \"Sam Smith\",\n \"type\": \"person\",\n \"linked_organization_id\": 137834,\n \"client\": true,\n \"email_1\": \"[email protected]\",\n \"email_2\": \"[email protected]\",\n \"email_3\": \"\",\n \"phone_1\": \"+1-541-754-3010\",\n \"phone_2\": \"\",\n \"phone_3\": \"\",\n \"address_line_1\": \"Unit 1/43\",\n \"address_line_2\": \"123 Example Street\",\n \"address_line_3\": \"\",\n \"address_city\": \"Surry Hills\",\n \"address_state\": \"NSW\",\n \"address_postcode\": \"2010\",\n \"address_country\": \"Australia\",\n \"website\": \"www.example.com\",\n \"icon\": {},\n \"custom_fields\": [\n {\n \"id\": 7823,\n \"name\": \"Type\",\n \"value\": \"Video Editing\",\n \"value_id\": 8973,\n \"update_key\": \"2_1_7823\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.sonderplan.com/v2/contact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Sam Smith\",\n \"type\": \"person\",\n \"linked_organization_id\": 137834,\n \"client\": true,\n \"email_1\": \"[email protected]\",\n \"email_2\": \"[email protected]\",\n \"email_3\": \"\",\n \"phone_1\": \"+1-541-754-3010\",\n \"phone_2\": \"\",\n \"phone_3\": \"\",\n \"address_line_1\": \"Unit 1/43\",\n \"address_line_2\": \"123 Example Street\",\n \"address_line_3\": \"\",\n \"address_city\": \"Surry Hills\",\n \"address_state\": \"NSW\",\n \"address_postcode\": \"2010\",\n \"address_country\": \"Australia\",\n \"website\": \"www.example.com\",\n \"icon\": {},\n \"custom_fields\": [\n {\n \"id\": 7823,\n \"name\": \"Type\",\n \"value\": \"Video Editing\",\n \"value_id\": 8973,\n \"update_key\": \"2_1_7823\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Sam Smith\",\n \"type\": \"person\",\n \"linked_organization_id\": 137834,\n \"client\": true,\n \"email_1\": \"[email protected]\",\n \"email_2\": \"[email protected]\",\n \"email_3\": \"\",\n \"phone_1\": \"+1-541-754-3010\",\n \"phone_2\": \"\",\n \"phone_3\": \"\",\n \"address_line_1\": \"Unit 1/43\",\n \"address_line_2\": \"123 Example Street\",\n \"address_line_3\": \"\",\n \"address_city\": \"Surry Hills\",\n \"address_state\": \"NSW\",\n \"address_postcode\": \"2010\",\n \"address_country\": \"Australia\",\n \"website\": \"www.example.com\",\n \"icon\": {},\n \"custom_fields\": [\n {\n \"id\": 7823,\n \"name\": \"Type\",\n \"value\": \"Video Editing\",\n \"value_id\": 8973,\n \"update_key\": \"2_1_7823\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": {
"id": 1
}
}{
"error": {
"code": "404",
"message": "Requested resource was not found"
}
}Authorizations
Body
application/json
Contact object that needs to be updated
The default contact schema
Primary email address of the contact
Example:
Secondary email address of the contact
Example: