Contact API

Index

Endpoint

Method URI Headers
GET /v3/contacts Default

This endpoint returns user's contacts.

URL Params

None

{info} After being redirected to $redirectURL, it will include code in the querystring which you need to include in the token request below.


Create

Endpoint

Method URI Headers
POST /v3/contacts Default

This endpoint creates a contact on the server. If group_id is specified, the contact will be available in the associated group.

Form Params

{
    "name"    : $name, 
    "email"     : $email, 
    "personal_number" : $personalNumber,
    "work_number"      : $workNumber,
    "address"      : $address,
    "city"    : $city,
    "state"    : $state,
    "zipcode"     : $zipcode,
    "country"    : $country,
    "company_name" : $companyName
    "group_id"      : $groupId,
    "referrer_id"      : $referrerId,
    "business_category_id"     : $businessCategoryId
}

Response

{
    "id": 28001,
    "name": "John Smith",
    "email": "jsmith@jsmith.com",
    "personal_number": null,
    "work_number": null,
    "street": null,
    "city": null,
    "state": null,
    "zipcode": null,
    "address": "   ",
    "company": null,
    "business_category_id": null,
    "business_category_name": "",
    "referrer_id": null,
    "referrer_name": "",
    "group_id": "306",
    "user_id": 41,
    "created_at": "2023-02-10 20:19:13",
    "updated_at": "2023-02-11 00:49:29"
}

{info} If a contact with same email already exists, this API will update the existing contact. If storing contact in a group, user must be a member of the group.


Update

Endpoint

Method URI Headers
PATCH /v3/contacts/{id} Default

This endpoint updates an existing contact.

Form Params

{
    "name"    : $name, 
    "email"     : $email, 
    "personal_number" : $personalNumber,
    "work_number"      : $workNumber,
    "address"      : $address,
    "city"    : $city,
    "state"    : $state,
    "zipcode"     : $zipcode,
    "country"    : $country,
    "company_name" : $companyName
    "group_id"      : $groupId,
    "referrer_id"      : $referrerId,
    "business_category_id"     : $businessCategoryId
}

Response

{
    "id": 28001,
    "name": "John Smith",
    "email": "jsmith@jsmith.com",
    "personal_number": null,
    "work_number": null,
    "street": null,
    "city": null,
    "state": null,
    "zipcode": null,
    "address": "   ",
    "company": null,
    "business_category_id": null,
    "business_category_name": "",
    "referrer_id": null,
    "referrer_name": "",
    "group_id": "306",
    "created_at": "2023-02-10 20:19:13",
    "updated_at": "2023-02-11 00:49:29"
}

{info} If you are updating email and another contact already exists with the same email, it will return an error.


Delete

Endpoint

Method URI Headers
DELETE /v3/contacts/{id} Default

This endpoint deletes a contact on the server.

Form Params

None

Response

{
    "message": "success"
}

{info} Contact can only be deleted by same user who created the contact.