Contacts
Create a contact
POST
/
v1
/
contacts
Create a contact
curl --request POST \
--url https://api.givebutter.com/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"primary_email": "<string>",
"primary_phone": "<string>",
"company_name": "<string>",
"external_id": "<string>",
"contact_since": "2023-11-07T05:31:56Z",
"pronouns": "<string>",
"suffix": "<string>",
"prefix": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"primary_address_1": "<string>",
"primary_address_2": "<string>",
"primary_city": "<string>",
"primary_state": "<string>",
"primary_zipcode": "<string>",
"primary_country": "<string>",
"emails": [
"<string>"
],
"phones": [
"<string>"
],
"dob": "<string>",
"employer": "<string>",
"company": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"note": "<string>",
"email_subscription": true,
"phone_subscription": true,
"address_subscription": true,
"custom_fields": [
"<string>"
],
"tags": [
"<string>"
],
"addresses": [
{
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>"
}
],
"force_create": false
}
'import requests
url = "https://api.givebutter.com/v1/contacts"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"primary_email": "<string>",
"primary_phone": "<string>",
"company_name": "<string>",
"external_id": "<string>",
"contact_since": "2023-11-07T05:31:56Z",
"pronouns": "<string>",
"suffix": "<string>",
"prefix": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"primary_address_1": "<string>",
"primary_address_2": "<string>",
"primary_city": "<string>",
"primary_state": "<string>",
"primary_zipcode": "<string>",
"primary_country": "<string>",
"emails": ["<string>"],
"phones": ["<string>"],
"dob": "<string>",
"employer": "<string>",
"company": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"note": "<string>",
"email_subscription": True,
"phone_subscription": True,
"address_subscription": True,
"custom_fields": ["<string>"],
"tags": ["<string>"],
"addresses": [
{
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>"
}
],
"force_create": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
middle_name: '<string>',
preferred_name: '<string>',
primary_email: '<string>',
primary_phone: '<string>',
company_name: '<string>',
external_id: '<string>',
contact_since: '2023-11-07T05:31:56Z',
pronouns: '<string>',
suffix: '<string>',
prefix: '<string>',
address_1: '<string>',
address_2: '<string>',
city: '<string>',
state: '<string>',
zipcode: '<string>',
country: '<string>',
primary_address_1: '<string>',
primary_address_2: '<string>',
primary_city: '<string>',
primary_state: '<string>',
primary_zipcode: '<string>',
primary_country: '<string>',
emails: ['<string>'],
phones: ['<string>'],
dob: '<string>',
employer: '<string>',
company: '<string>',
title: '<string>',
twitter_url: '<string>',
linkedin_url: '<string>',
facebook_url: '<string>',
tiktok_url: '<string>',
instagram_url: '<string>',
note: '<string>',
email_subscription: true,
phone_subscription: true,
address_subscription: true,
custom_fields: ['<string>'],
tags: ['<string>'],
addresses: [
{
address_1: '<string>',
address_2: '<string>',
city: '<string>',
state: '<string>',
zipcode: '<string>',
country: '<string>'
}
],
force_create: false
})
};
fetch('https://api.givebutter.com/v1/contacts', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'middle_name' => '<string>',
'preferred_name' => '<string>',
'primary_email' => '<string>',
'primary_phone' => '<string>',
'company_name' => '<string>',
'external_id' => '<string>',
'contact_since' => '2023-11-07T05:31:56Z',
'pronouns' => '<string>',
'suffix' => '<string>',
'prefix' => '<string>',
'address_1' => '<string>',
'address_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipcode' => '<string>',
'country' => '<string>',
'primary_address_1' => '<string>',
'primary_address_2' => '<string>',
'primary_city' => '<string>',
'primary_state' => '<string>',
'primary_zipcode' => '<string>',
'primary_country' => '<string>',
'emails' => [
'<string>'
],
'phones' => [
'<string>'
],
'dob' => '<string>',
'employer' => '<string>',
'company' => '<string>',
'title' => '<string>',
'twitter_url' => '<string>',
'linkedin_url' => '<string>',
'facebook_url' => '<string>',
'tiktok_url' => '<string>',
'instagram_url' => '<string>',
'note' => '<string>',
'email_subscription' => true,
'phone_subscription' => true,
'address_subscription' => true,
'custom_fields' => [
'<string>'
],
'tags' => [
'<string>'
],
'addresses' => [
[
'address_1' => '<string>',
'address_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipcode' => '<string>',
'country' => '<string>'
]
],
'force_create' => false
]),
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"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"preferred_name\": \"<string>\",\n \"primary_email\": \"<string>\",\n \"primary_phone\": \"<string>\",\n \"company_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"primary_address_1\": \"<string>\",\n \"primary_address_2\": \"<string>\",\n \"primary_city\": \"<string>\",\n \"primary_state\": \"<string>\",\n \"primary_zipcode\": \"<string>\",\n \"primary_country\": \"<string>\",\n \"emails\": [\n \"<string>\"\n ],\n \"phones\": [\n \"<string>\"\n ],\n \"dob\": \"<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 \"instagram_url\": \"<string>\",\n \"note\": \"<string>\",\n \"email_subscription\": true,\n \"phone_subscription\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"addresses\": [\n {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"force_create\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.givebutter.com/v1/contacts")
.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 \"primary_email\": \"<string>\",\n \"primary_phone\": \"<string>\",\n \"company_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"primary_address_1\": \"<string>\",\n \"primary_address_2\": \"<string>\",\n \"primary_city\": \"<string>\",\n \"primary_state\": \"<string>\",\n \"primary_zipcode\": \"<string>\",\n \"primary_country\": \"<string>\",\n \"emails\": [\n \"<string>\"\n ],\n \"phones\": [\n \"<string>\"\n ],\n \"dob\": \"<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 \"instagram_url\": \"<string>\",\n \"note\": \"<string>\",\n \"email_subscription\": true,\n \"phone_subscription\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"addresses\": [\n {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"force_create\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.givebutter.com/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"primary_email\": \"<string>\",\n \"primary_phone\": \"<string>\",\n \"company_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"primary_address_1\": \"<string>\",\n \"primary_address_2\": \"<string>\",\n \"primary_city\": \"<string>\",\n \"primary_state\": \"<string>\",\n \"primary_zipcode\": \"<string>\",\n \"primary_country\": \"<string>\",\n \"emails\": [\n \"<string>\"\n ],\n \"phones\": [\n \"<string>\"\n ],\n \"dob\": \"<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 \"instagram_url\": \"<string>\",\n \"note\": \"<string>\",\n \"email_subscription\": true,\n \"phone_subscription\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"addresses\": [\n {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"force_create\": false\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>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Maximum string length:
255Maximum string length:
255Maximum string length:
255Required string length:
1 - 255Maximum string length:
255Maximum string length:
255Available options:
individual, company Available options:
male, female, other Required string length:
1 - 255Maximum string length:
32Maximum string length:
32Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
64Show 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?
⌘I
Create a contact
curl --request POST \
--url https://api.givebutter.com/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"primary_email": "<string>",
"primary_phone": "<string>",
"company_name": "<string>",
"external_id": "<string>",
"contact_since": "2023-11-07T05:31:56Z",
"pronouns": "<string>",
"suffix": "<string>",
"prefix": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"primary_address_1": "<string>",
"primary_address_2": "<string>",
"primary_city": "<string>",
"primary_state": "<string>",
"primary_zipcode": "<string>",
"primary_country": "<string>",
"emails": [
"<string>"
],
"phones": [
"<string>"
],
"dob": "<string>",
"employer": "<string>",
"company": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"note": "<string>",
"email_subscription": true,
"phone_subscription": true,
"address_subscription": true,
"custom_fields": [
"<string>"
],
"tags": [
"<string>"
],
"addresses": [
{
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>"
}
],
"force_create": false
}
'import requests
url = "https://api.givebutter.com/v1/contacts"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"middle_name": "<string>",
"preferred_name": "<string>",
"primary_email": "<string>",
"primary_phone": "<string>",
"company_name": "<string>",
"external_id": "<string>",
"contact_since": "2023-11-07T05:31:56Z",
"pronouns": "<string>",
"suffix": "<string>",
"prefix": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>",
"primary_address_1": "<string>",
"primary_address_2": "<string>",
"primary_city": "<string>",
"primary_state": "<string>",
"primary_zipcode": "<string>",
"primary_country": "<string>",
"emails": ["<string>"],
"phones": ["<string>"],
"dob": "<string>",
"employer": "<string>",
"company": "<string>",
"title": "<string>",
"twitter_url": "<string>",
"linkedin_url": "<string>",
"facebook_url": "<string>",
"tiktok_url": "<string>",
"instagram_url": "<string>",
"note": "<string>",
"email_subscription": True,
"phone_subscription": True,
"address_subscription": True,
"custom_fields": ["<string>"],
"tags": ["<string>"],
"addresses": [
{
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"country": "<string>"
}
],
"force_create": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '<string>',
last_name: '<string>',
middle_name: '<string>',
preferred_name: '<string>',
primary_email: '<string>',
primary_phone: '<string>',
company_name: '<string>',
external_id: '<string>',
contact_since: '2023-11-07T05:31:56Z',
pronouns: '<string>',
suffix: '<string>',
prefix: '<string>',
address_1: '<string>',
address_2: '<string>',
city: '<string>',
state: '<string>',
zipcode: '<string>',
country: '<string>',
primary_address_1: '<string>',
primary_address_2: '<string>',
primary_city: '<string>',
primary_state: '<string>',
primary_zipcode: '<string>',
primary_country: '<string>',
emails: ['<string>'],
phones: ['<string>'],
dob: '<string>',
employer: '<string>',
company: '<string>',
title: '<string>',
twitter_url: '<string>',
linkedin_url: '<string>',
facebook_url: '<string>',
tiktok_url: '<string>',
instagram_url: '<string>',
note: '<string>',
email_subscription: true,
phone_subscription: true,
address_subscription: true,
custom_fields: ['<string>'],
tags: ['<string>'],
addresses: [
{
address_1: '<string>',
address_2: '<string>',
city: '<string>',
state: '<string>',
zipcode: '<string>',
country: '<string>'
}
],
force_create: false
})
};
fetch('https://api.givebutter.com/v1/contacts', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'middle_name' => '<string>',
'preferred_name' => '<string>',
'primary_email' => '<string>',
'primary_phone' => '<string>',
'company_name' => '<string>',
'external_id' => '<string>',
'contact_since' => '2023-11-07T05:31:56Z',
'pronouns' => '<string>',
'suffix' => '<string>',
'prefix' => '<string>',
'address_1' => '<string>',
'address_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipcode' => '<string>',
'country' => '<string>',
'primary_address_1' => '<string>',
'primary_address_2' => '<string>',
'primary_city' => '<string>',
'primary_state' => '<string>',
'primary_zipcode' => '<string>',
'primary_country' => '<string>',
'emails' => [
'<string>'
],
'phones' => [
'<string>'
],
'dob' => '<string>',
'employer' => '<string>',
'company' => '<string>',
'title' => '<string>',
'twitter_url' => '<string>',
'linkedin_url' => '<string>',
'facebook_url' => '<string>',
'tiktok_url' => '<string>',
'instagram_url' => '<string>',
'note' => '<string>',
'email_subscription' => true,
'phone_subscription' => true,
'address_subscription' => true,
'custom_fields' => [
'<string>'
],
'tags' => [
'<string>'
],
'addresses' => [
[
'address_1' => '<string>',
'address_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zipcode' => '<string>',
'country' => '<string>'
]
],
'force_create' => false
]),
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"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"middle_name\": \"<string>\",\n \"preferred_name\": \"<string>\",\n \"primary_email\": \"<string>\",\n \"primary_phone\": \"<string>\",\n \"company_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"primary_address_1\": \"<string>\",\n \"primary_address_2\": \"<string>\",\n \"primary_city\": \"<string>\",\n \"primary_state\": \"<string>\",\n \"primary_zipcode\": \"<string>\",\n \"primary_country\": \"<string>\",\n \"emails\": [\n \"<string>\"\n ],\n \"phones\": [\n \"<string>\"\n ],\n \"dob\": \"<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 \"instagram_url\": \"<string>\",\n \"note\": \"<string>\",\n \"email_subscription\": true,\n \"phone_subscription\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"addresses\": [\n {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"force_create\": false\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.givebutter.com/v1/contacts")
.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 \"primary_email\": \"<string>\",\n \"primary_phone\": \"<string>\",\n \"company_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"primary_address_1\": \"<string>\",\n \"primary_address_2\": \"<string>\",\n \"primary_city\": \"<string>\",\n \"primary_state\": \"<string>\",\n \"primary_zipcode\": \"<string>\",\n \"primary_country\": \"<string>\",\n \"emails\": [\n \"<string>\"\n ],\n \"phones\": [\n \"<string>\"\n ],\n \"dob\": \"<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 \"instagram_url\": \"<string>\",\n \"note\": \"<string>\",\n \"email_subscription\": true,\n \"phone_subscription\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"addresses\": [\n {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"force_create\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.givebutter.com/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"primary_email\": \"<string>\",\n \"primary_phone\": \"<string>\",\n \"company_name\": \"<string>\",\n \"external_id\": \"<string>\",\n \"contact_since\": \"2023-11-07T05:31:56Z\",\n \"pronouns\": \"<string>\",\n \"suffix\": \"<string>\",\n \"prefix\": \"<string>\",\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\",\n \"primary_address_1\": \"<string>\",\n \"primary_address_2\": \"<string>\",\n \"primary_city\": \"<string>\",\n \"primary_state\": \"<string>\",\n \"primary_zipcode\": \"<string>\",\n \"primary_country\": \"<string>\",\n \"emails\": [\n \"<string>\"\n ],\n \"phones\": [\n \"<string>\"\n ],\n \"dob\": \"<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 \"instagram_url\": \"<string>\",\n \"note\": \"<string>\",\n \"email_subscription\": true,\n \"phone_subscription\": true,\n \"address_subscription\": true,\n \"custom_fields\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"addresses\": [\n {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"force_create\": false\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>",
"errors": {}
}