List

Note

Keep in mind: if the user_ids parameter has no values, by default the list of messages from the accounts that belong to the token owner is shown.

List of messages with pagination

POST https://do.workzeal.com/common/list/paging/24

Path Parameters

Name Type Description
/24* Int Module ID

Query Parameters

Name Type Description
columns String List of columns
records_onpage Int Records per page, but no more than 500
page Int Page number
sorting_column String Sorting column
sorting_direction Int Sorting {0} Asc / {1} Desc

Headers

Name Type Description
Authorization* String Bearer XXXXX-XXXXXXX-XXXXX
Content-Type* String application/json
{
  "status": "success",
  "error": "",
  "code": null,
  "rows": 1,
  "pages": 1,
  "page": 1,
  "value": "[
       {"id":1,"subject":"Happy!"}
  ]"
{
    // Response
}

Example

curl --location --request
POST 'https://do.workzeal.com/common/list/paging/24
?records_onpage=50
&sorting_column=id
&user_ids=37
&sorting_direction=1
&date1=2021-01-01
&date2=2021-12-31
&page=1
&columns=id,subject,from,from_address,to,to_address,small_part_of_body' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXXXX.XXXXXXX.XXXXXX' \
--data-raw ''
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://do.workzeal.com/common/list/paging/24
  ?records_onpage=50
  &sorting_column=id
  &user_ids=37
  &sorting_direction=1
  &date1=2021-01-01
  &date2=2021-12-31
  &page=1
  &columns=id,subject,from,from_address,to,to_address,small_part_of_body',
  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_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer XXXXX.XXXXXX.XXXXXX'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://do.workzeal.com/common/list/paging/24
  ?records_onpage=50
  &sorting_column=id
  &user_ids=37
  &sorting_direction=1
  &date1=2021-01-01
  &date2=2021-12-31
  &page=1
  &columns=id,subject,from,from_address,to,to_address,small_part_of_body',
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer XXXXXXX.XXXXXXX.XXXXXXX'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Columns

Note

Note: columns with the company_ prefix contain information about the client, which can be either a legal entity or an individual. For a legal entity, company_name is the company name, and for an individual it is the individual's full name.

Name Description
id Message ID
from From, name or address
from_address Sender address
to To, name or address
to_address Recipient address
cc Recipient Cc
bcc Recipient Bcc
subject Subject
date Date
user_name Name of the account owner
company_name Client name
company_id Client ID
contact_id Contact person ID
contact Contact person name
company_type_id Client type ID
company_type Client type
company_category_id Client category ID
company_category Client category
company_status_id Client status ID
company_status Client status
deal Deal name
deal_id Deal ID
message_id Unique message ID generated by the mail server
attachment_flag Attachment flag (0/1)
small_part_of_body The first 255 characters of the message content
body

Message content in HTML format
⚡️
It is not recommended to include this column in large list requests. Whenever possible, retrieve a single message by id. Filter parameter id=xx

Filtering

Note

Note: two filtering methods can be used. Standard filtering by columns, or by the ID of a saved filter that was created inside the application. Learn more: filters in the application ⚡️

Filter columns


?id=1
?segment=1
?user_ids=1  or ?user_ids=1,3,5
?date1=2021-12-01
?date2=2021-12-31
?subject=Hapy!
?to_address="support@workzeal.com"
?from_address="support@workzeal.com"
?company_id=1
?deal_id=1
?page=1

// id - Message ID
// segment - Message folder ID (see the description)
// user_ids - ID of the user whose accounts to view
// date1 - From date (YYYY.MM.DD format)
// date2 - To date (YYYY.MM.DD format)
// subject - Message subject
// to_address - Recipient email address
// from_address - Sender email address (all messages for the deal)
// company_id - Client ID (all messages for the company)
// deal_id - Deal ID
// page - Number of the page to retrieve

⚡️user_ids

User IDs can be found in the Users section

Users

⚡️segment

  1. Inbox
  2. Sent
  3. Drafts
  4. Trash
  5. Spam
  6. More

Saved user filters


?user_filter_ids = 1
or
?user_filter_ids=1,2

⚡️ user_filter_ids

Filter IDs can be found in the Filters section

Filters

Previous
Next