curl --request PUT \
--url https://www.postable.com/api/v1/contacts/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Johnny",
"email": "johnny.doe@example.com",
"birth_day": 16,
"children": [
{
"first_name": "Jimmy",
"birth_month": 3,
"birth_day": 12,
"birth_year": 2012
},
{
"first_name": "Sally",
"birth_month": 9,
"birth_day": 8,
"birth_year": 2015
},
{
"first_name": "Bobby",
"birth_month": 11,
"birth_day": 30,
"birth_year": 2018
}
],
"pets": [
{
"name": "Fido",
"birth_month": 4,
"birth_day": 10,
"birth_year": 2018,
"secondary_type": "Golden Retriever"
}
]
}
'import requests
url = "https://www.postable.com/api/v1/contacts/{uuid}"
payload = {
"first_name": "Johnny",
"email": "johnny.doe@example.com",
"birth_day": 16,
"children": [
{
"first_name": "Jimmy",
"birth_month": 3,
"birth_day": 12,
"birth_year": 2012
},
{
"first_name": "Sally",
"birth_month": 9,
"birth_day": 8,
"birth_year": 2015
},
{
"first_name": "Bobby",
"birth_month": 11,
"birth_day": 30,
"birth_year": 2018
}
],
"pets": [
{
"name": "Fido",
"birth_month": 4,
"birth_day": 10,
"birth_year": 2018,
"secondary_type": "Golden Retriever"
}
]
}
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({
first_name: 'Johnny',
email: 'johnny.doe@example.com',
birth_day: 16,
children: [
{first_name: 'Jimmy', birth_month: 3, birth_day: 12, birth_year: 2012},
{first_name: 'Sally', birth_month: 9, birth_day: 8, birth_year: 2015},
{first_name: 'Bobby', birth_month: 11, birth_day: 30, birth_year: 2018}
],
pets: [
{
name: 'Fido',
birth_month: 4,
birth_day: 10,
birth_year: 2018,
secondary_type: 'Golden Retriever'
}
]
})
};
fetch('https://www.postable.com/api/v1/contacts/{uuid}', 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://www.postable.com/api/v1/contacts/{uuid}",
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([
'first_name' => 'Johnny',
'email' => 'johnny.doe@example.com',
'birth_day' => 16,
'children' => [
[
'first_name' => 'Jimmy',
'birth_month' => 3,
'birth_day' => 12,
'birth_year' => 2012
],
[
'first_name' => 'Sally',
'birth_month' => 9,
'birth_day' => 8,
'birth_year' => 2015
],
[
'first_name' => 'Bobby',
'birth_month' => 11,
'birth_day' => 30,
'birth_year' => 2018
]
],
'pets' => [
[
'name' => 'Fido',
'birth_month' => 4,
'birth_day' => 10,
'birth_year' => 2018,
'secondary_type' => 'Golden Retriever'
]
]
]),
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://www.postable.com/api/v1/contacts/{uuid}"
payload := strings.NewReader("{\n \"first_name\": \"Johnny\",\n \"email\": \"johnny.doe@example.com\",\n \"birth_day\": 16,\n \"children\": [\n {\n \"first_name\": \"Jimmy\",\n \"birth_month\": 3,\n \"birth_day\": 12,\n \"birth_year\": 2012\n },\n {\n \"first_name\": \"Sally\",\n \"birth_month\": 9,\n \"birth_day\": 8,\n \"birth_year\": 2015\n },\n {\n \"first_name\": \"Bobby\",\n \"birth_month\": 11,\n \"birth_day\": 30,\n \"birth_year\": 2018\n }\n ],\n \"pets\": [\n {\n \"name\": \"Fido\",\n \"birth_month\": 4,\n \"birth_day\": 10,\n \"birth_year\": 2018,\n \"secondary_type\": \"Golden Retriever\"\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://www.postable.com/api/v1/contacts/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Johnny\",\n \"email\": \"johnny.doe@example.com\",\n \"birth_day\": 16,\n \"children\": [\n {\n \"first_name\": \"Jimmy\",\n \"birth_month\": 3,\n \"birth_day\": 12,\n \"birth_year\": 2012\n },\n {\n \"first_name\": \"Sally\",\n \"birth_month\": 9,\n \"birth_day\": 8,\n \"birth_year\": 2015\n },\n {\n \"first_name\": \"Bobby\",\n \"birth_month\": 11,\n \"birth_day\": 30,\n \"birth_year\": 2018\n }\n ],\n \"pets\": [\n {\n \"name\": \"Fido\",\n \"birth_month\": 4,\n \"birth_day\": 10,\n \"birth_year\": 2018,\n \"secondary_type\": \"Golden Retriever\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.postable.com/api/v1/contacts/{uuid}")
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 \"first_name\": \"Johnny\",\n \"email\": \"johnny.doe@example.com\",\n \"birth_day\": 16,\n \"children\": [\n {\n \"first_name\": \"Jimmy\",\n \"birth_month\": 3,\n \"birth_day\": 12,\n \"birth_year\": 2012\n },\n {\n \"first_name\": \"Sally\",\n \"birth_month\": 9,\n \"birth_day\": 8,\n \"birth_year\": 2015\n },\n {\n \"first_name\": \"Bobby\",\n \"birth_month\": 11,\n \"birth_day\": 30,\n \"birth_year\": 2018\n }\n ],\n \"pets\": [\n {\n \"name\": \"Fido\",\n \"birth_month\": 4,\n \"birth_day\": 10,\n \"birth_year\": 2018,\n \"secondary_type\": \"Golden Retriever\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"first_name": "<string>",
"last_name": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"internal_id": "<string>",
"prefix": "<string>",
"middle_name": "<string>",
"company": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address": "<string>",
"apt": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"spouse_prefix": "<string>",
"spouse_first_name": "<string>",
"spouse_middle_name": "<string>",
"spouse_last_name": "<string>",
"birth_month": 6,
"birth_day": 16,
"birth_year": 123,
"anniversary_month": 6,
"anniversary_day": 16,
"anniversary_year": 123,
"spouse_birth_month": 6,
"spouse_birth_day": 16,
"spouse_birth_year": 123,
"children": [
{
"first_name": "<string>",
"birth_month": 6,
"birth_day": 16,
"birth_year": 123
}
],
"pets": [
{
"name": "<string>",
"birth_month": 6,
"birth_day": 16,
"birth_year": 123,
"secondary_type": "<string>"
}
],
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Update Contact
Update an existing contact
curl --request PUT \
--url https://www.postable.com/api/v1/contacts/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Johnny",
"email": "johnny.doe@example.com",
"birth_day": 16,
"children": [
{
"first_name": "Jimmy",
"birth_month": 3,
"birth_day": 12,
"birth_year": 2012
},
{
"first_name": "Sally",
"birth_month": 9,
"birth_day": 8,
"birth_year": 2015
},
{
"first_name": "Bobby",
"birth_month": 11,
"birth_day": 30,
"birth_year": 2018
}
],
"pets": [
{
"name": "Fido",
"birth_month": 4,
"birth_day": 10,
"birth_year": 2018,
"secondary_type": "Golden Retriever"
}
]
}
'import requests
url = "https://www.postable.com/api/v1/contacts/{uuid}"
payload = {
"first_name": "Johnny",
"email": "johnny.doe@example.com",
"birth_day": 16,
"children": [
{
"first_name": "Jimmy",
"birth_month": 3,
"birth_day": 12,
"birth_year": 2012
},
{
"first_name": "Sally",
"birth_month": 9,
"birth_day": 8,
"birth_year": 2015
},
{
"first_name": "Bobby",
"birth_month": 11,
"birth_day": 30,
"birth_year": 2018
}
],
"pets": [
{
"name": "Fido",
"birth_month": 4,
"birth_day": 10,
"birth_year": 2018,
"secondary_type": "Golden Retriever"
}
]
}
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({
first_name: 'Johnny',
email: 'johnny.doe@example.com',
birth_day: 16,
children: [
{first_name: 'Jimmy', birth_month: 3, birth_day: 12, birth_year: 2012},
{first_name: 'Sally', birth_month: 9, birth_day: 8, birth_year: 2015},
{first_name: 'Bobby', birth_month: 11, birth_day: 30, birth_year: 2018}
],
pets: [
{
name: 'Fido',
birth_month: 4,
birth_day: 10,
birth_year: 2018,
secondary_type: 'Golden Retriever'
}
]
})
};
fetch('https://www.postable.com/api/v1/contacts/{uuid}', 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://www.postable.com/api/v1/contacts/{uuid}",
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([
'first_name' => 'Johnny',
'email' => 'johnny.doe@example.com',
'birth_day' => 16,
'children' => [
[
'first_name' => 'Jimmy',
'birth_month' => 3,
'birth_day' => 12,
'birth_year' => 2012
],
[
'first_name' => 'Sally',
'birth_month' => 9,
'birth_day' => 8,
'birth_year' => 2015
],
[
'first_name' => 'Bobby',
'birth_month' => 11,
'birth_day' => 30,
'birth_year' => 2018
]
],
'pets' => [
[
'name' => 'Fido',
'birth_month' => 4,
'birth_day' => 10,
'birth_year' => 2018,
'secondary_type' => 'Golden Retriever'
]
]
]),
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://www.postable.com/api/v1/contacts/{uuid}"
payload := strings.NewReader("{\n \"first_name\": \"Johnny\",\n \"email\": \"johnny.doe@example.com\",\n \"birth_day\": 16,\n \"children\": [\n {\n \"first_name\": \"Jimmy\",\n \"birth_month\": 3,\n \"birth_day\": 12,\n \"birth_year\": 2012\n },\n {\n \"first_name\": \"Sally\",\n \"birth_month\": 9,\n \"birth_day\": 8,\n \"birth_year\": 2015\n },\n {\n \"first_name\": \"Bobby\",\n \"birth_month\": 11,\n \"birth_day\": 30,\n \"birth_year\": 2018\n }\n ],\n \"pets\": [\n {\n \"name\": \"Fido\",\n \"birth_month\": 4,\n \"birth_day\": 10,\n \"birth_year\": 2018,\n \"secondary_type\": \"Golden Retriever\"\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://www.postable.com/api/v1/contacts/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Johnny\",\n \"email\": \"johnny.doe@example.com\",\n \"birth_day\": 16,\n \"children\": [\n {\n \"first_name\": \"Jimmy\",\n \"birth_month\": 3,\n \"birth_day\": 12,\n \"birth_year\": 2012\n },\n {\n \"first_name\": \"Sally\",\n \"birth_month\": 9,\n \"birth_day\": 8,\n \"birth_year\": 2015\n },\n {\n \"first_name\": \"Bobby\",\n \"birth_month\": 11,\n \"birth_day\": 30,\n \"birth_year\": 2018\n }\n ],\n \"pets\": [\n {\n \"name\": \"Fido\",\n \"birth_month\": 4,\n \"birth_day\": 10,\n \"birth_year\": 2018,\n \"secondary_type\": \"Golden Retriever\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.postable.com/api/v1/contacts/{uuid}")
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 \"first_name\": \"Johnny\",\n \"email\": \"johnny.doe@example.com\",\n \"birth_day\": 16,\n \"children\": [\n {\n \"first_name\": \"Jimmy\",\n \"birth_month\": 3,\n \"birth_day\": 12,\n \"birth_year\": 2012\n },\n {\n \"first_name\": \"Sally\",\n \"birth_month\": 9,\n \"birth_day\": 8,\n \"birth_year\": 2015\n },\n {\n \"first_name\": \"Bobby\",\n \"birth_month\": 11,\n \"birth_day\": 30,\n \"birth_year\": 2018\n }\n ],\n \"pets\": [\n {\n \"name\": \"Fido\",\n \"birth_month\": 4,\n \"birth_day\": 10,\n \"birth_year\": 2018,\n \"secondary_type\": \"Golden Retriever\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"first_name": "<string>",
"last_name": "<string>",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"internal_id": "<string>",
"prefix": "<string>",
"middle_name": "<string>",
"company": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address": "<string>",
"apt": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"spouse_prefix": "<string>",
"spouse_first_name": "<string>",
"spouse_middle_name": "<string>",
"spouse_last_name": "<string>",
"birth_month": 6,
"birth_day": 16,
"birth_year": 123,
"anniversary_month": 6,
"anniversary_day": 16,
"anniversary_year": 123,
"spouse_birth_month": 6,
"spouse_birth_day": 16,
"spouse_birth_year": 123,
"children": [
{
"first_name": "<string>",
"birth_month": 6,
"birth_day": 16,
"birth_year": 123
}
],
"pets": [
{
"name": "<string>",
"birth_month": 6,
"birth_day": 16,
"birth_year": 123,
"secondary_type": "<string>"
}
],
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
UUID of the contact
Body
First name of the contact
Last name of the contact
Unique identifier for the contact
Your internal identifier for this contact (e.g., customer ID from your system)
20Prefix/title (e.g., Mr., Mrs., Dr.)
Middle name of the contact
Company name
Email address
Phone number
Street address
Apartment, suite, or unit number
City
State or province
ZIP or postal code
Country
Spouse's prefix/title
Spouse's first name
Spouse's middle name
Spouse's last name
Birth month
1 <= x <= 12Birth day
1 <= x <= 31Birth year
Anniversary month
1 <= x <= 12Anniversary day
1 <= x <= 31Anniversary year
Spouse's birth month
1 <= x <= 12Spouse's birth day
1 <= x <= 31Spouse's birth year
List of children
Show child attributes
Show child attributes
List of pets
Show child attributes
Show child attributes
Additional notes about the contact
Creation timestamp in ISO-8601 format
Last update timestamp in ISO-8601 format
Response
Contact updated successfully
Show child attributes
Show child attributes