All URIs are relative to https://api.{environment}
Method | HTTP request | Description |
---|---|---|
changeReadFlagOnThreadPUT | PUT /messaging/threads/{threadId}/read | Mark a particular thread as read |
deleteMessageDELETE | DELETE /messaging/messages/{messageId} | Delete single message |
downloadAttachmentGET | GET /messaging/message-attachments/{attachmentId} | Download attachment |
getMessageGET | GET /messaging/messages/{messageId} | Get single message |
getThreadGET | GET /messaging/threads/{threadId} | Get user thread |
listMessagesGET | GET /messaging/threads/{threadId}/messages | List messages in thread |
listThreadsGET | GET /messaging/threads | List user threads |
newAttachmentDeclarationPOST | POST /messaging/message-attachments | Add attachment declaration |
newMessageInThreadPOST | POST /messaging/threads/{threadId}/messages | Write a new message in thread |
newMessagePOST | POST /messaging/messages | Write a new message |
uploadAttachmentPUT | PUT /messaging/message-attachments/{attachmentId} | Upload attachment binary data |
\Swagger\Client\Model\Thread changeReadFlagOnThreadPUT($body, $thread_id)
Mark a particular thread as read
Use this resource to mark thread with provided identifier as read.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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
);
$body = new \Swagger\Client\Model\ThreadReadFlag(); // \Swagger\Client\Model\ThreadReadFlag | Updated read flag
$thread_id = "thread_id_example"; // string | Identifier of thread to be marked.
try {
$result = $apiInstance->changeReadFlagOnThreadPUT($body, $thread_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->changeReadFlagOnThreadPUT: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\ThreadReadFlag | Updated read flag | |
thread_id | string | Identifier of thread to be marked. |
- Content-Type: application/vnd.allegro.public.v1+json
- Accept: application/vnd.allegro.public.v1+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteMessageDELETE($message_id)
Delete single message
Use this resource to delete message with provided identifier.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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_id = "message_id_example"; // string | Identifier of the message to delete.
try {
$apiInstance->deleteMessageDELETE($message_id);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->deleteMessageDELETE: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
message_id | string | Identifier of the message to delete. |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string downloadAttachmentGET($attachment_id)
Download attachment
Use this resource to download attachment with provided identifier.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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
);
$attachment_id = "attachment_id_example"; // string | Identifier of the attachment that will be downloaded.
try {
$result = $apiInstance->downloadAttachmentGET($attachment_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->downloadAttachmentGET: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
attachment_id | string | Identifier of the attachment that will be downloaded. |
string
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Message getMessageGET($message_id)
Get single message
Use this resource to get message with provided identifier.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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_id = "message_id_example"; // string | Identifier of message to be returned.
try {
$result = $apiInstance->getMessageGET($message_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->getMessageGET: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
message_id | string | Identifier of message to be returned. |
- Content-Type: Not defined
- Accept: application/vnd.allegro.public.v1+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Thread getThreadGET($thread_id)
Get user thread
Use this resource to get thread with provided identifier.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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
);
$thread_id = "thread_id_example"; // string | Identifier of thread to get.
try {
$result = $apiInstance->getThreadGET($thread_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->getThreadGET: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
thread_id | string | Identifier of thread to get. |
- Content-Type: Not defined
- Accept: application/vnd.allegro.public.v1+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\MessagesList listMessagesGET($thread_id, $limit, $offset, $before, $after)
List messages in thread
Use this resource to list messages in thread with provided identifier.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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
);
$thread_id = "thread_id_example"; // string | Identifier of thread to get messages from.
$limit = 20; // int | The maximum number of messages returned in the response.
$offset = 0; // int | Index of the first returned message from all results.
$before = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Message creation date before filter parameter (exclusive) - cannot be used with offset.
$after = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Message creation date after filter parameter (exclusive).
try {
$result = $apiInstance->listMessagesGET($thread_id, $limit, $offset, $before, $after);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->listMessagesGET: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
thread_id | string | Identifier of thread to get messages from. | |
limit | int | The maximum number of messages returned in the response. | [optional] [default to 20] |
offset | int | Index of the first returned message from all results. | [optional] [default to 0] |
before | \DateTime | Message creation date before filter parameter (exclusive) - cannot be used with offset. | [optional] |
after | \DateTime | Message creation date after filter parameter (exclusive). | [optional] |
\Swagger\Client\Model\MessagesList
- Content-Type: Not defined
- Accept: application/vnd.allegro.public.v1+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\ThreadsList listThreadsGET($limit, $offset)
List user threads
Use this resource to get the list of user threads sorted by last message date, starting from newest.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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
);
$limit = 20; // int | The maximum number of threads returned in the response.
$offset = 0; // int | Index of the first returned thread from all results.
try {
$result = $apiInstance->listThreadsGET($limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->listThreadsGET: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
limit | int | The maximum number of threads returned in the response. | [optional] [default to 20] |
offset | int | Index of the first returned thread from all results. | [optional] [default to 0] |
\Swagger\Client\Model\ThreadsList
- Content-Type: Not defined
- Accept: application/vnd.allegro.public.v1+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\MessageAttachmentId newAttachmentDeclarationPOST($body)
Add attachment declaration
Use this resource to add attachment declaration before uploading.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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
);
$body = new \Swagger\Client\Model\NewAttachmentDeclaration(); // \Swagger\Client\Model\NewAttachmentDeclaration |
try {
$result = $apiInstance->newAttachmentDeclarationPOST($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->newAttachmentDeclarationPOST: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\NewAttachmentDeclaration |
\Swagger\Client\Model\MessageAttachmentId
- Content-Type: application/vnd.allegro.public.v1+json
- Accept: application/vnd.allegro.public.v1+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Message newMessageInThreadPOST($body, $thread_id)
Write a new message in thread
Use this resource to write new message in existing thread.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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
);
$body = new \Swagger\Client\Model\NewMessageInThread(); // \Swagger\Client\Model\NewMessageInThread |
$thread_id = "thread_id_example"; // string | Identifier of thread to write message to.
try {
$result = $apiInstance->newMessageInThreadPOST($body, $thread_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->newMessageInThreadPOST: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\NewMessageInThread | ||
thread_id | string | Identifier of thread to write message to. |
- Content-Type: application/vnd.allegro.public.v1+json
- Accept: application/vnd.allegro.public.v1+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Message newMessagePOST($body)
Write a new message
Use this resource to write new message to recipient.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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
);
$body = new \Swagger\Client\Model\NewMessage(); // \Swagger\Client\Model\NewMessage | Object representing new message.
try {
$result = $apiInstance->newMessagePOST($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->newMessagePOST: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\NewMessage | Object representing new message. |
- Content-Type: application/vnd.allegro.public.v1+json
- Accept: application/vnd.allegro.public.v1+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\MessageAttachmentId uploadAttachmentPUT($body, $attachment_id)
Upload attachment binary data
Use this resource to upload attachment using identifier that was declared.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: bearer-token-for-user
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Swagger\Client\Api\MessageCenterApi(
// 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
);
$body = new \Swagger\Client\Model\Object(); // Object |
$attachment_id = "attachment_id_example"; // string | The identifier of attachment that will be uploaded.
try {
$result = $apiInstance->uploadAttachmentPUT($body, $attachment_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageCenterApi->uploadAttachmentPUT: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | Object | ||
attachment_id | string | The identifier of attachment that will be uploaded. |
\Swagger\Client\Model\MessageAttachmentId
- Content-Type: image/png, image/gif, image/bmp, image/tiff, image/jpeg, application/pdf
- Accept: application/vnd.allegro.public.v1+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]