Create a contact

Create a new contact. All contacts are scoped to a particular team so a teamKey is required. When creating a contact you can provide all of the contact info in a single call. See the possible parameters below.

Contacts must have at least one of name or emailaddresses set.

Note: Including the parameter getIfExisting limits the parameters you can include in the call.

🚧

Content Type and Auth

Make sure to include -H "Content-Type: application/json" and your authorization in any request you make on your own.

Error

Example

Details

Missing parameters

{ "error": "Insufficient params for TeamContact", "success": false }

You might be missing the teamKey, emailAddresses, givenName, or familyName

Incorrect teamKey, API path has something mis-spelled or missing

{ "success": false }
OR
{ "error": "Invalid API path specified", "success": false }

We can't find the teamKey you've provided.

Need more information on the contact

"Need to specify at least a name or email address"

We require one of the following to create a contact:

  • givenName
  • familyName
  • emailAddresses

Need appropriate header

{ "error": "Missing parameters", "success": false }

If you do not have the header
-H "Content-Type: application/json" your call will return this error.

Duplicate email addresses

{ "error": "Contacts can't have duplicate emails: [email protected], "errorCode": 801, "success": false }

You can not pass duplicate email addresses, ie ["[email protected]", "[email protected]"]

❗️

Check if contact exists?

If the getIfExisting parameter is included, you can ONLY pass the parameter of emailAddresses.

Language
Authentication
Basic
base64
:
Click Try It! to start a request and see the response here!