Skip to main content
PATCH
/
v1
/
contacts
/
{id}
Update a contact
curl --request PATCH \
  --url https://api.slant.app/v1/contacts/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "custom_fields": {
    "referral_source": "Conference"
  }
}
'
import requests

url = "https://api.slant.app/v1/contacts/{id}"

payload = { "custom_fields": { "referral_source": "Conference" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({custom_fields: {referral_source: 'Conference'}})
};

fetch('https://api.slant.app/v1/contacts/{id}', 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.slant.app/v1/contacts/{id}",
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([
'custom_fields' => [
'referral_source' => 'Conference'
]
]),
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.slant.app/v1/contacts/{id}"

payload := strings.NewReader("{\n \"custom_fields\": {\n \"referral_source\": \"Conference\"\n }\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.slant.app/v1/contacts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"custom_fields\": {\n \"referral_source\": \"Conference\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.slant.app/v1/contacts/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"custom_fields\": {\n \"referral_source\": \"Conference\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "abc123xyz",
  "book_id": "book123xyz",
  "person": {
    "id": "abc123xyz",
    "book_id": "book123xyz",
    "first_name": "John",
    "last_name": "Doe",
    "household_id": "xyz789abc",
    "contact_id": "cnt456def",
    "role_type": "client",
    "middle_name": "Robert",
    "salutation": "Mr.",
    "suffix": "Jr.",
    "maiden_name": "Smith",
    "gender": "male",
    "designations": "CPA, CFP",
    "household_role": "head_of_household",
    "preferred_name": "Johnny",
    "date_of_birth": "1985-06-15",
    "job_title": "Software Engineer",
    "ssn": "***-**-6789",
    "drivers_license_number": "******7890",
    "email_addresses": [
      {
        "email": "john.doe@example.com",
        "email_type": "personal",
        "is_primary": true
      }
    ],
    "phone_numbers": [
      {
        "phone_number": "+15555551234",
        "phone_type": "mobile",
        "is_primary": true,
        "extension": "1234"
      }
    ],
    "addresses": [
      {
        "address_type": "home",
        "is_primary": true,
        "line1": "123 Main St",
        "line2": "Apt 4B",
        "city": "New York",
        "state": "NY",
        "zip": "10001",
        "country_code": "US"
      }
    ],
    "employments": [
      {
        "business_name": "Acme Corp",
        "id": "emp123xyz",
        "person_id": "abc123xyz",
        "role": "Software Engineer",
        "start_date": "2023-01-15",
        "end_date": "2024-12-31",
        "actively_employed": true
      }
    ],
    "custom_fields": {
      "preferred_contact_method": "Email",
      "risk_tolerance": "Moderate"
    }
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "custom_fields": {
    "referral_source": "Conference"
  }
}
{
"error": "invalid_json",
"detail": "<string>"
}
{
"detail": "<string>"
}
{
"error": "record_not_found",
"detail": "<string>"
}

Authorizations

Authorization
string
header
required

OAuth 2.0 Bearer Token from Clerk authentication

Path Parameters

id
string
required

The contact ID

Body

application/json
custom_fields
object

Custom field values as key-value pairs. Keys must match custom field keys defined for the Contact entity type.

Example:
{ "referral_source": "Conference" }

Response

successful

id
string
required

The contact ID

Example:

"abc123xyz"

book_id
string
required

The book ID

Example:

"book123xyz"

person
object
required
created_at
string<date-time>
required

When the contact was created

updated_at
string<date-time>
required

When the contact was last updated

custom_fields
object

Custom field values as key-value pairs

Example:
{ "referral_source": "Conference" }