All URIs are relative to https://api.pipedrive.com/v1.
Method | HTTP request | Description |
---|---|---|
addChannel() | POST /channels | Add a channel |
deleteChannel() | DELETE /channels/{id} | Delete a channel |
deleteConversation() | DELETE /channels/{channel-id}/conversations/{conversation-id} | Delete a conversation |
receiveMessage() | POST /channels/messages/receive | Receives an incoming message |
addChannel($channel_object): \Pipedrive\Model\ChannelObjectResponse
Add a channel
Adds a new messaging channel, only admins are able to register new channels. It will use the getConversations endpoint to fetch conversations, participants and messages afterward. To use the endpoint, you need to have Messengers integration OAuth scope enabled and the Messaging manifest ready for the Messaging app extension.
<?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\ChannelsApi(
// 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
);
$channel_object = new \Pipedrive\Model\ChannelObject(); // \Pipedrive\Model\ChannelObject
try {
$result = $apiInstance->addChannel($channel_object);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChannelsApi->addChannel: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
channel_object | \Pipedrive\Model\ChannelObject | [optional] |
\Pipedrive\Model\ChannelObjectResponse
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteChannel($id): \Pipedrive\Model\DeleteChannelSuccess
Delete a channel
Deletes an existing messenger’s channel and all related entities (conversations and messages). To use the endpoint, you need to have Messengers integration OAuth scope enabled and the Messaging manifest ready for the Messaging app extension.
<?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\ChannelsApi(
// 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 = 'id_example'; // string | The ID of the channel provided by the integration
try {
$result = $apiInstance->deleteChannel($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChannelsApi->deleteChannel: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The ID of the channel provided by the integration |
\Pipedrive\Model\DeleteChannelSuccess
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteConversation($channel_id, $conversation_id): \Pipedrive\Model\DeleteConversationSuccess
Delete a conversation
Deletes an existing conversation. To use the endpoint, you need to have Messengers integration OAuth scope enabled and the Messaging manifest ready for the Messaging app extension.
<?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\ChannelsApi(
// 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
);
$channel_id = 'channel_id_example'; // string | The ID of the channel provided by the integration
$conversation_id = 'conversation_id_example'; // string | The ID of the conversation provided by the integration
try {
$result = $apiInstance->deleteConversation($channel_id, $conversation_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChannelsApi->deleteConversation: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
channel_id | string | The ID of the channel provided by the integration | |
conversation_id | string | The ID of the conversation provided by the integration |
\Pipedrive\Model\DeleteConversationSuccess
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
receiveMessage($message_object): \Pipedrive\Model\InlineResponse200
Receives an incoming message
Adds a message to a conversation. To use the endpoint, you need to have Messengers integration OAuth scope enabled and the Messaging manifest ready for the Messaging app extension.
<?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\ChannelsApi(
// 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
);
$message_object = new \Pipedrive\Model\MessageObject(); // \Pipedrive\Model\MessageObject
try {
$result = $apiInstance->receiveMessage($message_object);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ChannelsApi->receiveMessage: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
message_object | \Pipedrive\Model\MessageObject | [optional] |
\Pipedrive\Model\InlineResponse200
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]