This API method is used for creating a contact. Phone number or email address is mandatory, so you can set any one of the parameters (Phone number/email address) as required field.
Parameter | Required | Type | Description |
---|---|---|---|
apikey | yes | string | Your authorized API key |
secret | yes | string | Your authorized secret key |
user_id | yes | string | Unique ID of the user |
business_id | yes | string | Unique ID of the business |
tags | yes | number | Unique ID of the tags |
first_name | yes | string | User First Name |
last_name | no | string | User Last Name |
phone_number | yes | number | User Phone number |
email_address | yes | string | Email address of the user |
company | no | string | Name of the company |
profile_image | no | number | Profile image of the user |
{ "status": "success", "status_code": 200, "message": "Contact created successfully", "result": { "_id": "xxxxxxxxxxxx" } }
Error Code | Description |
---|---|
204 | No record found |
409 | The phone number / email address already exist in another contact |
605 | Invalid Id |
721 | A valid phone number is required |
782 | Invalid country code |
802 | Tag Not Found |
701 | User id parameter required |
702 | User id required |
701 | Business id parameter required |
702 | Business id required |
{ "status": "no_record", "status_code": 204, "message": "No record found", "result": { "response_type": "No Content" } }
{ "status": "conflict", "status_code": 409, "message": "The phone number / email address already exist in another contact.", "result": { "details": { "_id": "5ac60fa100d9893cb4f51d92", "phone_number": [ "91-8072919169" ], "email_address": [] }, "response_type": "Conflict" } }
{ "error": { "errors": [ { "reason": "Invalid Id", "message": "Please make sure you have provided the valid business id" } ], "code": 605, "error_type": "reference_error" } }
{ "error": { "errors": [ { "reason": "Length required", "message": "A valid phone number is required." } ], "code": 721, "error_type": "phone_length_error", "number_format": "+1-415123456,+1-415654321,etc..." } }
{ "error": { "errors": [ { "reason": "Invalid Country", "message": "Invalid country code provided." } ], "code": 782, "error_type": "invalid_code" } }
{ "error": { "errors": [ { "reason": "Invalid Tags", "message": "Tag id(s) that you provided doesn't match in our records." } ], "code": 802, "error_type": "tag_not_found" } }
{ "error": { "reason": "parameter missing", "message": "User id parameter required", "field_name": "user_id", "code": 701, "error_type": "missing_parameter" } }
{ "error": { "reason": "required field", "message": "User id is required", "code": 702, "error_type": "required" } }
{ "error": { "reason": "parameter missing", "message": "Business id parameter required", "field_name": "business_id", "code": 701, "error_type": "missing_parameter" } }
{ "error": { "reason": "required field", "message": "Business id required", "code": 702, "error_type": "required" } }
Loading please wait...