All URIs are relative to https://api.saasgrids.com/apis/crms/
Method | HTTP request | Description |
---|---|---|
createEmail | POST /{userId}/emails | Creates a new email |
deleteEmailById | DELETE /{userId}/emails/{emailObjectId} | Delete email by Id |
getAllEmails | GET /{userId}/emails | Get all emails |
getEmailById | GET /{userId}/emails/{emailObjectId} | Get email by Id |
updateEmailById | PUT /{userId}/emails/{emailObjectId} | Update email by Id |
Email createEmail(userId, body)
Creates a new email
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.EmailsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Email(); // Email | Email object that needs to be created
apiInstance.createEmail(userId, body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Email object that needs to be created |
- Content-Type: application/json
- Accept: application/json
deleteEmailById(userId, emailObjectId)
Delete email by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.EmailsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var emailObjectId = "emailObjectId_example"; // String | ObjectId of task to be deleted
apiInstance.deleteEmailById(userId, emailObjectId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
emailObjectId | String | ObjectId of task to be deleted |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
[Email] getAllEmails(userId, email)
Get all emails
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.EmailsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var email = "email_example"; // String | Email id of the email
apiInstance.getAllEmails(userId, email).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
String | Email id of the email |
- Content-Type: application/json
- Accept: application/json
Email getEmailById(userId, emailObjectId)
Get email by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.EmailsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var emailObjectId = "emailObjectId_example"; // String | ObjectId of email
apiInstance.getEmailById(userId, emailObjectId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
emailObjectId | String | ObjectId of email |
- Content-Type: application/json
- Accept: application/json
updateEmailById(userId, body, emailObjectId)
Update email by Id
var crms = require('saasgrids');
var defaultClient = crms.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new crms.EmailsApi();
var userId = "userId_example"; // String | User instance id returned from saasgrids after authorization
var body = new crms.Email(); // Email | Email object that needs to be updated
var emailObjectId = "emailObjectId_example"; // String | ObjectId of task to be deleted
apiInstance.updateEmailById(userId, body, emailObjectId).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
userId | String | User instance id returned from saasgrids after authorization | |
body | Email object that needs to be updated | ||
emailObjectId | String | ObjectId of task to be deleted |
null (empty response body)
- Content-Type: application/json
- Accept: application/json