Add a Company Contact

Add a new company contact.

Request URL

POST {base_url}/{api_path}/company_contact/create?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
first_name Yes String First name.
last_name No String Last name.
company No String Company.
email No String Email address.
phonebook_id_list No Array<Integer> The ID(s) of the phonebook to which the contact belongs.
Note:
remark No String Remark.
number_list Yes Array<Number_List> The list of company contact's numbers.
zip_code No String ZIP code.
street No String Street.
city No String City.
state No String State.
country No String Country.
Number_List
Table 2.
Parameter Type Description
num_type String Number type.
  • business_number
  • business_number2
  • business_fax
  • mobile_number
  • mobile_number2
  • home_number
  • home_number2
  • home_fax
  • other_number
number String Telephone number.

Response parameters

Table 3.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
id Integer The unique ID of the company contact.

Examples

Request example

POST /openapi/v1.0/company_contact/create?access_token=vtkE9as9ILt8D7zd20beBzd8dL2uTcOL HTTP/1.1  
Host: 192.168.5.150:8088
Content-Type: application/json
{
    "first_name": "Example",
    "last_name": "Li",
    "company": "Yeastar",
    "email": "liexample@icloud.com",
    "phonebook_id_list": [
        5,6
    ],
    "remark": "contact_for_test",
    "zip_code": "361022",
    "street": "Software Park III",
    "city": "Xiamen",
    "state": "",
    "country": "China",
    "number_list": [
        {
            
            "num_type": "business_number",
            "number": "12333333"
        }
    ]
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "id": 31
}