Phones and emails

Endpoints for adding communication channels to a client or a contact person: phones and email addresses are added to the client card by its ID, or to a contact person if you pass contact_id. Changing the fields of the client card itself is described on the Update client page.

Note

The client ID is returned in the value field when adding a client, or it can be found through the list of clients.

Adding a phone

POST https://do.workzeal.com/company/phone/insert

Request Body

Name Type Description
company_id* Int Client ID
phone* String Phone
descr String Phone type (Reception, Mobile, Orders)
contact_id Int Contact person ID; the phone will be linked to them
{
    "company_id" : 368132,
    "phone" : "+1 212 555-0187",
    "descr" : "Office"
}

Adding an email

POST https://do.workzeal.com/company/email/insert

Request Body

Name Type Description
company_id* Int Client ID
email* String Email
contact_id Int Contact person ID; the address will be linked to them
{
    "company_id" : 368132,
    "email" : "info@example.com"
}

Note

Adding and updating the contact persons themselves (people) is described on the Add and Update pages.

Example

curl --location --request POST 'https://do.workzeal.com/company/phone/insert' \
--header 'Authorization: Bearer XXXX-XXXXXXX-XXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
    "company_id" : 368132,
    "phone" : "+1 212 555-0187",
    "descr" : "Office"
  }
  '
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://do.workzeal.com/company/phone/insert',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "company_id" : 368132,
    "phone" : "+1 212 555-0187",
    "descr" : "Office"
  }
  ',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer XXXXX-XXXXXXX-XXXXXXXXX',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://do.workzeal.com/company/phone/insert',
  'headers': {
    'Authorization': 'Bearer XXXX-XXXXXXX-XXXXXXX',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "company_id": 368132,
    "phone": "+1 212 555-0187",
    "descr": "Office"
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Directories

For clients

Users

Response

{
  "status": "success",
  "error": "",
  "code": null,
  "rows": 0,
  "pages": 0,
  "page": 0,
  "value": "193769"
}
// value - ID of the new record (phone or email)
Previous
Next