Skip to content

Latest commit

 

History

History
419 lines (290 loc) · 13.4 KB

MailboxApi.md

File metadata and controls

419 lines (290 loc) · 13.4 KB

Pipedrive\MailboxApi

All URIs are relative to https://api.pipedrive.com/v1.

Method HTTP request Description
deleteMailThread() DELETE /mailbox/mailThreads/{id} Delete mail thread
getMailMessage() GET /mailbox/mailMessages/{id} Get one mail message
getMailThread() GET /mailbox/mailThreads/{id} Get one mail thread
getMailThreadMessages() GET /mailbox/mailThreads/{id}/mailMessages Get all mail messages of mail thread
getMailThreads() GET /mailbox/mailThreads Get mail threads
updateMailThreadDetails() PUT /mailbox/mailThreads/{id} Update mail thread details

deleteMailThread()

deleteMailThread($id): \Pipedrive\Model\MailThreadDelete

Delete mail thread

Marks a mail thread as deleted.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\MailboxApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | The ID of the mail thread

try {
    $result = $apiInstance->deleteMailThread($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailboxApi->deleteMailThread: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the mail thread

Return type

\Pipedrive\Model\MailThreadDelete

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMailMessage()

getMailMessage($id, $include_body): \Pipedrive\Model\MailMessage

Get one mail message

Returns data about a specific mail message.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\MailboxApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | The ID of the mail message to fetch
$include_body = new \Pipedrive\Model\\Pipedrive\Model\NumberBooleanDefault0(); // \Pipedrive\Model\NumberBooleanDefault0 | Whether to include the full message body or not. `0` = Don't include, `1` = Include

try {
    $result = $apiInstance->getMailMessage($id, $include_body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailboxApi->getMailMessage: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the mail message to fetch
include_body \Pipedrive\Model\NumberBooleanDefault0 Whether to include the full message body or not. `0` = Don't include, `1` = Include [optional]

Return type

\Pipedrive\Model\MailMessage

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMailThread()

getMailThread($id): \Pipedrive\Model\MailThreadOne

Get one mail thread

Returns a specific mail thread.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\MailboxApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | The ID of the mail thread

try {
    $result = $apiInstance->getMailThread($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailboxApi->getMailThread: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the mail thread

Return type

\Pipedrive\Model\MailThreadOne

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMailThreadMessages()

getMailThreadMessages($id): \Pipedrive\Model\MailThreadMessages

Get all mail messages of mail thread

Returns all the mail messages inside a specified mail thread.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\MailboxApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | The ID of the mail thread

try {
    $result = $apiInstance->getMailThreadMessages($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailboxApi->getMailThreadMessages: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the mail thread

Return type

\Pipedrive\Model\MailThreadMessages

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMailThreads()

getMailThreads($folder, $start, $limit): \Pipedrive\Model\MailThread

Get mail threads

Returns mail threads in a specified folder ordered by the most recent message within.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\MailboxApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$folder = 'inbox'; // string | The type of folder to fetch
$start = 0; // int | Pagination start
$limit = 56; // int | Items shown per page

try {
    $result = $apiInstance->getMailThreads($folder, $start, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailboxApi->getMailThreads: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
folder string The type of folder to fetch [default to 'inbox']
start int Pagination start [optional] [default to 0]
limit int Items shown per page [optional]

Return type

\Pipedrive\Model\MailThread

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateMailThreadDetails()

updateMailThreadDetails($id, $deal_id, $lead_id, $shared_flag, $read_flag, $archived_flag): \Pipedrive\Model\MailThreadPut

Update mail thread details

Updates the properties of a mail thread.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = (new Pipedrive\Configuration())->setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = (new Pipedrive\Configuration())->setApiKeyPrefix('api_token', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2
$config = (new Pipedrive\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Pipedrive\Api\MailboxApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | The ID of the mail thread
$deal_id = 56; // int | The ID of the deal this thread is associated with
$lead_id = 'lead_id_example'; // string | The ID of the lead this thread is associated with
$shared_flag = new \Pipedrive\Model\NumberBoolean(); // \Pipedrive\Model\NumberBoolean | Whether this thread is shared with other users in your company
$read_flag = new \Pipedrive\Model\NumberBoolean(); // \Pipedrive\Model\NumberBoolean | Whether this thread is read or unread
$archived_flag = new \Pipedrive\Model\NumberBoolean(); // \Pipedrive\Model\NumberBoolean | Whether this thread is archived or not. You can only archive threads that belong to Inbox folder. Archived threads will disappear from Inbox.

try {
    $result = $apiInstance->updateMailThreadDetails($id, $deal_id, $lead_id, $shared_flag, $read_flag, $archived_flag);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MailboxApi->updateMailThreadDetails: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int The ID of the mail thread
deal_id int The ID of the deal this thread is associated with [optional]
lead_id string The ID of the lead this thread is associated with [optional]
shared_flag NumberBoolean Whether this thread is shared with other users in your company [optional]
read_flag NumberBoolean Whether this thread is read or unread [optional]
archived_flag NumberBoolean Whether this thread is archived or not. You can only archive threads that belong to Inbox folder. Archived threads will disappear from Inbox. [optional]

Return type

\Pipedrive\Model\MailThreadPut

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]