Contacts+ API
Introduction
Contacts+ API is a set of HTTP endpoints that let you integrate with the Contacts+ consumer Applications, which can be found here https://app.contactsplus.com
Contacts+ API uses OAuth 2.0 for Authorization. You will need to register your app with us to obtain your OAuth Credentials.
Important
It's important to note that in order to use the Contacts+ API, your HTTP client must support SSL with Server Name Identification (SNI).
Authentication
Register Your App
To get started, you’ll need to visit https://app.contactsplus.com/apps to obtain your client_id and client_secret which will be used for authentication in your app.
Authorizing a User
To authorize a user, you’ll need to first send them to the Contacts+ authorization page. You will need to include your client_id
, your registered redirect_uri and a string containing a comma-separatated list of scopes as scope. For security purposes, we recommend including a state param. However, it is optional.
Example URL
https://app.contactsplus.com/oauth/authorize?client_id=<YOUR_CLIENT_ID>&redirect_uri=<YOUR_REGISTERED_REDIRECT_URI>&scope=<COMMA_SEPARATED_LIST_OF_SCOPES>&state=<OPTIONAL_STATE_PARAM>
Exchanging an Authorization Code
Once the user has authorized your app, they will be redirected to your supplied redirect_uri. The querystring will contain both a code parameter and a state parameter if state was supplied. You will then need to make a call to the Contacts+ API in order to exchange the code for a refresh_token and an access_token
Example Request
cURL
curl -XPOST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>&redirect_uri=<YOUR_REDIRECT_URI>&code=
<CODE>' \
"https://api.contactsplus.com/v3/oauth.exchangeAuthCode"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.oauth :as o]))
@(o/exchange-auth-code :client-id "" :client-secret "" :code
JavaScript
curl -XPOST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>&redirect_uri=<YOUR_REDIRECT_URI>&code=
<CODE>' \
"https://api.contactsplus.com/v3/oauth.exchangeAuthCode"
Request | |
---|---|
client_id string | The client id you received when you registered your app. |
client_secret string | The client secret you received when you registered your app. |
redirect_uri string | The redirect_uri that was used to generate the authorization code. |
code string | The code you received in the querystring. |
Example Response
JSON
{
"access_token_expiration": 1533315749330,
"access_token_expiration_date": "2018-08-03T17:02:44.627Z",
"refresh_token_expiration": 4089459764627,
"refresh_token_expiration_date": "2099-08-03T17:02:44.627Z",
"access_token": "abcd",
"refresh_token": "wxyz",
"scope": "account.read,contacts.read,tags.read"
}
Response | |
---|---|
access_token_expiration integer | The time in milliseconds that the Access Token will expire. |
access_token_expiration_date string | ISO8601 formatted date and time that the Access Token will expire. |
refresh_token_expiration integer | The time in milliseconds that the Refresh Token will expire. |
refresh_token_expiration_date string | ISO8601 formatted date and time that the Refresh Token will expire. |
access_token_expiration integer | The time in milliseconds that the Access Token will expire. |
access_token string | The Access Token you can use to make requests on behalf of the user. |
refresh_token string | The Refresh Token you can use to generate new Access Tokens. |
scope string | Comma-separated list of the authorized scope for the token set. |
Authorizing Requests
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json"
-d "{}" \
"https:/api.contactsplus.com/api/v1/account.get"}
Now that you’ve obtained an access_token
and refresh_token
you can now make requests on behalf of the user. To authorize your API requests, you’ll need to include a Bearer
token in the header of your request.
Refresh Access Token
Once an access token has expired you can obtain a new one by using the Refresh Token you were given.
Example Request
cURL
curl -XPOST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=&client_secret=&refresh_token=" \
"https://api.contactsplus.com/v3/oauth.refreshToken"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.oauth :as o]))
@(o/refresh-token :client-id "" :client-secret "" :refresh-token "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.oauth.refreshToken("");
//do something
};
Request | |
---|---|
client_id string | The client id you received when you registered your app. |
client_secret string | The client secret you received when you registered your app. |
refresh_token string | The refresh_token for the user. |
Example Response
JSON
{
"access_token_expiration": 1533315749330,
"access_token_expiration_date": "2018-08-03T17:02:44.627Z",
"access_token": "abcd"
}
Response | |
---|---|
access_token_expiration integer | The time in milliseconds that the Access Token will expire. |
access_token_expiration_date string | ISO8601 formatted date and time that the Access Token will expire. |
raccess_token_expiration integer | The time in milliseconds that the Access Token will expire. |
access_token string | The Access Token you can use to make requests on behalf of the user. |
Scopes
account.read | Reading user account information |
contacts.read | Read contact data |
contacts.write | Creating, updating and deleting contacts |
tags.read | Read tag data |
tags.write | Creating, updating and deleting tags |
teams.read | Reading team data |
teams.contacts.read | Reading team contact data |
teams.contacts.write | Creating, updating and deleting team contacts |
teams.tags.read | Reading team tag data |
teams.tags.write | Creating, Updating and deleting team tags |
Account
Fetches the authenticated user’s account information including name, photo, emails and more.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.contactsplus.com/api/v1/account.get"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.account :as a]))
@(a/get- "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.account.get("");
//do something
};
Example Response
JSON
{
"account": {
"accountId": "string",
"created": "string",
"updated": "string",
"profileData": {
"addresses": [
{
"type": "string",
"street": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string",
"extendedAddress": "string"
}
],
"birthday": "object",
"dates": [
{
"type": "string",
"month": "integer",
"day": "integer",
"year": "integer"
}
],
"emails": [
{
"type": "string",
"value": "string"
}
],
"name": {
"givenName": "string",
"familyName": "string",
"middleName": "string",
"prefix": "string",
"suffix": "string"
},
"relatedPeople": [
{
"type": "string",
"value": "string"
}
],
"organizations": [
{
"name": "string",
"department": "string",
"title": "string",
"location": "string",
"description": "string",
"startDate": "object",
"endDate": "object"
}
],
"urls": [
{
"type": "string",
"value": "string",
"username": "string",
"userId": "string"
}
],
"notes": "string",
"items": [
{
"type": "string",
"value": "string"
}
],
"ims": [
{
"type": "string",
"value": "string"
}
]
}
}
}
Contact Object
Contact Object Definition | |
---|---|
contactId string | ID of the contact |
etag string | The current etag of the contact |
contactMetadata.tagIds array | Tag IDS that are currently applied to the contact |
contactMetadata.ownedBy string | Account ID of the team member who is designated as the contact's owner (only returned for team contacts) |
contactMetadata.sharedBy array | Account IDs of team members who are sharing the contact (only returned for team contacts) |
created string | ISO8601 date the contact was created |
updated string | ISO8601 date the contact was last updated |
contactData.addresses[n].type string | The label for the address |
contactData.addresses[n].street string | The street address for the address |
contactData.addresses[n].city string | City of the address |
contactData.addresses[n].region string | City or Region of the address |
contactData.addresses[n].postalCode string | Postal or Zipcode for the address |
contactData.addresses[n].country string | Country for the address |
contactData.addresses[n].extendedAddress string | Street address line 2 |
contactData.birthday.month integer | Month of birth |
contactData.birthday.day integer | Day of birth |
contactData.birthday.year integer | Year of birth |
contactData.dates[n].type string | Label for the date |
contactData.dates[n].month integer | Month of the date |
contactData.dates[n].day integer | Day of the date |
contactData.dates[n].year integer | Year of the date |
contactData.emails[n].type string | Label for the email |
contactData.emails[n].value string | Email address |
contactData.name.givenName string | First or given name |
contactData.name.middleName string | Middle name |
contactData.name.familyName string | Last or family name |
contactData.name.prefix string | Prefix; Mr. Mrs. etc |
contactData.name.suffic string | Suffix; Jr, III, MD, etc |
contactData.phoneNumbers[n].type string | Label for the phone |
contactData.phoneNumbers[n].value string | Phone number |
contactData.relatedPeople[n].type string | Relationship; Spouse, Brother, etc |
contactData.relatedPeople[n].value string | Name of person |
contactData.organizations[n].name string | Name of the company or organization |
contactData.organizations[n].title string | Job title |
contactData.urls[n].type string | Label for URL |
contactData.urls[n].value string | URL |
contactData.notes string | Notes for contact |
contactData.ims[n].type string | Service name |
contactData.ims[n].value string | Username |
Get Contacts by IDs
Fetches one or more contacts by ID for the user or a team if teamId
is supplied.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "contactIds": [ "string" ], "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/contacts.get"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.contacts :as c]))
@(c/get- "" ["id"])
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.contacts.get("", { contactIds: ["abc"] });
//do something
};
Example Response
JSON
{
"contacts": [
{
"contactId": "string",
"teamId": "string",
"etag": "string",
"created": "string",
"updated": "string",
"contactData": {
"addresses": [
{
"type": "string",
"street": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string",
"extendedAddress": "string"
}
],
"birthday": "object",
"dates": [
{
"type": "string",
"month": "integer",
"day": "integer",
"year": "integer"
}
],
"emails": [
{
"type": "string",
"value": "string"
}
],
"name": {
"givenName": "string",
"familyName": "string",
"middleName": "string",
"prefix": "string",
"suffix": "string"
},
"phoneNumbers": [
{
"type": "string",
"value": "string"
}
],
"relatedPeople": [
{
"type": "string",
"value": "string"
}
],
"organizations": [
{
"name": "string",
"department": "string",
"title": "string",
"location": "string",
"description": "string",
"startDate": "object",
"endDate": "object"
}
],
"urls": [
{
"type": "string",
"value": "string",
"username": "string",
"userId": "string"
}
],
"notes": "string",
"items": [
{
"type": "string",
"value": "string"
}
],
"ims": [
{
"type": "string",
"value": "string"
}
]
},
"contactMetadata": {
"businessCardtranscriptionStatus": "string",
"companyContact": "boolean",
"tagIds": [
"string"
],
"sharedBy": [
"string"
]
}
}
]
}
Scroll Contacts
Allows you to scroll through an entire list of the user’s contacts using a scroll cursor for paging
Returns a list of contacts with a cursor
if more contacts exist than returned in the response.
A cursor
is a string representing “next page” that you can supply as “scrollCursor” in a subsequent API call to get more results
Note: Primary photos and organizations are the first item in the array.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "size": integer, "scrollCursor": "string", "includeDeletedContacts": "boolean", "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/contacts.scroll"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.contacts :as c]))
@(c/scroll- "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.contacts.scroll("", { });
//do something
};
Example Response
JSON
{
"size": integer,
"scrollCursor": "string",
"includeDeletedContacts": "boolean",
"teamId": "string"
}
Search Contacts
Full-text search for contacts. You can also used advanced search criteria and logical operators like AND
and OR
. Example: firstName:John AND company:Contacts+.
List of matching contacts will be returned. contacts array will be empty if no results were found.
cursor
will be present if there are more results to page through.
A cursor
is a string representing “next page” that you can supply as “scrollCursor” in a subsequent API call to get more results.
Note: Primary photos and organizations are the first item in the array.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "searchQuery": "string", "searchCursor": "string", "tagIds": [ "string" ], "teamId": "string" }' \
https://api.contactsplus.com/api/v1/contacts.search
Clojure
(ns com.example.core
(:require [full.contacts-api-client.contacts :as c]))
@(c/search- "" "title:Developer")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.contacts.search("", { searchQuery: "" });
//do something
};
Example Response
JSON
{
"contacts": [
{
"contactId": "string",
"teamId": "string",
"etag": "string",
"created": "string",
"updated": "string",
"contactData": {
"addresses": [
{
"type": "string",
"street": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string",
"extendedAddress": "string"
}
],
"birthday": "object",
"dates": [
{
"type": "string",
"month": "integer",
"day": "integer",
"year": "integer"
}
],
"emails": [
{
"type": "string",
"value": "string"
}
],
"name": {
"givenName": "string",
"familyName": "string",
"middleName": "string",
"prefix": "string",
"suffix": "string"
},
"phoneNumbers": [
{
"type": "string",
"value": "string"
}
],
"relatedPeople": [
{
"type": "string",
"value": "string"
}
],
"organizations": [
{
"name": "string",
"department": "string",
"title": "string",
"location": "string",
"description": "string",
"startDate": "object",
"endDate": "object"
}
],
"urls": [
{
"type": "string",
"value": "string",
"username": "string",
"userId": "string"
}
],
"notes": "string",
"items": [
{
"type": "string",
"value": "string"
}
],
"ims": [
{
"type": "string",
"value": "string"
}
]
},
"contactMetadata": {
"businessCardtranscriptionStatus": "string",
"companyContact": "boolean",
"tagIds": [
"string"
],
"sharedBy": [
"string"
]
}
}
],
"cursor": "string"
}
Create Contact
Creates a new contact in the user’s personal contacts or in a team’s contacts if teamId is provided.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "contact": { "contactData": { "addresses": [ { "type": "string", "street": "string",
"city": "string", "region": "string", "postalCode": "string", "country": "string",
"extendedAddress": "string" } ], "birthday": "object", "dates": [ { "type": "string",
"month": "integer", "day": "integer", "year": "integer" } ],
"emails": [ { "type": "string", "value": "string" } ], "name": { "givenName": "string",
"familyName": "string", "middleName": "string", "prefix": "string", "suffix": "string" },
"relatedPeople": [ { "type": "string", "value": "string" } ], "organizations": [ { "name": "string",
"department": "string", "title": "string", "location": "string", "description": "string",
"startDate": "object", "endDate": "object" } ], "urls": [ { "type": "string", "value": "string",
"username": "string", "userId": "string" } ], "notes": "string", "items": [ { "type": "string",
"value": "string" } ], "ims": [ { "type": "string", "value": "string" } ] } }, "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/contacts.create"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.contacts :as c]))
@(c/create- "" {:contactData {:name {:givenName "John"}}})
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.contacts.create("", { contact: { contactData:
{ name: { givenName: "Matt" }}} });
//do something
};
Example Response
JSON
{
"contact": {
"contactId": "string",
"teamId": "string",
"etag": "string",
"created": "string",
"updated": "string",
"contactData": {
"addresses": [
{
"type": "string",
"street": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string",
"extendedAddress": "string"
}
],
"birthday": "object",
"dates": [
{
"type": "string",
"month": "integer",
"day": "integer",
"year": "integer"
}
],
"emails": [
{
"type": "string",
"value": "string"
}
],
"name": {
"givenName": "string",
"familyName": "string",
"middleName": "string",
"prefix": "string",
"suffix": "string"
},
"phoneNumbers": [
{
"type": "string",
"value": "string"
}
],
"relatedPeople": [
{
"type": "string",
"value": "string"
}
],
"organizations": [
{
"name": "string",
"department": "string",
"title": "string",
"location": "string",
"description": "string",
"startDate": "object",
"endDate": "object"
}
],
"urls": [
{
"type": "string",
"value": "string",
"username": "string",
"userId": "string"
}
],
"notes": "string",
"items": [
{
"type": "string",
"value": "string"
}
],
"ims": [
{
"type": "string",
"value": "string"
}
]
},
"contactMetadata": {
"businessCardtranscriptionStatus": "string",
"companyContact": "boolean",
"tagIds": [
"string"
],
"sharedBy": [
"string"
]
}
}
}
Update Contact
Updates an existing contact in the user’s personal contacts or in a team’s contacts if teamId is provided.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "contact": { "contactId": "string", "etag": "string",
"contactData": { "addresses": [ { "type": "string", "street": "string", "city": "string",
"region": "string", "postalCode": "string", "country": "string", "extendedAddress": "string" } ],
"birthday": "object", "dates": [ { "type": "string", "month": "integer", "day": "integer",
"year": "integer" } ], "emails": [ { "type": "string", "value": "string" } ],
"name": { "givenName": "string", "familyName": "string", "middleName": "string", "prefix": "string",
"suffix": "string" }, "relatedPeople": [ { "type": "string", "value": "string" } ],
"organizations": [ { "name": "string", "department": "string", "title": "string", "location": "string",
"description": "string", "startDate": "object", "endDate": "object" } ],
"urls": [ { "type": "string", "value": "string", "username": "string", "userId": "string" } ],
"notes": "string", "items": [ { "type": "string", "value": "string" } ], "ims": [ { "type": "string",
"value": "string" } ] } }, "resolveConflicts": "boolean", "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/contacts.update"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.contacts :as c]))
@(c/update- "" {:contactId "abc"
:etag "xyz"
:contactData {:name {:givenName "John"}}})
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.contacts.update(
"",
{
contact: {
contactId: "xyz",
etag: "abc",
contactData: {
name: {
givenName: "Matt"
}
}
}
}
);
//do something
};
Example Response
JSON
{
"contact": {
"contactId": "string",
"teamId": "string",
"etag": "string",
"created": "string",
"updated": "string",
"contactData": {
"addresses": [
{
"type": "string",
"street": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string",
"extendedAddress": "string"
}
],
"birthday": "object",
"dates": [
{
"type": "string",
"month": "integer",
"day": "integer",
"year": "integer"
}
],
"emails": [
{
"type": "string",
"value": "string"
}
],
"name": {
"givenName": "string",
"familyName": "string",
"middleName": "string",
"prefix": "string",
"suffix": "string"
},
"phoneNumbers": [
{
"type": "string",
"value": "string"
}
],
"relatedPeople": [
{
"type": "string",
"value": "string"
}
],
"organizations": [
{
"name": "string",
"department": "string",
"title": "string",
"location": "string",
"description": "string",
"startDate": "object",
"endDate": "object"
}
],
"urls": [
{
"type": "string",
"value": "string",
"username": "string",
"userId": "string"
}
],
"notes": "string",
"items": [
{
"type": "string",
"value": "string"
}
],
"ims": [
{
"type": "string",
"value": "string"
}
]
},
"contactMetadata": {
"businessCardtranscriptionStatus": "string",
"companyContact": "boolean",
"tagIds": [
"string"
],
"sharedBy": [
"string"
]
}
}
}
Delete Contact
Deletes a contact in the user’s personal contacts or in a team’s contacts if teamId
is provided.
Example Response
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "contactId": "string", "etag": "string", "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/contacts.delete"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.contacts :as c]))
@(c/delete- "" "" "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.contacts.del(
"",
{
contactId: "abc",
etag: "xyz"
}
);
//do something
};
Upload Contact Photo
Prepends a new photo to a user or team contact. The photo will then become the user’s new default photo.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: multipart/form-data" \
-d 'image.png=file&contact.json=string' \
https://api.contactsplus.com/api/v1/contacts.uploadPhoto
Clojure
(ns com.example.core
(:require [full.contacts-api-client.contacts :as c]))
@(c/upload-photo- "" "contact-id" image)
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.contacts.uploadPhoto("", { contact: { contactId: "xyz"} }, new Buffer());
//do something
};
Example Response
JSON
{
"contact": {
"contactId": "string",
"teamId": "string",
"etag": "string",
"created": "string",
"updated": "string",
"contactData": {
"addresses": [
{
"type": "string",
"street": "string",
"city": "string",
"region": "string",
"postalCode": "string",
"country": "string",
"extendedAddress": "string"
}
],
"birthday": "object",
"dates": [
{
"type": "string",
"month": "integer",
"day": "integer",
"year": "integer"
}
],
"emails": [
{
"type": "string",
"value": "string"
}
],
"name": {
"givenName": "string",
"familyName": "string",
"middleName": "string",
"prefix": "string",
"suffix": "string"
},
"phoneNumbers": [
{
"type": "string",
"value": "string"
}
],
"relatedPeople": [
{
"type": "string",
"value": "string"
}
],
"organizations": [
{
"name": "string",
"department": "string",
"title": "string",
"location": "string",
"description": "string",
"startDate": "object",
"endDate": "object"
}
],
"urls": [
{
"type": "string",
"value": "string",
"username": "string",
"userId": "string"
}
],
"notes": "string",
"items": [
{
"type": "string",
"value": "string"
}
],
"ims": [
{
"type": "string",
"value": "string"
}
]
},
"contactMetadata": {
"businessCardtranscriptionStatus": "string",
"companyContact": "boolean",
"tagIds": [
"string"
],
"sharedBy": [
"string"
]
}
}
}
Change contact’s owner
Change or remove relationship owner >from one or more contacts in a team.
ownerId
is a team member’s accountId
from /api/v1/teams.get
response. Pass null
ownerId
to remove contacts’ owners.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "contactIds": [ "string" ], "ownerId": "string", "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/contacts.changeOwner"
Example Response
JSON
{
"contacts": [
{
"contactId": "string",
"teamId": "string",
"etag": "string",
"created": "string",
"updated": "string",
"contactData": {
"name": {
"familyName": "string",
"givenName": "string"
}
},
"contactMetadata": {
"businessCardtranscriptionStatus": "string",
"companyContact": "boolean",
"tagIds": [
"string"
],
"sharedBy": [
"string"
],
"ownedBy": "string"
}
}
]
}
Manage Tags
Add or remove tags from multiple contacts in the user’s personal contacts or in a team’s contacts if teamId
is provided.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "contactIds": [ "string" ], "addTagIds": [ "string" ], "removeTagIds": [ "string" ], "teamId":
"string" }' \
"https://api.contactsplus.com/api/v1/contacts.manageTags"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.contacts :as c]))
@(c/manage-tags- "" ["contact-ids"] :add-tag-ids ["tagid"])
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.contacts.manageTags(
"",
{
contactIds: ["abc"],
addTagIds: ["xyz"]
}
);
//do something
};
Example Response
JSON
{
"contacts": [
// Contacts that were tagged with the given tag id.
]
}
Tag Object
Tag Object Definition | |
---|---|
tagId string | ID of the tag |
etag string | The current etag of the tag |
created string | ISO8601 date the tag was created |
updated string | ISO8601 date the tag was last updated |
tagData.name string | The name of the tag |
Get Tags by ID
Fetches one or more private tags or team tags if teamId
is supplied.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "tagIds": [ "string" ], "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/tags.get"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.tags :as t]))
@(t/get- "" ["tag-ids"])
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.tags.get("", { tagIds: ["abc"] });
//do something
};
Example Response
JSON
{
"tags": [
{
"tagId": "string",
"created": "string",
"updated": "string",
"etag": "string",
"tagData": {
"name": "string"
}
}
]
}
Scroll Tags
Allows you to scroll through the user’s private tags or a team’s tags if teamId
is supplied. Paging is enabled via a scroll cursor.
Returns a list of tags. Response will contain a cursor
if more tags exist than were returned.
A cursor
is a string representing “next page” that you can supply as “scrollCursor” in a subsequent API call to get more results.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "size": integer, "scrollCursor": "string", "includeDeletedTags": "boolean", "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/tags.scroll"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.tags :as t]))
@(t/scroll- "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.tags.scroll("", { });
//do something
};
Example Response
JSON
{
"tags": [
{
"tagId": "string",
"created": "string",
"updated": "string",
"etag": "string",
"tagData": {
"name": "string"
}
}
],
"cursor": "string"
}
Create Tag
Creates a tag new private tag or a new team tag if teamId teamId
is supplied. If the tag already exists, the existing ID will be returned.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "tag": "object" }' \
"https://api.contactsplus.com/api/v1/tags.create"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.tags :as t]))
@(t/create- "" {:tagData {:name "Developers"}})
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.tags.create("", { tag: { tagData: { name: "Developers" }} });
//do something
};
Example Response
JSON
{
"tag": {
"tagId": "string",
"created": "string",
"updated": "string",
"etag": "string",
"tagData": {
"name": "string"
}
}
}
Edit Tag
Edits a user’s private tag or a team’s tag if teamId
is supplied.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "tag": { "tagId": "string", "etag": "string", "tagData": "object" }, "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/tags.update"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.tags :as t]))
@(t/get- "" {:tagId "abc"
:etag "xyz"
:tagData {:name "Contacts+ Developers"}})
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.tags.update(
"",
{
tagId: "xyz",
etag: "abc",
tag: {
tagData: {
name: "New Name"
}
}
}
);
//do something
};
Example Response
JSON
{
"tag": {
"tagId": "string",
"created": "string",
"updated": "string",
"etag": "string",
"tagData": {
"name": "string"
}
}
}
Delete Tag
Deletes a private tag or a team tag if teamId
is supplied.
Example Requeast
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "tagId": "string", "etag": "string", "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/tags.delete"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.tags :as t]))
@(t/delete- "" "" "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.tags.del(
"",
{
tagId: "xyz",
etag: "abc"
}
);
//do something
};
Get Teams
Gets a list of team’s that the user is a member of.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.contactsplus.com/api/v1/teams.get"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.teams :as t]))
@(t/get- "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.teams.get("");
//do something
};
Example Response
JSON
{
"teams": [
{
"teamId": "string",
"created": "string",
"updated": "string",
"teamData": "object",
"teamMembers": [
"object"
]
}
]
}
Get Webhooks by IDs
Fetches one or more webhooks that exist for the authorized user or team if teamId
is supplied.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "webhookIds": [ "string" ], "page": "integer", "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/webhooks.get"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.webhooks :as w]))
@(w/get- "" [""])
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.webhooks.get("", { webhookIds: ["xyz"] });
//do something
};
Example Response
JSON
{
"webhooks": [
{
"webhookId": "string",
"url": "string",
"triggers": [
"string"
],
"created": "string",
"accountId": "string"
}
]
}
Search Webhooks
Returns webhooks that match the search criteria for the user or the team if teamId
is supplied.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "url": "string", "page": "integer", "triggerIds": [ "string" ], "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/webhooks.search"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.webhooks :as w]))
@(w/search- "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.webhooks.search(
"",
{
url: ",
triggerIds: []
}
);
//do something
};
Example Response
JSON
{
"webhooks": [
{
"webhookId": "string",
"url": "string",
"triggers": [
"string"
],
"created": "string",
"accountId": "string"
}
]
}
Create Webhook
Creates a new webhook for the user or for the team if teamId
is supplied.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "url": "string", "triggerIds": [ "string" ], "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/webhooks.create"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.webhooks :as w]))
@(w/create- "" "" [""])
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.webhooks.create(
"",
{
url: "",
triggerIds: [""]
}
);
//do something
};
Example Response
JSON
{
"webhook": {
"webhookId": "string",
"url": "string",
"triggers": [
"string"
],
"created": "string",
"accountId": "string"
}
}
Delete Webhook
Deletes a webhook for a user or a team if teamId
is supplied.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "webhookId": "string", "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/webhooks.delete"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.webhooks :as w]))
@(w/delete- "" "")
JavaScript
ar cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.webhooks.del("", { webhookId: "" });
//do something
};
Get Webhook Batches
Returns a list of batches for a webhook by batchId
. Limited for batches that have happened in the last 14 days.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{ "webhookId": "string", "batchId": "string", "teamId": "string" }' \
"https://api.contactsplus.com/api/v1/webhooks.getBatches"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.webhooks :as w]))
@(w/get-batches- "" "" "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.webhooks.getBtaches(
"",
{
webhookId: "",
batchId: ""
}
);
//do something
};
Example Response
JSON
{
"batches": [
// ...
]
}
Webhook Triggers
Returns a list of all available triggers that can be used.
Example Request
cURL
curl -XPOST \
-H "Authorization: Bearer $access_token" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.contactsplus.com/api/v1/webhooks.getTriggers"
Clojure
(ns com.example.core
(:require [full.contacts-api-client.webhooks :as w]))
@(w/get-triggers- "")
JavaScript
var cplus = require('contacts-api-node')({
clientId: '',
clientSecret: '',
redirectUri: '',
scope: 'list,of,scopes',
userAgent: ''
});
const test = async () => {
const res = await cplus.contacts.webhooks.getTriggers("");
//do something
};
Example Response
JSON
{
"triggers": [
// 0 or more Trigger objects
]
}