All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
conversationsAgentOnlinePingPost | POST /conversations/agentOnlinePing | Sets agent’s status to online for 2-3 minutes |
conversationsMessagesIdDelete | DELETE /conversations/messages/{id} | Delete a message sent by an agent |
conversationsMessagesIdGet | GET /conversations/messages/{id} | Get a message |
conversationsMessagesIdPut | PUT /conversations/messages/{id} | Update a message sent by an agent |
conversationsMessagesPost | POST /conversations/messages | Send a message as an agent |
conversationsPushedMessagesIdDelete | DELETE /conversations/pushedMessages/{id} | Delete an automated message |
conversationsPushedMessagesIdGet | GET /conversations/pushedMessages/{id} | Get an automated message |
conversationsPushedMessagesIdPut | PUT /conversations/pushedMessages/{id} | Update an automated message |
conversationsPushedMessagesPost | POST /conversations/pushedMessages | Send an automated message to a visitor |
conversationsAgentOnlinePingPost(body)
Sets agent’s status to online for 2-3 minutes
We recommend pinging this endpoint every minute for as long as the agent has to be considered online.
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.ConversationsApi();
var body = new SibApiV3Sdk.Body12(); // Body12 | Agent fields.
apiInstance.conversationsAgentOnlinePingPost(body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | Body12 | Agent fields. |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
conversationsMessagesIdDelete(id)
Delete a message sent by an agent
Only agents’ messages can be deleted.
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.ConversationsApi();
var id = "id_example"; // String | ID of the message
apiInstance.conversationsMessagesIdDelete(id).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | ID of the message |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
ConversationsMessage conversationsMessagesIdGet(id)
Get a message
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.ConversationsApi();
var id = "id_example"; // String | ID of the message
apiInstance.conversationsMessagesIdGet(id).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | ID of the message |
- Content-Type: application/json
- Accept: application/json
ConversationsMessage conversationsMessagesIdPut(id, opts)
Update a message sent by an agent
Only agents’ messages can be edited.
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.ConversationsApi();
var id = "id_example"; // String | ID of the message
var opts = {
'body': new SibApiV3Sdk.Body9() // Body9 |
};
apiInstance.conversationsMessagesIdPut(id, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | ID of the message | |
body | Body9 | [optional] |
- Content-Type: application/json
- Accept: application/json
ConversationsMessage conversationsMessagesPost(body)
Send a message as an agent
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.ConversationsApi();
var body = new SibApiV3Sdk.Body8(); // Body8 | Message fields.
apiInstance.conversationsMessagesPost(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | Body8 | Message fields. |
- Content-Type: application/json
- Accept: application/json
conversationsPushedMessagesIdDelete(id)
Delete an automated message
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.ConversationsApi();
var id = "id_example"; // String | ID of the message
apiInstance.conversationsPushedMessagesIdDelete(id).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | ID of the message |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
ConversationsMessage conversationsPushedMessagesIdGet(id)
Get an automated message
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.ConversationsApi();
var id = "id_example"; // String | ID of the message sent previously
apiInstance.conversationsPushedMessagesIdGet(id).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | ID of the message sent previously |
- Content-Type: application/json
- Accept: application/json
ConversationsMessage conversationsPushedMessagesIdPut(id, body)
Update an automated message
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.ConversationsApi();
var id = "id_example"; // String | ID of the message
var body = new SibApiV3Sdk.Body11(); // Body11 |
apiInstance.conversationsPushedMessagesIdPut(id, body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
id | String | ID of the message | |
body | Body11 |
- Content-Type: application/json
- Accept: application/json
ConversationsMessage conversationsPushedMessagesPost(body)
Send an automated message to a visitor
Example of automated messages: order status, announce new features in your web app, etc.
var SibApiV3Sdk = require('sib-api-v3-sdk');
var defaultClient = SibApiV3Sdk.ApiClient.instance;
// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix = 'Token';
var apiInstance = new SibApiV3Sdk.ConversationsApi();
var body = new SibApiV3Sdk.Body10(); // Body10 |
apiInstance.conversationsPushedMessagesPost(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | Body10 |
- Content-Type: application/json
- Accept: application/json