Skip to main content
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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

uuid
string
required

The uuid of the contact to update

Body

application/json

Contact object that needs to be updated

The default contact schema

name
string

Full name of the contact

Example:

"Sam Smith"

type
enum<string>

Type of the contact

Available options:
person,
organization
Example:

"person"

linked_organization_id
integer

The organization id that this contact has been added to. Applies only for 'person' type contacts.

Example:

137834

client
boolean

If true, the contact will be selectable in client menus

Example:

true

email_1
string

Primary email address of the contact

email_2
string

Secondary email address of the contact

email_3
string

Tertiary email address of the contact

Example:

""

phone_1
string

Primary phone number of the contact

Example:

"+1-541-754-3010"

phone_2
string

Secondary phone number of the contact

Example:

""

phone_3
string

Tertiary phone number of the contact

Example:

""

address_line_1
string

Contacts address first line

Example:

"Unit 1/43"

address_line_2
string

Contacts address second line

Example:

"123 Example Street"

address_line_3
string

Contacts address third line

Example:

""

address_city
string

Contacts city

Example:

"Surry Hills"

address_state
string

Contacts state

Example:

"NSW"

address_postcode
string

Contacts state

Example:

"2010"

address_country
string

Contacts country

Example:

"Australia"

website
string

Website of the contact

Example:

"www.example.com"

icon
object

Icon / avatar of the contact

custom_fields
Custom Field Module Value · object[]

Response

Successful Operation

success
object