The Contacts API provides a simple interface to manage your contacts. A contact represents an individual (e.g. Mark Johnson) or an organization (e.g. Google). Each contact has two status fields: customer_status and prospect_status. They describe the contact's relationship to your business.

Types of contacts:

  • Regular Contact - a person or an organization you know, but with whom you have not initiated a business relationship yet.
  • Current Prospect - a person or an organization that you are actively selling to.
  • Lost Prospect - a person or an organization that you have tried to sell to in the past, but were unable to complete a deal. Lost prospects have never been customers before.
  • Current Customer - a person or an organization that currently buys goods or services from your business.
  • Past Customer - a person or an organization that previously bought goods or services from your business, but no longer does so.

You can assign any number of tags and custom fields to a contact. Tags do not need to already exist to be assigned; they will be created if necessary.

The API allows you to create, delete and update your contacts. You can retrieve individual customers, as well as a list of all customers.

JSON format

NameTypeRead OnlyDescription
idnumbertrueThe unique identifier of the contact.
creator_idnumbertrueThe unique identifier of the user the contact was created by.
owner_idnumberfalseThe unique identifier of the user the contact is currently assigned to.
is_organizationbooleanfalseIndicator of whether or not this contact refers to an organization or an individual. This value can be set only during creation and cannot be changed later. The default value is false.
contact_idnumberfalseThe unique identifier of the organization the contact belongs to. The field will be set only if the contact is an individual.
parent_organization_idnumberfalseThe unique identifier of an organization contact that is parent of this organization. The field will be set only if the contact is an organization and has parent.
namestringfalseName of the contact. Required only if the contact is an organization.
first_namestringfalseFirst name of the contact.
last_namestringfalseLast name of the contact. Required only if the contact is an individual.
customer_statusstringfalseThe customer status of the contact. Possible values: none, current, past
prospect_statusstringfalseThe prospect status of the contact. Possible values: none, current, lost
titlestringfalseThe contact’s job title.
descriptionstringfalseThe contact’s description.
industrystringfalseThe contact’s industry.
websitestringfalseThe contact’s website address.
emailstringfalseThe contact’s email address.
phonestringfalseThe contact’s phone number.
mobilestringfalseThe contact’s mobile phone number.
faxstringfalseThe contact’s fax number.
twitterstringfalseThe contact’s X (formerly Twitter) handle.
facebookstringfalseThe contact’s Facebook nickname.
linkedinstringfalseThe contact’s Linkedin nickname.
skypestringfalseThe contact’s Skype nickname.
addressstringfalseThe contact’s address. For more information about the address object see Address.
billing_addressstringfalseThe customers’s billing address. Applicable only if either customer_status or prospect_status is different from none. For more information about the address object see Address.
shipping_addressstringfalseThe customer’s shipping address. Applicable only if either customer_status or prospect_status is different from none. For more information about the address object see Address.
tagsarrayfalseAn array of tags for the contact. See more at Tags.
custom_fieldsobjectfalseCustom fields are a key-value pair attached to a contact. See more at Custom Fields.
created_atstringtrueDate and time that the contact was created in UTC (ISO8601 format).
updated_atstringtrueDate and time of the last update on the contact in UTC (ISO8601 format).

Retrieve all Contacts

GET /v2/contacts

Returns all contacts available to the user according to the parameters provided.

Parameters

NameRequiredTypeInDescription
pagefalsenumberQueryThe page number to start from. Page numbering is 1-based and omitting the page parameter will return the first page.
per_pagefalsenumberQueryThe number of records to return per page. Default limit is 25 and maximum number that can be returned is 100.
sort_byfalsestringQueryA field to sort by. You can sort by filterable custom fields as well. Example: To sort by a custom field named "external_id", use ?sort_by=custom_fields:external_id. Supported custom field types: Number, Single Line Text, Dropdown, Multi Select. The default ordering is ascending. To change the sort order to descending, append :desc to the field. Example: sort_by=last_name:desc. Possible values: "id", "name", "first_name", "last_name", "email", "custom_fields", "updated_at", "created_at"
idsfalsestringQueryComma-separated list of the IDs for the contacts you want to be returned in your request.
creator_idfalsenumberQueryUser ID. Returns all contacts created by that user.
owner_idfalsenumberQueryUser ID. Returns all contacts owned by that user.
is_organizationfalsebooleanQueryIndicates whether or not this contact refers to an organization or an individual.
contact_idfalsenumberQueryThe unique identifier of the organization that the contact belongs to.
namefalsestringQueryName of the contact.
first_namefalsestringQueryFirst name of the contact.
last_namefalsestringQueryLast name of the contact.
emailfalsestringQueryEmail address of the contact.
phonefalsestringQueryPhone number of the contact.
mobilefalsestringQueryMobile phone number of the contact.
customer_statusfalsestringQueryCustomer status of the contact. Possible values: none, current, past
prospect_statusfalsestringQueryProspect status of the contact. Possible values: none, current, lost
address[city]falsestringQueryCity name.
address[postal_code]falsestringQueryZip code or equivalent
address[country]falsestringQueryCountry name.
address[state]falsestringQueryState/region name.
billing_addressfalseAddressQuerynull if contact is neither a customer nor a prospect (see customer_status and prospect_status fields for details).
shipping_addressfalseAddressQuerynull if contact is neither a customer nor a prospect (see customer_status and prospect_status fields for details).
custom_fieldsfalsestringQueryFilterable custom field. Example: To find contacts with a custom field named "external_id" with a value of "SKU01", use the following: ?custom_fields[external_id]=SKU01. Custom fields must be defined and have a Filterable property assigned to them. Supported custom field types: Number, Single Line Text, Dropdown, Multi Select.
inclusivefalsebooleanQueryIndicates how filters should be combine. true value, the default, uses AND logic. false value uses OR logic to combine filters.

Allowed for

  • Agents

Using cURL

curl -v -X GET https://api.getbase.com/v2/contacts \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "items": [    {      "data": {        "id": 1,        "creator_id": 1,        "owner_id": 1,        "is_organization": true,        "contact_id": null,        "parent_organization_id": 2,        "name": "Design Services Company",        "first_name": null,        "last_name": null,        "customer_status": "none",        "prospect_status": "none",        "title": null,        "description": null,        "industry": "Design Services",        "website": "http://www.designservice.com",        "email": null,        "phone": null,        "mobile": null,        "fax": "+44-208-1234567",        "twitter": null,        "facebook": null,        "linkedin": null,        "skype": null,        "address": {          "line1": "2726 Smith Street",          "city": "Hyannis",          "postal_code": "02601",          "state": "MA",          "country": "US"        },        "billing_address": null,        "shipping_address": null,        "tags": [          "important"        ],        "custom_fields": {          "known_via": "tom"        },        "created_at": "2014-08-27T16:32:56Z",        "updated_at": "2014-08-27T16:32:56Z"      },      "meta": {        "type": "contact"      }    },    {      "data": {        "id": 2,        "creator_id": 1,        "owner_id": 1,        "is_organization": false,        "contact_id": 1,        "parent_organization_id": null,        "name": "Mark Johnson",        "first_name": "Mark",        "last_name": "Johnson",        "customer_status": "none",        "prospect_status": "none",        "title": "CEO",        "description": "I know him via Tom",        "industry": "Design Services",        "website": "http://www.designservice.com",        "email": "[email protected]",        "phone": "508-778-6516",        "mobile": "508-778-6516",        "fax": "+44-208-1234567",        "twitter": "mjohnson",        "facebook": "mjohnson",        "linkedin": "mjohnson",        "skype": "mjohnson",        "address": {          "line1": "2726 Smith Street",          "city": "Hyannis",          "postal_code": "02601",          "state": "MA",          "country": "US"        },        "billing_address": null,        "shipping_address": null,        "tags": [          "important"        ],        "custom_fields": {          "known_via": "tom"        },        "created_at": "2014-08-27T16:32:56Z",        "updated_at": "2014-08-27T16:32:56Z"      },      "meta": {        "type": "contact"      }    }  ],  "meta": {    "type": "collection",    "count": 2,    "links": {      "self": "http://api.getbase.com/v2/contacts"    }  }}

Create a contact

Create a new contact. A contact may represent a single individual or an organization.

Parameters

NameRequiredTypeInDescription
nametruestringBodyRequired only if the contact is an organization. is_organization is set to true.
first_namefalsestringBodyThe field will be set only if the contact is an individual. is_organization is set to false.
last_nametruestringBodyRequired only if the contact is an individual. is_organization is set to false.
owner_idfalsenumberBodyDefaults to the unique identifier of the user who created the contact.
is_organizationfalsebooleanBodyThis value can be set only during creation and cannot be changed later.
contact_idfalsenumberBodyThe field will be set only if the contact is an individual. is_organization is set to false.
parent_organization_idfalsenumberBodyThe unique identifier of a contact that should be set as parent for this organization. Referenced contact also has to be an organization. It can be set only for organization contacts (is_organization set to true.
customer_statusfalsestringBodye.g. none
prospect_statusfalsestringBodye.g. current
titlefalsestringBodye.g. CEO
descriptionfalsestringBodye.g. I know him via Tom
industryfalsestringBodye.g. Design Services
websitefalsestringBodye.g. www.designservices.com
emailfalsestringBodye.g. [email protected]
phonefalsestringBodye.g. 508-778-6516
mobilefalsestringBodye.g. 508-778-6516
faxfalsestringBodye.g. +44-208-1234567
twitterfalsestringBodye.g. mjohnson
facebookfalsestringBodye.g. mjohnson
linkedinfalsestringBodye.g. mjohnson
skypefalsestringBodye.g. mjohnson
addressfalseaddressBody
billing_addressfalseAddressBodynull if contact is neither a customer nor a prospect (see customer_status and prospect_status fields for details).
shipping_addressfalseAddressBodynull if contact is neither a customer nor a prospect (see customer_status and prospect_status fields for details).
tagsfalsearrayBodyIn order to modify this, you need to supply the entire set.
custom_fieldsfalseobjectBodye.g. {"known_via": "tom"}

Allowed for

  • Agents

Using cURL

curl -v -X POST https://api.getbase.com/v2/contacts \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN" \-d '{  "data": {    "contact_id": 1,    "name": "Mark Johnson",    "first_name": "Mark",    "last_name": "Johnson",    "title": "CEO",    "description": "I know him via Tom",    "industry": "Design Services",    "website": "http://www.designservice.com",    "email": "[email protected]",    "phone": "508-778-6516",    "mobile": "508-778-6516",    "fax": "+44-208-1234567",    "twitter": "mjohnson",    "facebook": "mjohnson",    "linkedin": "mjohnson",    "skype": "mjohnson",    "address": {      "line1": "2726 Smith Street",      "city": "Hyannis",      "postal_code": "02601",      "state": "MA",      "country": "US"    },    "tags": [      "contractor",      "early-adopter"    ],    "custom_fields": {      "referral_website": "http://www.example.com"    }  }}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 2,    "creator_id": 1,    "owner_id": 1,    "is_organization": false,    "contact_id": 1,    "parent_organization_id": null,    "name": "Mark Johnson",    "first_name": "Mark",    "last_name": "Johnson",    "customer_status": "none",    "prospect_status": "none",    "title": "CEO",    "description": "I know him via Tom",    "industry": "Design Services",    "website": "http://www.designservice.com",    "email": "[email protected]",    "phone": "508-778-6516",    "mobile": "508-778-6516",    "fax": "+44-208-1234567",    "twitter": "mjohnson",    "facebook": "mjohnson",    "linkedin": "mjohnson",    "skype": "mjohnson",    "address": {      "line1": "2726 Smith Street",      "city": "Hyannis",      "postal_code": "02601",      "state": "MA",      "country": "US"    },    "billing_address": null,    "shipping_address": null,    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T16:32:56Z"  },  "meta": {    "type": "contact"  }}

Retrieve a single contact

GET /v2/contacts/:id

Returns a single contact available to the user, according to the unique contact ID provided. If the specified contact does not exist, the request will return an error.

Parameters

NameRequiredTypeInDescription
idtruenumberQueryThe unique identifier of the contact.

Allowed for

  • Agents

Using cURL

curl -v -X GET https://api.getbase.com/v2/contacts/2 \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 2,    "creator_id": 1,    "owner_id": 1,    "is_organization": false,    "contact_id": 1,    "parent_organization_id": null,    "name": "Mark Johnson",    "first_name": "Mark",    "last_name": "Johnson",    "customer_status": "none",    "prospect_status": "none",    "title": "CEO",    "description": "I know him via Tom",    "industry": "Design Services",    "website": "http://www.designservice.com",    "email": "[email protected]",    "phone": "508-778-6516",    "mobile": "508-778-6516",    "fax": "+44-208-1234567",    "twitter": "mjohnson",    "facebook": "mjohnson",    "linkedin": "mjohnson",    "skype": "mjohnson",    "address": {      "line1": "2726 Smith Street",      "city": "Hyannis",      "postal_code": "02601",      "state": "MA",      "country": "US"    },    "billing_address": null,    "shipping_address": null,    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T16:32:56Z"  },  "meta": {    "type": "contact"  }}

Update a contact

PUT /v2/contacts/:id

Updates contact information. If the specified contact does not exist, the request will return an error.

Notice When updating contact tags, you need to provide all tags. Any missing tag will be removed from a contact's tags.

Parameters

NameRequiredTypeInDescription
idtruenumberQueryThe unique identifier of the contact.
namefalsestringBodyThis field will be set only if the contact is an organization. is_organization is set to true.
first_namefalsestringBodyThe field will be set only if the contact is an individual. is_organization is set to false.
last_namefalsestringBodyThe field will be set only if the contact is an individual. is_organization is set to false.
contact_idfalsenumberBodyThe field will be set only if the contact is an individual. is_organization is set to false.
parent_organization_idfalsenumberBodyThe unique identifier of a contact that should be set as parent for this organization. Setting this to null will clear existing parent relation. Referenced contact also has to be an organization. It can be set only for organization contacts (is_organization set to true.
owner_idfalsenumberBodye.g. 1
customer_statusfalsestringBodye.g. none
prospect_statusfalsestringBodye.g. current
titlefalsestringBodye.g. CEO
descriptionfalsestringBodye.g. I know him via Tom
industryfalsestringBodye.g. Design Services
websitefalsestringBodye.g. www.designservices.com
emailfalsestringBodye.g. [email protected]
phonefalsestringBodye.g. 508-778-6516
mobilefalsestringBodye.g. 508-778-6516
faxfalsestringBodye.g. +44-208-1234567
twitterfalsestringBodye.g. mjohnson
facebookfalsestringBodye.g. mjohnson
linkedinfalsestringBodye.g. mjohnson
skypefalsestringBodye.g. mjohnson
addressfalseaddressBody
billing_addressfalseAddressBodyCan be updated if contact is either a customer or a prospect (see customer_status and prospect_status fields for details).
shipping_addressfalseAddressBodyCan be updated if contact is either a customer or a prospect (see customer_status and prospect_status fields for details).
tagsfalsearrayBodyIn order to modify this, you need to supply the entire set.
custom_fieldsfalseobjectBodye.g. `{"known_via": "tom"}

Allowed for

  • Agents

Using cURL

curl -v -X PUT https://api.getbase.com/v2/contacts/2 \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN" \-d '{  "data": {    "customer_status": "current",    "tags": [      "contractor",      "early-adopter"    ],    "custom_fields": {      "referral_website": "http://www.example.com"    }  }}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 2,    "creator_id": 1,    "owner_id": 1,    "is_organization": false,    "contact_id": 1,    "parent_organization_id": null,    "name": "Mark Johnson",    "first_name": "Mark",    "last_name": "Johnson",    "customer_status": "current",    "prospect_status": "none",    "title": "CEO",    "description": "I know him via Tom",    "industry": "Design Services",    "website": "http://www.designservice.com",    "email": "[email protected]",    "phone": "508-778-6516",    "mobile": "508-778-6516",    "fax": "+44-208-1234567",    "twitter": "mjohnson",    "facebook": "mjohnson",    "linkedin": "mjohnson",    "skype": "mjohnson",    "address": {      "line1": "2726 Smith Street",      "city": "Hyannis",      "postal_code": "02601",      "state": "MA",      "country": "US"    },    "billing_address": {      "line1": "2726 Smith Street",      "city": "Hyannis",      "postal_code": "02601",      "state": "MA",      "country": "US"    },    "shipping_address": {      "line1": null,      "city": null,      "postal_code": null,      "state": null,      "country": null    },    "tags": [      "contractor",      "early-adopter"    ],    "custom_fields": {      "referral_website": "http://www.example.com"    },    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T16:32:56Z"  },  "meta": {    "type": "contact"  }}

Delete a contact

DELETE /v2/contacts/:id

Delete an existing contact. If the specified contact does not exist, the request will return an error. This operation cannot be undone.

Parameters

NameRequiredTypeInDescription
idtruenumberQueryThe unique identifier of the contact.

Allowed for

  • Agents

Using cURL

curl -v -X DELETE https://api.getbase.com/v2/contacts/1 \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 204 No Content

Upsert a contact

POST /v2/contacts/upsert

Create a new contact or update an existing, based on a value of a filter or a set of filters. At least a single filter - query parameter - is required. If no parameters are present, the request will return an error.

Behaviour:

  1. If multiple contacts match a set of filters, the request will return an error - 409.
  2. If a single contact matches, then the existing contact is updated
  3. If none matches the query, a new contact is created

Notice Use Upsert API, instead of Create or Update, to avoid creating unwanted, duplicated records. Also very useful if you want Sell to carry external system ids - stored as custom fields.

Parameters

NameRequiredTypeInDescription
creator_idfalsenumberBodyUser ID. Returns all contacts created by that user.
owner_idfalsenumberBodyUser ID. Returns all contacts owned by that user.
is_organizationfalsebooleanBodyIndicates whether or not this contact refers to an organization or an individual.
contact_idfalsenumberBodyThe unique identifier of the organization that the contact belongs to.
parent_organization_idfalsenumberBodyThe unique identifier of a contact that should be set as parent for this organization. Setting this to null will clear existing parent relation. Referenced contact also has to be an organization. It can be set only for organization contacts (is_organization set to true.
namefalsestringBodyName of the contact.
first_namefalsestringBodyFirst name of the contact.
last_namefalsestringBodyLast name of the contact.
emailfalsestringBodyEmail address of the contact.
phonefalsestringBodyPhone number of the contact.
mobilefalsestringBodyMobile phone number of the contact.
customer_statusfalsestringBodyCustomer status of the contact. Possible values: none, current, past
prospect_statusfalsestringBodyProspect status of the contact. Possible values: none, current, lost
address[city]falsestringBodyCity name.
address[postal_code]falsestringBodyZip code or equivalent
address[country]falsestringBodyCountry name.
billing_addressfalseAddressBodyCan be updated if contact is either a customer or a prospect (see customer_status and prospect_status fields for details).
shipping_addressfalseAddressBodyCan be updated if contact is either a customer or a prospect (see customer_status and prospect_status fields for details).
custom_fieldsfalsestringBodyFilterable custom field. Example: To perform upsert on a contact with a custom field named "external_id" that has a value of "SKU01", use the following: ?custom_fields[external_id]=SKU01. Custom fields must be defined and have a Filterable property assigned to them. Supported custom field types: Number, Single Line Text, Dropdown, Multi Select.
inclusivefalsebooleanBodyIndicates how filters should be combine. true value, the default, uses AND logic. false value uses OR logic to combine filters.

Allowed for

  • Agents

Using cURL

curl -v -X POST https://api.getbase.com/v2/contacts/upsert?custom_fields[external_id]=SKU01 \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN" \-d '{  "data": {    "address": {      "line1": "494 Oak Lane"    },    "custom_fields": {      "external_id": "SKU01"    }  }}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 2,    "creator_id": 1,    "owner_id": 1,    "is_organization": false,    "contact_id": 1,    "parent_organization_id": null,    "name": "Mark Johnson",    "first_name": "Mark",    "last_name": "Johnson",    "customer_status": "none",    "prospect_status": "none",    "title": "CEO",    "description": "I know him via Tom",    "industry": "Design Services",    "website": "http://www.designservice.com",    "email": "[email protected]",    "phone": "508-778-6516",    "mobile": "508-778-6516",    "fax": "+44-208-1234567",    "twitter": "mjohnson",    "facebook": "mjohnson",    "linkedin": "mjohnson",    "skype": "mjohnson",    "address": {      "line1": "494 Oak Lane",      "city": "Hyannis",      "postal_code": "02601",      "state": "MA",      "country": "US"    },    "billing_address": null,    "shipping_address": null,    "tags": [      "contractor",      "early-adopter"    ],    "custom_fields": {      "external_id": "SKU01",      "referral_website": "http://www.example.com"    },    "created_at": "2015-07-16T17:14:16Z",    "updated_at": "2014-08-27T16:32:56Z"  },  "meta": {    "type": "contact"  }}