Update a contact
curl --request PUT \
--url https://api.givebutter.com/v1/contacts/{contact} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"pronouns": "<string>",
"suffix": "<string>",
"prefix": "<string>",
"company_name": "<string>",
"employer": "<string>",
"company": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"website_url": "<string>",
"note": "<string>",
"bio": "<string>",
"external_id": "<string>",
"contact_since": "2023-11-07T05:31:56Z",
"dob": "<string>",
"email_opt_in": true,
"sms_opt_in": true,
"address_subscription": true,
"custom_fields": [
"<string>"
],
"tags": [
"<string>"
],
"remove_emails": [
"[email protected]"
],
"remove_phones": [
"<string>"
],
"remove_address_ids": [
123
],
"emails": [
{
"value": "[email protected]",
"type": "<string>",
"is_primary": true
}
],
"phones": [
{
"value": "<string>",
"type": "<string>",
"is_primary": true
}
],
"addresses": [
{
"id": 123,
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"is_primary": true
}
]
}
'import requests
url = "https://api.givebutter.com/v1/contacts/{contact}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"pronouns": "<string>",
"suffix": "<string>",
"prefix": "<string>",
"company_name": "<string>",
"employer": "<string>",
"company": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"website_url": "<string>",
"note": "<string>",
"bio": "<string>",
"external_id": "<string>",
"contact_since": "2023-11-07T05:31:56Z",
"dob": "<string>",
"email_opt_in": True,
"sms_opt_in": True,
"address_subscription": True,
"custom_fields": ["<string>"],
"tags": ["<string>"],
"remove_emails": ["[email protected]"],
"remove_phones": ["<string>"],
"remove_address_ids": [123],
"emails": [
{
"value": "[email protected]",
"type": "<string>",
"is_primary": True
}
],
"phones": [
{
"value": "<string>",
"type": "<string>",
"is_primary": True
}
],
"addresses": [
{
"id": 123,
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"is_primary": True
}
]
}
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: '<string>',
last_name: '<string>',
middle_name: '<string>',
preferred_name: '<string>',
pronouns: '<string>',
suffix: '<string>',
prefix: '<string>',
company_name: '<string>',
employer: '<string>',
company: '<string>',
title: '<string>',
twitter_url: '<string>',
linkedin_url: '<string>',
facebook_url: '<string>',
tiktok_url: '<string>',
website_url: '<string>',
note: '<string>',
bio: '<string>',
external_id: '<string>',
contact_since: '2023-11-07T05:31:56Z',
dob: '<string>',
email_opt_in: true,
sms_opt_in: true,
address_subscription: true,
custom_fields: ['<string>'],
tags: ['<string>'],
remove_emails: ['[email protected]'],
remove_phones: ['<string>'],
remove_address_ids: [123],
emails: [{value: '[email protected]', type: '<string>', is_primary: true}],
phones: [{value: '<string>', type: '<string>', is_primary: true}],
addresses: [
{
id: 123,
address_1: '<string>',
address_2: '<string>',
city: '<string>',
state: '<string>',
zipcode: '<string>',
country: '<string>',
is_primary: true
}
]
})
};
fetch('https://api.givebutter.com/v1/contacts/{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.givebutter.com/v1/contacts/{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([
'first_name' => '<string>',
'last_name' => '<string>',
'middle_name' => '<string>',
'preferred_name' => '<string>',
'pronouns' => '<string>',
'suffix' => '<string>',
'prefix' => '<string>',
'company_name' => '<string>',
'employer' => '<string>',
'company' => '<string>',
'title' => '<string>',
'twitter_url' => '<string>',
'linkedin_url' => '<string>',
'facebook_url' => '<string>',
'tiktok_url' => '<string>',
'website_url' => '<string>',
'note' => '<string>',
'bio' => '<string>',
'external_id' => '<string>',
'contact_since' => '2023-11-07T05:31:56Z',
'dob' => '<string>',
'email_opt_in' => true,
'sms_opt_in' => true,
'address_subscription' => true,
'custom_fields' => [
'<string>'
],
'tags' => [
'<string>'
],
'remove_emails' => [
'[email protected]'
],
'remove_phones' => [
'<string>'
],
'remove_address_ids' => [
123
],
'emails' => [
[
'value' => '[email protected]',
'type' => '<string>',
'is_primary' => true
]
],
'phones' => [
[
'value' => '<string>',
'type' => '<string>',
'is_primary' => true
]
],
'addresses' => [
[
'id' => 123,
'address_1' => '<string>',
'address_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipcode' => '<string>',
'country' => '<string>',
'is_primary' => true
]
]
]),
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.givebutter.com/v1/contacts/{contact}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"preferred_name\": \"<string>\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"company_name\": \"<string>\",\n \"employer\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"twitter_url\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"facebook_url\": \"<string>\",\n \"tiktok_url\": \"<string>\",\n \"website_url\": \"<string>\",\n \"note\": \"<string>\",\n \"bio\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"dob\": \"<string>\",\n \"email_opt_in\": true,\n \"sms_opt_in\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"remove_emails\": [\n \"[email protected]\"\n ],\n \"remove_phones\": [\n \"<string>\"\n ],\n \"remove_address_ids\": [\n 123\n ],\n \"emails\": [\n {\n \"value\": \"[email protected]\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"phones\": [\n {\n \"value\": \"<string>\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"addresses\": [\n {\n \"id\": 123,\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"is_primary\": true\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.givebutter.com/v1/contacts/{contact}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"preferred_name\": \"<string>\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"company_name\": \"<string>\",\n \"employer\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"twitter_url\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"facebook_url\": \"<string>\",\n \"tiktok_url\": \"<string>\",\n \"website_url\": \"<string>\",\n \"note\": \"<string>\",\n \"bio\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"dob\": \"<string>\",\n \"email_opt_in\": true,\n \"sms_opt_in\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"remove_emails\": [\n \"[email protected]\"\n ],\n \"remove_phones\": [\n \"<string>\"\n ],\n \"remove_address_ids\": [\n 123\n ],\n \"emails\": [\n {\n \"value\": \"[email protected]\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"phones\": [\n {\n \"value\": \"<string>\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"addresses\": [\n {\n \"id\": 123,\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"is_primary\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.givebutter.com/v1/contacts/{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 \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"preferred_name\": \"<string>\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"company_name\": \"<string>\",\n \"employer\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"twitter_url\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"facebook_url\": \"<string>\",\n \"tiktok_url\": \"<string>\",\n \"website_url\": \"<string>\",\n \"note\": \"<string>\",\n \"bio\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"dob\": \"<string>\",\n \"email_opt_in\": true,\n \"sms_opt_in\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"remove_emails\": [\n \"[email protected]\"\n ],\n \"remove_phones\": [\n \"<string>\"\n ],\n \"remove_address_ids\": [\n 123\n ],\n \"emails\": [\n {\n \"value\": \"[email protected]\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"phones\": [\n {\n \"value\": \"<string>\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"addresses\": [\n {\n \"id\": 123,\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"is_primary\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"external_id": "<string>",
"contact_since": "<string>",
"type": "<string>",
"prefix": "<string>",
"first_name": "<string>",
"preferred_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"suffix": "<string>",
"gender": "<string>",
"pronouns": "<string>",
"dob": "<string>",
"company": "<string>",
"employer": "<string>",
"company_name": "<string>",
"title": "<string>",
"website_url": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"emails": [
{
"type": "<string>",
"value": "<string>"
}
],
"phones": [
{
"type": "<string>",
"value": "<string>"
}
],
"primary_email": "<string>",
"primary_phone": "<string>",
"note": "<string>",
"addresses": [
{
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"type": "<string>",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"primary_address": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"type": "<string>",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"last_donation_amount": "<string>",
"stats": {
"total_contributions": "<string>",
"recurring_contributions": "<string>"
},
"tags": "<string>",
"custom_fields": [
"<unknown>"
],
"external_ids": [
{
"id": 123,
"label": "<string>",
"external_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"is_email_subscribed": "<string>",
"is_phone_subscribed": "<string>",
"is_address_subscribed": "<string>",
"email_opt_in": "<string>",
"sms_opt_in": "<string>",
"address_unsubscribed_at": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"salutation_name": "<string>",
"point_of_contact": {
"id": "<string>",
"type": "<string>",
"prefix": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"suffix": "<string>",
"gender": "<string>",
"pronouns": "<string>",
"dob": "<string>",
"employer": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"website_url": "<string>",
"emails": {},
"phones": {},
"primary_email": "<string>",
"primary_phone": "<string>",
"is_email_subscribed": "<string>",
"is_phone_subscribed": "<string>",
"is_address_subscribed": "<string>",
"address_unsubscribed_at": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"first_time_supporter_at": "<string>"
},
"associated_companies": [
{
"id": "<string>",
"type": "<string>",
"company_name": "<string>",
"name_display": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"website_url": "<string>",
"image_url": "<string>",
"emails": {},
"phones": {},
"primary_email": "<string>",
"primary_phone": "<string>",
"is_email_subscribed": "<string>",
"is_phone_subscribed": "<string>",
"is_address_subscribed": "<string>",
"address_unsubscribed_at": "<string>",
"note": "<string>",
"addresses": [
{
"id": 123,
"account_id": 123,
"name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"type": "<string>",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"primary_address": {
"id": 123,
"account_id": 123,
"name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"type": "<string>",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"archived_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"first_time_supporter_at": "<string>"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The contact ID
Body
Required for individual contacts. Optional for company contacts, which require company_name instead.
255Required for individual contacts. Optional for company contacts, which require company_name instead.
2552551 - 255male, female, other 1 - 2553232Determines which fields are required: individual contacts require a name, company contacts require company_name.
individual, company Required for company contacts. Optional for individual contacts, which require first_name and last_name instead.
2552552552552048200025564Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
ContactResource
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
curl --request PUT \
--url https://api.givebutter.com/v1/contacts/{contact} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"pronouns": "<string>",
"suffix": "<string>",
"prefix": "<string>",
"company_name": "<string>",
"employer": "<string>",
"company": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"website_url": "<string>",
"note": "<string>",
"bio": "<string>",
"external_id": "<string>",
"contact_since": "2023-11-07T05:31:56Z",
"dob": "<string>",
"email_opt_in": true,
"sms_opt_in": true,
"address_subscription": true,
"custom_fields": [
"<string>"
],
"tags": [
"<string>"
],
"remove_emails": [
"[email protected]"
],
"remove_phones": [
"<string>"
],
"remove_address_ids": [
123
],
"emails": [
{
"value": "[email protected]",
"type": "<string>",
"is_primary": true
}
],
"phones": [
{
"value": "<string>",
"type": "<string>",
"is_primary": true
}
],
"addresses": [
{
"id": 123,
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"is_primary": true
}
]
}
'import requests
url = "https://api.givebutter.com/v1/contacts/{contact}"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"pronouns": "<string>",
"suffix": "<string>",
"prefix": "<string>",
"company_name": "<string>",
"employer": "<string>",
"company": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"website_url": "<string>",
"note": "<string>",
"bio": "<string>",
"external_id": "<string>",
"contact_since": "2023-11-07T05:31:56Z",
"dob": "<string>",
"email_opt_in": True,
"sms_opt_in": True,
"address_subscription": True,
"custom_fields": ["<string>"],
"tags": ["<string>"],
"remove_emails": ["[email protected]"],
"remove_phones": ["<string>"],
"remove_address_ids": [123],
"emails": [
{
"value": "[email protected]",
"type": "<string>",
"is_primary": True
}
],
"phones": [
{
"value": "<string>",
"type": "<string>",
"is_primary": True
}
],
"addresses": [
{
"id": 123,
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"is_primary": True
}
]
}
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: '<string>',
last_name: '<string>',
middle_name: '<string>',
preferred_name: '<string>',
pronouns: '<string>',
suffix: '<string>',
prefix: '<string>',
company_name: '<string>',
employer: '<string>',
company: '<string>',
title: '<string>',
twitter_url: '<string>',
linkedin_url: '<string>',
facebook_url: '<string>',
tiktok_url: '<string>',
website_url: '<string>',
note: '<string>',
bio: '<string>',
external_id: '<string>',
contact_since: '2023-11-07T05:31:56Z',
dob: '<string>',
email_opt_in: true,
sms_opt_in: true,
address_subscription: true,
custom_fields: ['<string>'],
tags: ['<string>'],
remove_emails: ['[email protected]'],
remove_phones: ['<string>'],
remove_address_ids: [123],
emails: [{value: '[email protected]', type: '<string>', is_primary: true}],
phones: [{value: '<string>', type: '<string>', is_primary: true}],
addresses: [
{
id: 123,
address_1: '<string>',
address_2: '<string>',
city: '<string>',
state: '<string>',
zipcode: '<string>',
country: '<string>',
is_primary: true
}
]
})
};
fetch('https://api.givebutter.com/v1/contacts/{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.givebutter.com/v1/contacts/{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([
'first_name' => '<string>',
'last_name' => '<string>',
'middle_name' => '<string>',
'preferred_name' => '<string>',
'pronouns' => '<string>',
'suffix' => '<string>',
'prefix' => '<string>',
'company_name' => '<string>',
'employer' => '<string>',
'company' => '<string>',
'title' => '<string>',
'twitter_url' => '<string>',
'linkedin_url' => '<string>',
'facebook_url' => '<string>',
'tiktok_url' => '<string>',
'website_url' => '<string>',
'note' => '<string>',
'bio' => '<string>',
'external_id' => '<string>',
'contact_since' => '2023-11-07T05:31:56Z',
'dob' => '<string>',
'email_opt_in' => true,
'sms_opt_in' => true,
'address_subscription' => true,
'custom_fields' => [
'<string>'
],
'tags' => [
'<string>'
],
'remove_emails' => [
'[email protected]'
],
'remove_phones' => [
'<string>'
],
'remove_address_ids' => [
123
],
'emails' => [
[
'value' => '[email protected]',
'type' => '<string>',
'is_primary' => true
]
],
'phones' => [
[
'value' => '<string>',
'type' => '<string>',
'is_primary' => true
]
],
'addresses' => [
[
'id' => 123,
'address_1' => '<string>',
'address_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipcode' => '<string>',
'country' => '<string>',
'is_primary' => true
]
]
]),
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.givebutter.com/v1/contacts/{contact}"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"preferred_name\": \"<string>\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"company_name\": \"<string>\",\n \"employer\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"twitter_url\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"facebook_url\": \"<string>\",\n \"tiktok_url\": \"<string>\",\n \"website_url\": \"<string>\",\n \"note\": \"<string>\",\n \"bio\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"dob\": \"<string>\",\n \"email_opt_in\": true,\n \"sms_opt_in\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"remove_emails\": [\n \"[email protected]\"\n ],\n \"remove_phones\": [\n \"<string>\"\n ],\n \"remove_address_ids\": [\n 123\n ],\n \"emails\": [\n {\n \"value\": \"[email protected]\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"phones\": [\n {\n \"value\": \"<string>\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"addresses\": [\n {\n \"id\": 123,\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"is_primary\": true\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.givebutter.com/v1/contacts/{contact}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"preferred_name\": \"<string>\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"company_name\": \"<string>\",\n \"employer\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"twitter_url\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"facebook_url\": \"<string>\",\n \"tiktok_url\": \"<string>\",\n \"website_url\": \"<string>\",\n \"note\": \"<string>\",\n \"bio\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"dob\": \"<string>\",\n \"email_opt_in\": true,\n \"sms_opt_in\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"remove_emails\": [\n \"[email protected]\"\n ],\n \"remove_phones\": [\n \"<string>\"\n ],\n \"remove_address_ids\": [\n 123\n ],\n \"emails\": [\n {\n \"value\": \"[email protected]\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"phones\": [\n {\n \"value\": \"<string>\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"addresses\": [\n {\n \"id\": 123,\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"is_primary\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.givebutter.com/v1/contacts/{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 \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"preferred_name\": \"<string>\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"company_name\": \"<string>\",\n \"employer\": \"<string>\",\n \"company\": \"<string>\",\n \"title\": \"<string>\",\n \"twitter_url\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"facebook_url\": \"<string>\",\n \"tiktok_url\": \"<string>\",\n \"website_url\": \"<string>\",\n \"note\": \"<string>\",\n \"bio\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"dob\": \"<string>\",\n \"email_opt_in\": true,\n \"sms_opt_in\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"remove_emails\": [\n \"[email protected]\"\n ],\n \"remove_phones\": [\n \"<string>\"\n ],\n \"remove_address_ids\": [\n 123\n ],\n \"emails\": [\n {\n \"value\": \"[email protected]\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"phones\": [\n {\n \"value\": \"<string>\",\n \"type\": \"<string>\",\n \"is_primary\": true\n }\n ],\n \"addresses\": [\n {\n \"id\": 123,\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"is_primary\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"external_id": "<string>",
"contact_since": "<string>",
"type": "<string>",
"prefix": "<string>",
"first_name": "<string>",
"preferred_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"suffix": "<string>",
"gender": "<string>",
"pronouns": "<string>",
"dob": "<string>",
"company": "<string>",
"employer": "<string>",
"company_name": "<string>",
"title": "<string>",
"website_url": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"emails": [
{
"type": "<string>",
"value": "<string>"
}
],
"phones": [
{
"type": "<string>",
"value": "<string>"
}
],
"primary_email": "<string>",
"primary_phone": "<string>",
"note": "<string>",
"addresses": [
{
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"type": "<string>",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"primary_address": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"type": "<string>",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"last_donation_amount": "<string>",
"stats": {
"total_contributions": "<string>",
"recurring_contributions": "<string>"
},
"tags": "<string>",
"custom_fields": [
"<unknown>"
],
"external_ids": [
{
"id": 123,
"label": "<string>",
"external_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"is_email_subscribed": "<string>",
"is_phone_subscribed": "<string>",
"is_address_subscribed": "<string>",
"email_opt_in": "<string>",
"sms_opt_in": "<string>",
"address_unsubscribed_at": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"salutation_name": "<string>",
"point_of_contact": {
"id": "<string>",
"type": "<string>",
"prefix": "<string>",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"suffix": "<string>",
"gender": "<string>",
"pronouns": "<string>",
"dob": "<string>",
"employer": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"website_url": "<string>",
"emails": {},
"phones": {},
"primary_email": "<string>",
"primary_phone": "<string>",
"is_email_subscribed": "<string>",
"is_phone_subscribed": "<string>",
"is_address_subscribed": "<string>",
"address_unsubscribed_at": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"first_time_supporter_at": "<string>"
},
"associated_companies": [
{
"id": "<string>",
"type": "<string>",
"company_name": "<string>",
"name_display": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"website_url": "<string>",
"image_url": "<string>",
"emails": {},
"phones": {},
"primary_email": "<string>",
"primary_phone": "<string>",
"is_email_subscribed": "<string>",
"is_phone_subscribed": "<string>",
"is_address_subscribed": "<string>",
"address_unsubscribed_at": "<string>",
"note": "<string>",
"addresses": [
{
"id": 123,
"account_id": 123,
"name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"type": "<string>",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"primary_address": {
"id": 123,
"account_id": 123,
"name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"type": "<string>",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"archived_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"first_time_supporter_at": "<string>"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}