Messaging APIs v1.0 - 2024-11-19 14:31 UTC
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
All the requests are required to be authorized using an API Key authentication. Adding x-api-key in the header with your unique API Key as a value will grant access. To get your x-api-key visit documentation
Base URLs:
License: Apache License Version 2.0
Authentication
- API Key (X_API_KEY)
- Parameter Name: x-api-key, in: header.
Configuration
API’s for configuration management
Channels List
Code samples
# You can also use wget
curl -X GET /api.mehery.xyz/xms/api/v1/config/channels \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
GET /api.mehery.xyz/xms/api/v1/config/channels HTTP/1.1
Accept: */*
x-api-key: string
x-api-id: string
const headers = {
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/config/channels',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.get('/api.mehery.xyz/xms/api/v1/config/channels', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.get '/api.mehery.xyz/xms/api/v1/config/channels',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api.mehery.xyz/xms/api/v1/config/channels', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/config/channels");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api.mehery.xyz/xms/api/v1/config/channels", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/config/channels";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
GET /api/v1/config/channels
List of all the configured channelsPass sandbox=true if you want sandbox channels also to be part of list
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sabdnox | query | boolean | false | sabdnox |
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResultsMetaCompactResponse_MsgChannel_object_ |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Global Vars
Code samples
# You can also use wget
curl -X GET /api.mehery.xyz/xms/api/v1/config/global/vars \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
GET /api.mehery.xyz/xms/api/v1/config/global/vars HTTP/1.1
Accept: */*
x-api-key: string
x-api-id: string
const headers = {
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/config/global/vars',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.get('/api.mehery.xyz/xms/api/v1/config/global/vars', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.get '/api.mehery.xyz/xms/api/v1/config/global/vars',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api.mehery.xyz/xms/api/v1/config/global/vars', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/config/global/vars");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api.mehery.xyz/xms/api/v1/config/global/vars", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/config/global/vars";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
GET /api/v1/config/global/vars
List of global variables
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
channelId | query | string | false | channelId |
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResponse_CompanyVarsConfigDoc_object_ |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
HSM Templates
Code samples
# You can also use wget
curl -X GET /api.mehery.xyz/xms/api/v1/config/tmpl/hsm \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
GET /api.mehery.xyz/xms/api/v1/config/tmpl/hsm HTTP/1.1
Accept: */*
x-api-key: string
x-api-id: string
const headers = {
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/config/tmpl/hsm',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.get('/api.mehery.xyz/xms/api/v1/config/tmpl/hsm', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.get '/api.mehery.xyz/xms/api/v1/config/tmpl/hsm',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','/api.mehery.xyz/xms/api/v1/config/tmpl/hsm', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/config/tmpl/hsm");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api.mehery.xyz/xms/api/v1/config/tmpl/hsm", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakeGetRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/config/tmpl/hsm";
var result = await GetAsync(url);
}
/// Performs a GET Request
public async Task GetAsync(string url)
{
//Start the request
HttpResponseMessage response = await Client.GetAsync(url);
//Validate result
response.EnsureSuccessStatusCode();
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
GET /api/v1/config/tmpl/hsm
List of all the configured templatesPass channelId=
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
channelId | query | string | false | channelId |
channelStatus | query | string | false | channelStatus |
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResponse_HSMTemplateDoc_object_ |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Set Webhook
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/config/webhook \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
POST /api.mehery.xyz/xms/api/v1/config/webhook HTTP/1.1
Content-Type: application/json
Accept: */*
x-api-key: string
x-api-id: string
const inputBody = '{
"url": "https://www.example.com/webhook"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/config/webhook',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/config/webhook', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/config/webhook',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/config/webhook', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/config/webhook");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/config/webhook", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/config/webhook";
string json = @"{
""url"": ""https://www.example.com/webhook""
}";
WebhookUrlRequest content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(WebhookUrlRequest content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(WebhookUrlRequest content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/config/webhook
You must configure a callback (Webhook URL) to receive messages. To deploy a live webhook that can receive webhook events, your code must have the following* HTTPS support* A valid SSL certificate
Body parameter
{
"url": "https://www.example.com/webhook"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
body | body | WebhookUrlRequest | true | req |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResponse_ClientApp_object_ |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Contact Management
Contact API can be used:
- to modify contact details and prefs.
Contact Preferences
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/contact/prefs/lang \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
POST /api.mehery.xyz/xms/api/v1/contact/prefs/lang HTTP/1.1
Content-Type: application/json
Accept: */*
x-api-key: string
x-api-id: string
const inputBody = '{
"contactId": "fb:12121212121",
"lang": "en_US"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/contact/prefs/lang',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/contact/prefs/lang', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/contact/prefs/lang',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/contact/prefs/lang', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/contact/prefs/lang");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/contact/prefs/lang", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/contact/prefs/lang";
string json = @"{
""contactId"": ""fb:12121212121"",
""lang"": ""en_US""
}";
ContactPrefsUpdate content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(ContactPrefsUpdate content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(ContactPrefsUpdate content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/contact/prefs/lang
Update language prefs for Contact
Body parameter
{
"contactId": "fb:12121212121",
"lang": "en_US"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
body | body | ContactPrefsUpdate | true | req |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResultsMetaCompactResponse_InBoundEvent_object_ |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Digital Analytics
Analytics APIS
Push Customer Data
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/data/push \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
POST /api.mehery.xyz/xms/api/v1/data/push HTTP/1.1
Content-Type: application/json
Accept: */*
x-api-key: string
x-api-id: string
const inputBody = '{
"data": {},
"id": "string",
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
],
"type": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/data/push',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/data/push', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/data/push',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/data/push', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/data/push");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/data/push", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/data/push";
string json = @"{
""data"": {},
""id"": ""string"",
""links"": [
{
""linkName"": ""string"",
""linkType"": ""string"",
""linkValue"": ""string""
}
],
""type"": ""string""
}";
DigitalObjectDto content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(DigitalObjectDto content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(DigitalObjectDto content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/data/push
This API can be used to upload customer details
Body parameter
{
"data": {},
"id": "string",
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
],
"type": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
body | body | DigitalObjectDto | true | digitalObjectDto |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResponse_DigitalObjectDto_object_ |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Push Customer Event
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/event/push \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
POST /api.mehery.xyz/xms/api/v1/event/push HTTP/1.1
Content-Type: application/json
Accept: */*
x-api-key: string
x-api-id: string
const inputBody = '{
"eventName": "CUSTOMER_CREATED",
"id": 1234567,
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/event/push',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/event/push', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/event/push',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/event/push', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/event/push");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/event/push", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/event/push";
string json = @"{
""eventName"": ""CUSTOMER_CREATED"",
""id"": 1234567,
""links"": [
{
""linkName"": ""string"",
""linkType"": ""string"",
""linkValue"": ""string""
}
]
}";
DigitalEventDto content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(DigitalEventDto content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(DigitalEventDto content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/event/push
This API can be used to upload customer event
Body parameter
{
"eventName": "CUSTOMER_CREATED",
"id": 1234567,
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
body | body | DigitalEventDto | true | digitalEventDto |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResponse_DigitalEventDto_object_ |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Inbound Requests
Inbound Request (Webhooks) can be used for:
- Inbound Message Notifications: Use it to get a notification you when you have received a message.
- Message Status Notifications: Monitor the status of sent messages. Webhook must be implemented by client and should be available on public internet
Contact Information
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/contact/info \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-verify-token: s1agenttoken$$$'
POST /api.mehery.xyz/xms/api/v1/contact/info HTTP/1.1
Content-Type: application/json
Accept: */*
x-verify-token: s1agenttoken$$$
const inputBody = '{
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-verify-token':'s1agenttoken$$$'
};
fetch('/api.mehery.xyz/xms/api/v1/contact/info',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-verify-token': 's1agenttoken$$$'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/contact/info', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-verify-token' => 's1agenttoken$$$'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/contact/info',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-verify-token' => 's1agenttoken$$$',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/contact/info', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/contact/info");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-verify-token": []string{"s1agenttoken$$$"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/contact/info", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/contact/info";
string json = @"{
""businessProfile"": {
""email"": ""abc@xyz.com"",
""name"": ""John Doe"",
""phone"": 919988776655,
""profileId"": ""C34567""
},
""channelId"": ""wa360:919988776655"",
""contactId"": 1234567,
""contactType"": ""WHATSAPP"",
""csid"": ""91YOURNUMBER"",
""lane"": 919999998888,
""profile"": {
""email"": ""abc@xyz.com"",
""name"": ""John Doe"",
""phone"": 919988776655
}
}";
InBoundContact content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(InBoundContact content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(InBoundContact content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/contact/info
Contact Information : Use to respond with contact information for incoming message
Body parameter
{
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-verify-token | header | string | false | Callback Verification Token |
body | body | InBoundContact | true | contactInfoRequest |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ContactInfoUpdate |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Receive Notifications
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/message/receive \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-verify-token: s1agenttoken$$$'
POST /api.mehery.xyz/xms/api/v1/message/receive HTTP/1.1
Content-Type: application/json
Accept: */*
x-verify-token: s1agenttoken$$$
const inputBody = '{
"actions": [
{
"actionCode": "SEND_INVOICE"
}
],
"contacts": [
{
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
}
],
"events": [
{
"checksum": "string",
"contact": {
"channelType": "string",
"contactId": "string",
"contactType": "string",
"csid": "string",
"email": "string",
"lane": "string",
"name": "string",
"phone": "string"
},
"contactId": "string",
"eventCode": "SESSION_ROUTED",
"eventId": "string",
"messageId": "string",
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"session": {
"agent": "string",
"bot": "string",
"dept": "string",
"firstMessage": true,
"initMessage": true,
"mode": "string",
"queue": "string",
"resolved": true,
"routingId": "string",
"sessionStamp": 0,
"ticketHash": "string"
},
"sessionAssigned": {
"newAgent": "string",
"newBot": "string",
"newDept": "string",
"oldAgent": "string",
"oldBot": "string",
"oldDept": "string"
},
"sessionId": "string",
"sessionRouted": {
"params": {},
"routingId": "string",
"sessionStart": true,
"sourceQueue": "string",
"targetQueue": "string"
},
"trace": [
{}
],
"type": "INBOUND"
}
],
"messages": [
{
"attachments": [
{
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
}
],
"audio": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"contactId": "wa919988776655_918828218374",
"document": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"form": {
"reply_desc": "string",
"reply_id": "ACCEPT",
"reply_json": {},
"reply_title": "I Accept"
},
"from": 919988776655,
"id": 1234567,
"image": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"location": {
"address": "1 Hacker Way, Menlo Park, CA, 94025",
"latitude": 12.90909,
"longitude": 6.90808,
"name": "Main Building",
"url": "Location URL"
},
"messageIdExt": 1234567,
"originalMessage": {},
"referral": {
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
},
"session": {
"assignedToAgent": "SUPPORT",
"assignedToDept": "SUPPORT",
"routingId": "xsds34434-323-232",
"sessionId": "xsds34434"
},
"tags": {
"categories": [
"string"
],
"cities": [
"string"
],
"countries": [
"string"
],
"langs": [
"string"
],
"locations": [
"string"
],
"organizations": [
"string"
],
"persons": [
"string"
],
"sentimentScore": 0,
"sentiments": [
"string"
]
},
"text": {
"body": "your-text-message-content",
"type": "image"
},
"timestamp": 156753339076,
"type": "text",
"video": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"voice": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
}
}
],
"meta": {
"appCode": "my_bot",
"appId": "61ec7d9c2ce85742b201c5ab",
"appMode": "WEBHOOK",
"appType": "FEEDBACK_V2",
"debug": true,
"domain": "alex",
"server": "server.com"
},
"statuses": [
{
"contact": {
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
},
"contactId": "wa919988776655_918828218374",
"errors": [
{
"code": 470,
"details": "string",
"href": "https://developers.facebook.com/docs/whatsapp/api/errors#error",
"title": "Failed to send message because you are outside the support window for freeform messages to this user. Please use a valid HSM notification or reconsider."
}
],
"id": 1234567,
"messageIdExt": 1234567,
"status": "DLVRD",
"timestamp": 156753339076
}
],
"type": "message"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-verify-token':'s1agenttoken$$$'
};
fetch('/api.mehery.xyz/xms/api/v1/message/receive',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-verify-token': 's1agenttoken$$$'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/message/receive', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-verify-token' => 's1agenttoken$$$'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/message/receive',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-verify-token' => 's1agenttoken$$$',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/message/receive', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/message/receive");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-verify-token": []string{"s1agenttoken$$$"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/message/receive", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/message/receive";
string json = @"{
""actions"": [
{
""actionCode"": ""SEND_INVOICE""
}
],
""contacts"": [
{
""businessProfile"": {
""email"": ""abc@xyz.com"",
""name"": ""John Doe"",
""phone"": 919988776655,
""profileId"": ""C34567""
},
""channelId"": ""wa360:919988776655"",
""contactId"": 1234567,
""contactType"": ""WHATSAPP"",
""csid"": ""91YOURNUMBER"",
""lane"": 919999998888,
""profile"": {
""email"": ""abc@xyz.com"",
""name"": ""John Doe"",
""phone"": 919988776655
}
}
],
""events"": [
{
""checksum"": ""string"",
""contact"": {
""channelType"": ""string"",
""contactId"": ""string"",
""contactType"": ""string"",
""csid"": ""string"",
""email"": ""string"",
""lane"": ""string"",
""name"": ""string"",
""phone"": ""string""
},
""contactId"": ""string"",
""eventCode"": ""SESSION_ROUTED"",
""eventId"": ""string"",
""messageId"": ""string"",
""route"": {
""queueCode"": ""string"",
""routerId"": ""string"",
""sendMode"": ""string"",
""senderApp"": ""string"",
""senderCode"": ""string"",
""senderType"": ""string""
},
""session"": {
""agent"": ""string"",
""bot"": ""string"",
""dept"": ""string"",
""firstMessage"": true,
""initMessage"": true,
""mode"": ""string"",
""queue"": ""string"",
""resolved"": true,
""routingId"": ""string"",
""sessionStamp"": 0,
""ticketHash"": ""string""
},
""sessionAssigned"": {
""newAgent"": ""string"",
""newBot"": ""string"",
""newDept"": ""string"",
""oldAgent"": ""string"",
""oldBot"": ""string"",
""oldDept"": ""string""
},
""sessionId"": ""string"",
""sessionRouted"": {
""params"": {},
""routingId"": ""string"",
""sessionStart"": true,
""sourceQueue"": ""string"",
""targetQueue"": ""string""
},
""trace"": [
{}
],
""type"": ""INBOUND""
}
],
""messages"": [
{
""attachments"": [
{
""caption"": ""document-caption"",
""filename"": ""document-filename"",
""id"": 2121212,
""link"": ""http(s)://link-to-media-file-url"",
""linkSecure"": ""https://link-to-media-file-url"",
""mime_type"": ""video/mp4"",
""sha256"": ""m3232kaoe4belrr"",
""type"": ""image""
}
],
""audio"": {
""caption"": ""document-caption"",
""filename"": ""document-filename"",
""id"": 2121212,
""link"": ""http(s)://link-to-media-file-url"",
""linkSecure"": ""https://link-to-media-file-url"",
""mime_type"": ""video/mp4"",
""sha256"": ""m3232kaoe4belrr"",
""type"": ""image""
},
""contactId"": ""wa919988776655_918828218374"",
""document"": {
""caption"": ""document-caption"",
""filename"": ""document-filename"",
""id"": 2121212,
""link"": ""http(s)://link-to-media-file-url"",
""linkSecure"": ""https://link-to-media-file-url"",
""mime_type"": ""video/mp4"",
""sha256"": ""m3232kaoe4belrr"",
""type"": ""image""
},
""form"": {
""reply_desc"": ""string"",
""reply_id"": ""ACCEPT"",
""reply_json"": {},
""reply_title"": ""I Accept""
},
""from"": 919988776655,
""id"": 1234567,
""image"": {
""caption"": ""document-caption"",
""filename"": ""document-filename"",
""id"": 2121212,
""link"": ""http(s)://link-to-media-file-url"",
""linkSecure"": ""https://link-to-media-file-url"",
""mime_type"": ""video/mp4"",
""sha256"": ""m3232kaoe4belrr"",
""type"": ""image""
},
""location"": {
""address"": ""1 Hacker Way, Menlo Park, CA, 94025"",
""latitude"": 12.90909,
""longitude"": 6.90808,
""name"": ""Main Building"",
""url"": ""Location URL""
},
""messageIdExt"": 1234567,
""originalMessage"": {},
""referral"": {
""body"": ""string"",
""bulkdId"": ""string"",
""imageUrl"": ""string"",
""info"": {},
""mediaType"": ""string"",
""mediaUrl"": ""string"",
""messageId"": ""string"",
""messageIdExt"": ""string"",
""sourceCategory"": ""feedback"",
""sourceId"": ""string"",
""sourceType"": ""feedback"",
""sourceUrl"": ""string"",
""thumbUrl"": ""string"",
""title"": ""string""
},
""session"": {
""assignedToAgent"": ""SUPPORT"",
""assignedToDept"": ""SUPPORT"",
""routingId"": ""xsds34434-323-232"",
""sessionId"": ""xsds34434""
},
""tags"": {
""categories"": [
""string""
],
""cities"": [
""string""
],
""countries"": [
""string""
],
""langs"": [
""string""
],
""locations"": [
""string""
],
""organizations"": [
""string""
],
""persons"": [
""string""
],
""sentimentScore"": 0,
""sentiments"": [
""string""
]
},
""text"": {
""body"": ""your-text-message-content"",
""type"": ""image""
},
""timestamp"": 156753339076,
""type"": ""text"",
""video"": {
""caption"": ""document-caption"",
""filename"": ""document-filename"",
""id"": 2121212,
""link"": ""http(s)://link-to-media-file-url"",
""linkSecure"": ""https://link-to-media-file-url"",
""mime_type"": ""video/mp4"",
""sha256"": ""m3232kaoe4belrr"",
""type"": ""image""
},
""voice"": {
""caption"": ""document-caption"",
""filename"": ""document-filename"",
""id"": 2121212,
""link"": ""http(s)://link-to-media-file-url"",
""linkSecure"": ""https://link-to-media-file-url"",
""mime_type"": ""video/mp4"",
""sha256"": ""m3232kaoe4belrr"",
""type"": ""image""
}
}
],
""meta"": {
""appCode"": ""my_bot"",
""appId"": ""61ec7d9c2ce85742b201c5ab"",
""appMode"": ""WEBHOOK"",
""appType"": ""FEEDBACK_V2"",
""debug"": true,
""domain"": ""alex"",
""server"": ""server.com""
},
""statuses"": [
{
""contact"": {
""businessProfile"": {
""email"": ""abc@xyz.com"",
""name"": ""John Doe"",
""phone"": 919988776655,
""profileId"": ""C34567""
},
""channelId"": ""wa360:919988776655"",
""contactId"": 1234567,
""contactType"": ""WHATSAPP"",
""csid"": ""91YOURNUMBER"",
""lane"": 919999998888,
""profile"": {
""email"": ""abc@xyz.com"",
""name"": ""John Doe"",
""phone"": 919988776655
}
},
""contactId"": ""wa919988776655_918828218374"",
""errors"": [
{
""code"": 470,
""details"": ""string"",
""href"": ""https://developers.facebook.com/docs/whatsapp/api/errors#error"",
""title"": ""Failed to send message because you are outside the support window for freeform messages to this user. Please use a valid HSM notification or reconsider.""
}
],
""id"": 1234567,
""messageIdExt"": 1234567,
""status"": ""DLVRD"",
""timestamp"": 156753339076
}
],
""type"": ""message""
}";
InBoundWrapper content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(InBoundWrapper content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(InBoundWrapper content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/message/receive
Inbound Message Notifications: Use it to get a notification when you have received a message.
Body parameter
{
"actions": [
{
"actionCode": "SEND_INVOICE"
}
],
"contacts": [
{
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
}
],
"events": [
{
"checksum": "string",
"contact": {
"channelType": "string",
"contactId": "string",
"contactType": "string",
"csid": "string",
"email": "string",
"lane": "string",
"name": "string",
"phone": "string"
},
"contactId": "string",
"eventCode": "SESSION_ROUTED",
"eventId": "string",
"messageId": "string",
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"session": {
"agent": "string",
"bot": "string",
"dept": "string",
"firstMessage": true,
"initMessage": true,
"mode": "string",
"queue": "string",
"resolved": true,
"routingId": "string",
"sessionStamp": 0,
"ticketHash": "string"
},
"sessionAssigned": {
"newAgent": "string",
"newBot": "string",
"newDept": "string",
"oldAgent": "string",
"oldBot": "string",
"oldDept": "string"
},
"sessionId": "string",
"sessionRouted": {
"params": {},
"routingId": "string",
"sessionStart": true,
"sourceQueue": "string",
"targetQueue": "string"
},
"trace": [
{}
],
"type": "INBOUND"
}
],
"messages": [
{
"attachments": [
{
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
}
],
"audio": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"contactId": "wa919988776655_918828218374",
"document": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"form": {
"reply_desc": "string",
"reply_id": "ACCEPT",
"reply_json": {},
"reply_title": "I Accept"
},
"from": 919988776655,
"id": 1234567,
"image": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"location": {
"address": "1 Hacker Way, Menlo Park, CA, 94025",
"latitude": 12.90909,
"longitude": 6.90808,
"name": "Main Building",
"url": "Location URL"
},
"messageIdExt": 1234567,
"originalMessage": {},
"referral": {
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
},
"session": {
"assignedToAgent": "SUPPORT",
"assignedToDept": "SUPPORT",
"routingId": "xsds34434-323-232",
"sessionId": "xsds34434"
},
"tags": {
"categories": [
"string"
],
"cities": [
"string"
],
"countries": [
"string"
],
"langs": [
"string"
],
"locations": [
"string"
],
"organizations": [
"string"
],
"persons": [
"string"
],
"sentimentScore": 0,
"sentiments": [
"string"
]
},
"text": {
"body": "your-text-message-content",
"type": "image"
},
"timestamp": 156753339076,
"type": "text",
"video": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"voice": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
}
}
],
"meta": {
"appCode": "my_bot",
"appId": "61ec7d9c2ce85742b201c5ab",
"appMode": "WEBHOOK",
"appType": "FEEDBACK_V2",
"debug": true,
"domain": "alex",
"server": "server.com"
},
"statuses": [
{
"contact": {
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
},
"contactId": "wa919988776655_918828218374",
"errors": [
{
"code": 470,
"details": "string",
"href": "https://developers.facebook.com/docs/whatsapp/api/errors#error",
"title": "Failed to send message because you are outside the support window for freeform messages to this user. Please use a valid HSM notification or reconsider."
}
],
"id": 1234567,
"messageIdExt": 1234567,
"status": "DLVRD",
"timestamp": 156753339076
}
],
"type": "message"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-verify-token | header | string | false | Callback Verification Token |
body | body | InBoundWrapper | true | inboxMessage |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | InBoundWrapper |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Outbound Messages
API’s to send OutBound Messages
Send Message
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/message/send \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
POST /api.mehery.xyz/xms/api/v1/message/send HTTP/1.1
Content-Type: application/json
Accept: */*
x-api-key: string
x-api-id: string
const inputBody = '{
"audio": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
},
"channelId": "91SERVICENUMBER",
"contacts": [
{
"addresses": [
{
"city": "Menlo Park",
"country": "United States",
"country_code": "us",
"state": "CA",
"street": "1 Hacker Way",
"type": "HOME",
"zip": 94025
}
],
"birthday": "string",
"emails": [
{
"email": "test@whatsapp.com",
"type": "WORK"
}
],
"ims": [
{
"service": "FACEBOOK",
"userid": "https://www.facebook.com"
}
],
"name": {
"first_name": "John",
"formatted_name": "John Smith",
"last_name": "Smith"
},
"org": {
"company": "WhatsApp",
"department": "Design",
"title": "Manager"
},
"phones": [
{
"phone": "+1 (940) 555-1234",
"type": "HOME",
"wa_id": 16505551234
}
],
"urls": [
{
"type": "WORK",
"url": "https://www.facebook.com"
}
]
}
],
"document": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
},
"image": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
},
"location": {
"address": "1 Hacker Way, Menlo Park, CA, 94025",
"latitude": 12.90909,
"longitude": 6.90808,
"name": "Main Building",
"url": "Location URL"
},
"mask": false,
"messageIdResend": "gBEGkYiEB1VXAglK1ZEqA1YKPrU",
"options": {
"buttonDisplayScheme": "auto",
"buttons": [
{
"action": "NAVIGATE",
"code": "occupation",
"desc": "What occupation you have",
"label": "Occupation",
"name": "string",
"phone": "+91 9988776655",
"type": "QUICK_REPLY",
"uid": 806799978207096,
"url": "http://url",
"variable": "data.var_1"
}
]
},
"template": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"text": {
"body": "your-text-message-content"
},
"to": {
"contactId": "string",
"email": "string",
"name": "string",
"phone": "string"
},
"type": "text",
"video": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/message/send',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/message/send', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/message/send',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/message/send', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/message/send");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/message/send", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/message/send";
string json = @"{
""audio"": {
""caption"": ""your-video-caption"",
""filename"": ""your-video-caption"",
""link"": ""http(s)://the-url""
},
""channelId"": ""91SERVICENUMBER"",
""contacts"": [
{
""addresses"": [
{
""city"": ""Menlo Park"",
""country"": ""United States"",
""country_code"": ""us"",
""state"": ""CA"",
""street"": ""1 Hacker Way"",
""type"": ""HOME"",
""zip"": 94025
}
],
""birthday"": ""string"",
""emails"": [
{
""email"": ""test@whatsapp.com"",
""type"": ""WORK""
}
],
""ims"": [
{
""service"": ""FACEBOOK"",
""userid"": ""https://www.facebook.com""
}
],
""name"": {
""first_name"": ""John"",
""formatted_name"": ""John Smith"",
""last_name"": ""Smith""
},
""org"": {
""company"": ""WhatsApp"",
""department"": ""Design"",
""title"": ""Manager""
},
""phones"": [
{
""phone"": ""+1 (940) 555-1234"",
""type"": ""HOME"",
""wa_id"": 16505551234
}
],
""urls"": [
{
""type"": ""WORK"",
""url"": ""https://www.facebook.com""
}
]
}
],
""document"": {
""caption"": ""your-video-caption"",
""filename"": ""your-video-caption"",
""link"": ""http(s)://the-url""
},
""image"": {
""caption"": ""your-video-caption"",
""filename"": ""your-video-caption"",
""link"": ""http(s)://the-url""
},
""location"": {
""address"": ""1 Hacker Way, Menlo Park, CA, 94025"",
""latitude"": 12.90909,
""longitude"": 6.90808,
""name"": ""Main Building"",
""url"": ""Location URL""
},
""mask"": false,
""messageIdResend"": ""gBEGkYiEB1VXAglK1ZEqA1YKPrU"",
""options"": {
""buttonDisplayScheme"": ""auto"",
""buttons"": [
{
""action"": ""NAVIGATE"",
""code"": ""occupation"",
""desc"": ""What occupation you have"",
""label"": ""Occupation"",
""name"": ""string"",
""phone"": ""+91 9988776655"",
""type"": ""QUICK_REPLY"",
""uid"": 806799978207096,
""url"": ""http://url"",
""variable"": ""data.var_1""
}
]
},
""template"": {
""code"": ""FEEDBACK"",
""data"": {
""amount"": 10,
""currency"": ""INR""
},
""id"": ""60d236c6142e53561cb7716c"",
""lang"": ""en_US"",
""linked"": ""string""
},
""text"": {
""body"": ""your-text-message-content""
},
""to"": {
""contactId"": ""string"",
""email"": ""string"",
""name"": ""string"",
""phone"": ""string""
},
""type"": ""text"",
""video"": {
""caption"": ""your-video-caption"",
""filename"": ""your-video-caption"",
""link"": ""http(s)://the-url""
}
}";
OutBoundMsg content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(OutBoundMsg content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(OutBoundMsg content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/message/send
Use the message API to send text messages, media, documents, and message templates to your customers You can send messages by making a POST call regardless of message type. The content of the JSON message body differs for each type of message (text, image, etc.).
Body parameter
{
"audio": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
},
"channelId": "91SERVICENUMBER",
"contacts": [
{
"addresses": [
{
"city": "Menlo Park",
"country": "United States",
"country_code": "us",
"state": "CA",
"street": "1 Hacker Way",
"type": "HOME",
"zip": 94025
}
],
"birthday": "string",
"emails": [
{
"email": "test@whatsapp.com",
"type": "WORK"
}
],
"ims": [
{
"service": "FACEBOOK",
"userid": "https://www.facebook.com"
}
],
"name": {
"first_name": "John",
"formatted_name": "John Smith",
"last_name": "Smith"
},
"org": {
"company": "WhatsApp",
"department": "Design",
"title": "Manager"
},
"phones": [
{
"phone": "+1 (940) 555-1234",
"type": "HOME",
"wa_id": 16505551234
}
],
"urls": [
{
"type": "WORK",
"url": "https://www.facebook.com"
}
]
}
],
"document": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
},
"image": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
},
"location": {
"address": "1 Hacker Way, Menlo Park, CA, 94025",
"latitude": 12.90909,
"longitude": 6.90808,
"name": "Main Building",
"url": "Location URL"
},
"mask": false,
"messageIdResend": "gBEGkYiEB1VXAglK1ZEqA1YKPrU",
"options": {
"buttonDisplayScheme": "auto",
"buttons": [
{
"action": "NAVIGATE",
"code": "occupation",
"desc": "What occupation you have",
"label": "Occupation",
"name": "string",
"phone": "+91 9988776655",
"type": "QUICK_REPLY",
"uid": 806799978207096,
"url": "http://url",
"variable": "data.var_1"
}
]
},
"template": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"text": {
"body": "your-text-message-content"
},
"to": {
"contactId": "string",
"email": "string",
"name": "string",
"phone": "string"
},
"type": "text",
"video": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
}
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
body | body | OutBoundMsg | true | message |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResponse_OutBoundReciept_object_ |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Session Management
Session API can be used:
- to fetch all session messages. A session usually starts with first messages and stays active for 24 hours by default.
Session Close
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/session/close \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
POST /api.mehery.xyz/xms/api/v1/session/close HTTP/1.1
Content-Type: application/json
Accept: */*
x-api-key: string
x-api-id: string
const inputBody = '{
"sessionId": "61f3810a02e14c0877fc1a32"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/session/close',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/session/close', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/session/close',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/session/close', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/session/close");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/session/close", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/session/close";
string json = @"{
""sessionId"": ""61f3810a02e14c0877fc1a32""
}";
SessionStatusClose content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(SessionStatusClose content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(SessionStatusClose content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/session/close
Close the active session
Body parameter
{
"sessionId": "61f3810a02e14c0877fc1a32"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
body | body | SessionStatusClose | true | req |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResultsMetaCompactResponse_InBoundEvent_object_ |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Session Messages
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/session/messages \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
POST /api.mehery.xyz/xms/api/v1/session/messages HTTP/1.1
Content-Type: application/json
Accept: */*
x-api-key: string
x-api-id: string
const inputBody = '{
"sessionId": "61f3810a02e14c0877fc1a32"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/session/messages',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/session/messages', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/session/messages',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/session/messages', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/session/messages");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/session/messages", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/session/messages";
string json = @"{
""sessionId"": ""61f3810a02e14c0877fc1a32""
}";
SessionStatusClose content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(SessionStatusClose content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(SessionStatusClose content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/session/messages
use this api to fetch list of all messages for sessionId. you can get sessionId from inbound message body
Body parameter
{
"sessionId": "61f3810a02e14c0877fc1a32"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
body | body | SessionStatusClose | true | req |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResultsMetaCompactResponse_ChatMessageDTO_object_ |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Session Resolve
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/session/resolve \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
POST /api.mehery.xyz/xms/api/v1/session/resolve HTTP/1.1
Content-Type: application/json
Accept: */*
x-api-key: string
x-api-id: string
const inputBody = '{
"sessionId": "61f3810a02e14c0877fc1a32"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/session/resolve',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/session/resolve', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/session/resolve',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/session/resolve', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/session/resolve");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/session/resolve", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/session/resolve";
string json = @"{
""sessionId"": ""61f3810a02e14c0877fc1a32""
}";
SessionStatusClose content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(SessionStatusClose content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(SessionStatusClose content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/session/resolve
Resolve the active session, will leave the scope of closing session to end user
Body parameter
{
"sessionId": "61f3810a02e14c0877fc1a32"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
body | body | SessionStatusClose | true | req |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResultsMetaCompactResponse_InBoundEvent_object_ |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Session Routing
Code samples
# You can also use wget
curl -X POST /api.mehery.xyz/xms/api/v1/session/routing \
-H 'Content-Type: application/json' \
-H 'Accept: */*' \
-H 'x-api-key: string' \
-H 'x-api-id: string' \
-H 'x-api-key: API_KEY'
POST /api.mehery.xyz/xms/api/v1/session/routing HTTP/1.1
Content-Type: application/json
Accept: */*
x-api-key: string
x-api-id: string
const inputBody = '{
"agent": "external_bot",
"params": {},
"queue": "external_bot",
"sessionId": "61f3810a02e14c0877fc1a32",
"skills": [
"dental",
"ortho"
],
"team": "external_bot"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'*/*',
'x-api-key':'string',
'x-api-id':'string',
'x-api-key':'API_KEY'
};
fetch('/api.mehery.xyz/xms/api/v1/session/routing',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Content-Type': 'application/json',
'Accept': '*/*',
'x-api-key': 'string',
'x-api-id': 'string',
'x-api-key': 'API_KEY'
}
r = requests.post('/api.mehery.xyz/xms/api/v1/session/routing', headers = headers)
print(r.json())
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY'
}
result = RestClient.post '/api.mehery.xyz/xms/api/v1/session/routing',
params: {
}, headers: headers
p JSON.parse(result)
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => '*/*',
'x-api-key' => 'string',
'x-api-id' => 'string',
'x-api-key' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api.mehery.xyz/xms/api/v1/session/routing', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api.mehery.xyz/xms/api/v1/session/routing");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"*/*"},
"x-api-key": []string{"string"},
"x-api-id": []string{"string"},
"x-api-key": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api.mehery.xyz/xms/api/v1/session/routing", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
private HttpClient Client { get; set; }
/// <<summary>>
/// Setup http client
/// <</summary>>
public HttpExample()
{
Client = new HttpClient();
}
/// Make a dummy request
public async Task MakePostRequest()
{
string url = "/api.mehery.xyz/xms/api/v1/session/routing";
string json = @"{
""agent"": ""external_bot"",
""params"": {},
""queue"": ""external_bot"",
""sessionId"": ""61f3810a02e14c0877fc1a32"",
""skills"": [
""dental"",
""ortho""
],
""team"": ""external_bot""
}";
SessionQueueAssignment content = JsonConvert.DeserializeObject(json);
await PostAsync(content, url);
}
/// Performs a POST Request
public async Task PostAsync(SessionQueueAssignment content, string url)
{
//Serialize Object
StringContent jsonContent = SerializeObject(content);
//Execute POST request
HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
}
/// Serialize an object to Json
private StringContent SerializeObject(SessionQueueAssignment content)
{
//Serialize Object
string jsonObject = JsonConvert.SerializeObject(content);
//Create Json UTF8 String Content
return new StringContent(jsonObject, Encoding.UTF8, "application/json");
}
/// Deserialize object from request response
private async Task DeserializeObject(HttpResponseMessage response)
{
//Read body
string responseBody = await response.Content.ReadAsStringAsync();
//Deserialize Body to object
var result = JsonConvert.DeserializeObject(responseBody);
}
}
POST /api/v1/session/routing
Assign session to different queue, all the future inbound messages will be sent to this queue
Body parameter
{
"agent": "external_bot",
"params": {},
"queue": "external_bot",
"sessionId": "61f3810a02e14c0877fc1a32",
"skills": [
"dental",
"ortho"
],
"team": "external_bot"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API Key |
x-api-id | header | string | false | API Id |
body | body | SessionQueueAssignment | true | req |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ApiResultsMetaCompactResponse_InBoundEvent_object_ |
201 | Created | Created | None |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | None |
404 | Not Found | Not Found | None |
Schemas
ApiFieldError
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
ApiFieldError
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
body | object | true | none | none |
code | string | true | none | none |
codeKey | string | true | none | none |
codes | [string] | true | none | none |
description | string | true | none | none |
descriptionKey | string | true | none | none |
field | string | true | none | none |
obzect | string | true | none | none |
possibleValues | [object] | true | none | none |
ApprovedChannels
{
"channelId": "string",
"status": "string",
"templateId": "string"
}
ApprovedChannels
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
channelId | string | true | none | none |
status | string | true | none | none |
templateId | string | true | none | none |
Attachment
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
Attachment
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
attachmentId | string | true | none | Unique Attachment Id |
drive | string | true | none | Drive Code |
mediaCaption | string | true | none | Media Caption |
mediaCode | string | true | none | QuickMedia Code |
mediaId | string | true | none | Media ID generated by Service |
mediaIdExt | string | true | none | Media ID generated by Channel |
mediaIdInline | string | true | none | Media ID used by Message for inline/part of body content |
mediaMimeType | string | true | none | Mime Type |
mediaName | string | true | none | File Name |
mediaSrc | string | true | none | Media URL generated by Channel |
mediaSubType | string | true | none | Media SubType Type |
mediaTemplate | string | true | none | Media Template |
mediaTemplateStyle | string | true | none | Media Template Wrapper |
mediaType | string | true | none | Media Type |
mediaURL | string | true | none | Media URL generated by Service |
Enumerated Values
Property | Value |
---|---|
mediaSubType | STORY_MENTION |
mediaSubType | SHARE |
mediaSubType | bg_voice etc |
mediaType | IMAGE |
mediaType | DOCUMENT |
mediaType | TEXT |
mediaType | |
mediaType | VIDEO |
mediaType | URL |
mediaType | AUDIO |
BasicExternalTemplate
{
"code": "string",
"template": {},
"varMap": {}
}
BasicExternalTemplate
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | true | none | none |
template | object | true | none | none |
varMap | object | true | none | none |
ChatMessageDTO
{
"action": "string",
"attachments": [
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
],
"bulkSessionId": "string",
"contact": {
"channelType": "string",
"contactId": "wa919876543210",
"contactType": "string",
"country": "string",
"createdBy": "string",
"createdStamp": 0,
"csid": "string",
"email": "John.Doe@company.co",
"emailVerified": true,
"filters": [
{
"property1": {},
"property2": {}
}
],
"firstInBoundStamp": 0,
"firstOutBoundStamp": 0,
"keymap": [
{
"property1": "string",
"property2": "string"
}
],
"labelId": [
"string"
],
"lane": "string",
"lastInBoundStamp": 0,
"lastOptInStamp": 0,
"lastOutBoundStamp": 0,
"lastPushStamp": 0,
"lastReplyStamp": 0,
"name": "John Doe",
"phone": 919876543210,
"phoneVerified": true,
"prefix": "string",
"profile": {
"code": "string",
"contactId": "string",
"email": "string",
"id": "string",
"labels": [
{
"format": "MM/DD/YY",
"key": "CUSTOMER_TYPE",
"name": "Customer Type",
"type": "TEXT",
"value": "Platinum"
}
],
"mobile": "string",
"name": "string",
"profileId": "string",
"userId": "string"
},
"profilePic": "string",
"sessionId": "string",
"tenant": "string",
"userid": "string"
},
"form": {},
"logs": [
{}
],
"messageId": "string",
"messageIdExt": "string",
"messageIdRef": "string",
"messageIdResend": "string",
"messageTrail": "string",
"meta": {},
"name": "string",
"options": {},
"referral": {
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
},
"replyId": "string",
"replyIdExt": "string",
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"sender": "string",
"sessionId": "string",
"stamps": {
"property1": 0,
"property2": 0
},
"status": "string",
"tags": {
"categories": [
"string"
],
"cities": [
"string"
],
"countries": [
"string"
],
"langs": [
"string"
],
"locations": [
"string"
],
"organizations": [
"string"
],
"persons": [
"string"
],
"sentimentScore": 0,
"sentiments": [
"string"
]
},
"template": "string",
"templateId": "string",
"text": "string",
"timestamp": 0,
"type": "string",
"vccards": [
{
"addresses": [
{
"city": "string",
"country": "string",
"countryCode": "string",
"state": "string",
"street": "string",
"type": "string",
"uuid": "string",
"zip": "string"
}
],
"dates": [
{
"date": "string",
"label": "string",
"type": "string"
}
],
"emails": [
{
"email": "string",
"label": "string",
"type": "string",
"uuid": "string"
}
],
"ims": [
{
"service": "string",
"userid": "string"
}
],
"locations": [
{
"address": "string",
"latitude": "string",
"longitude": "string",
"name": "string",
"url": "string"
}
],
"name": {
"firstName": "string",
"formattedName": "string",
"lastName": "string",
"middleName": "string"
},
"phones": [
{
"country": "string",
"countryCallingCode": "string",
"ext": "string",
"label": "string",
"nationalNumber": "string",
"phone": "string",
"type": "string",
"uuid": "string",
"whatsAppId": "string"
}
],
"urls": [
{
"label": "string",
"type": "string",
"url": "string",
"uuid": "string"
}
],
"work": [
{
"company": "string",
"department": "string",
"label": "string",
"title": "string"
}
]
}
]
}
ChatMessageDTO
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
action | string | true | none | none |
attachments | [Attachment] | true | none | none |
bulkSessionId | string | true | none | none |
contact | ContactDTO | true | none | none |
form | object | true | none | none |
logs | [object] | true | none | none |
messageId | string | true | none | none |
messageIdExt | string | true | none | none |
messageIdRef | string | true | none | none |
messageIdResend | string | true | none | none |
messageTrail | string | true | none | none |
meta | object | true | none | none |
name | string | true | none | none |
options | object | true | none | none |
referral | MessageReferral | true | none | none |
replyId | string | true | none | none |
replyIdExt | string | true | none | none |
route | MessageRouter | true | none | none |
sender | string | true | none | none |
sessionId | string | true | none | none |
stamps | object | true | none | none |
» additionalProperties | integer(int64) | false | none | none |
status | string | true | none | none |
tags | TagDocument | true | none | none |
template | string | true | none | none |
templateId | string | true | none | none |
text | string | true | none | none |
timestamp | integer(int64) | true | none | none |
type | string | true | none | none |
vccards | [PBVCard] | true | none | none |
ChatProfileDTO
{
"code": "string",
"contactId": "string",
"email": "string",
"id": "string",
"labels": [
{
"format": "MM/DD/YY",
"key": "CUSTOMER_TYPE",
"name": "Customer Type",
"type": "TEXT",
"value": "Platinum"
}
],
"mobile": "string",
"name": "string",
"profileId": "string",
"userId": "string"
}
ChatProfileDTO
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | true | none | none |
contactId | string | true | none | none |
string | true | none | none | |
id | string | true | none | none |
labels | [CustomerLabel] | true | none | none |
mobile | string | true | none | none |
name | string | true | none | none |
profileId | string | true | none | none |
userId | string | true | none | none |
ChronoScheduler
{
"data": {},
"endAt": "string",
"interval": "string",
"repeat": true,
"repeatCount": 0,
"startAt": "string",
"taskId": "string",
"topic": "string"
}
ChronoScheduler
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | object | true | none | none |
endAt | string | true | none | none |
interval | string | true | none | none |
repeat | boolean | true | none | none |
repeatCount | integer(int64) | true | none | none |
startAt | string | true | none | none |
taskId | string | true | none | none |
topic | string | true | none | none |
ClientApp
{
"agentApp": true,
"appHook": "string",
"appHookFrwrd": "string",
"appMode": "string",
"appType": "string",
"config": {},
"feedbackApp": true,
"forward": "string",
"id": "string",
"key": "string",
"keyName": "string",
"keyVersion": "string",
"props": {},
"queue": "string",
"readOnly": true,
"secret": {},
"shared": true,
"type": "string",
"webhook": "string"
}
ClientApp
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
agentApp | boolean | true | none | none |
appHook | string | true | none | none |
appHookFrwrd | string | true | none | none |
appMode | string | true | none | none |
appType | string | true | none | none |
config | object | true | none | none |
feedbackApp | boolean | true | none | none |
forward | string | true | none | none |
id | string | true | none | none |
key | string | true | none | none |
keyName | string | true | none | none |
keyVersion | string | true | none | none |
props | object | true | none | none |
queue | string | true | none | none |
readOnly | boolean | true | none | none |
secret | object | true | none | none |
shared | boolean | true | none | none |
type | string | true | none | none |
webhook | string | true | none | none |
CommonMsgContactCard
{
"addresses": [
{
"city": "Menlo Park",
"country": "United States",
"country_code": "us",
"state": "CA",
"street": "1 Hacker Way",
"type": "HOME",
"zip": 94025
}
],
"birthday": "string",
"emails": [
{
"email": "test@whatsapp.com",
"type": "WORK"
}
],
"ims": [
{
"service": "FACEBOOK",
"userid": "https://www.facebook.com"
}
],
"name": {
"first_name": "John",
"formatted_name": "John Smith",
"last_name": "Smith"
},
"org": {
"company": "WhatsApp",
"department": "Design",
"title": "Manager"
},
"phones": [
{
"phone": "+1 (940) 555-1234",
"type": "HOME",
"wa_id": 16505551234
}
],
"urls": [
{
"type": "WORK",
"url": "https://www.facebook.com"
}
]
}
CommonMsgContactCard
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
addresses | [OutBoundMsgContactAddress] | true | none | none |
birthday | string | true | none | none |
emails | [OutBoundMsgContactEmail] | true | none | none |
ims | [OutBoundMsgContactSocial] | true | none | none |
name | OutBoundMsgContactName | true | none | none |
org | OutBoundMsgContactOrg | true | none | none |
phones | [OutBoundMsgContactPhone] | true | none | none |
urls | [OutBoundMsgContactUrl] | true | none | none |
CommonMsgLocation
{
"address": "1 Hacker Way, Menlo Park, CA, 94025",
"latitude": 12.90909,
"longitude": 6.90808,
"name": "Main Building",
"url": "Location URL"
}
CommonMsgLocation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
address | string | true | none | Address Text |
latitude | string | true | none | latitude |
longitude | string | true | none | longitude |
name | string | true | none | location-name |
url | string | true | none | location-url |
CommonMsgOptions
{
"buttonDisplayScheme": "auto",
"buttons": [
{
"action": "NAVIGATE",
"code": "occupation",
"desc": "What occupation you have",
"label": "Occupation",
"name": "string",
"phone": "+91 9988776655",
"type": "QUICK_REPLY",
"uid": 806799978207096,
"url": "http://url",
"variable": "data.var_1"
}
]
}
CommonMsgOptions
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
buttonDisplayScheme | string | true | none | Button Display Scheme |
buttons | [TmplElement] | true | none | none |
Enumerated Values
Property | Value |
---|---|
buttonDisplayScheme | auto |
buttonDisplayScheme | list |
buttonDisplayScheme | buttons |
CommonTemplateMeta
{
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
}
CommonTemplateMeta
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | false | none | Code of Template |
data | object | false | none | Data will be used to resolve placeholders in template, in case of missing value blank will be attempted, Kindly note Template may be rejected in case it does not match the approved format |
id | string | false | none | Unique Template Id |
lang | string | false | none | Language of Template to pick |
linked | string | true | none | none |
CompanyVarsConfigDoc
{
"description": "string",
"disabled": true,
"domain": "string",
"empty": true,
"group": "string",
"id": "string",
"key": "string",
"missing": true,
"present": true,
"primary": true,
"server": "string",
"shared": true,
"type": "string",
"value": {}
}
CompanyVarsConfigDoc
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
description | string | true | none | none |
disabled | boolean | true | none | none |
domain | string | true | none | none |
empty | boolean | true | none | none |
group | string | true | none | none |
id | string | true | none | none |
key | string | true | none | none |
missing | boolean | true | none | none |
present | boolean | true | none | none |
primary | boolean | true | none | none |
server | string | true | none | none |
shared | boolean | true | none | none |
type | string | true | none | none |
value | object | true | none | none |
ContactBusinessProfile
{
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
}
ContactBusinessProfile
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
string | false | none | Email Id collected from Business | |
name | string | false | none | Name collected from Business |
phone | string | false | none | Mobile Number collected from Business |
profileId | string | false | none | Unique Id assigned to Contact by Core Business Application |
ContactDTO
{
"channelType": "string",
"contactId": "wa919876543210",
"contactType": "string",
"country": "string",
"createdBy": "string",
"createdStamp": 0,
"csid": "string",
"email": "John.Doe@company.co",
"emailVerified": true,
"filters": [
{
"property1": {},
"property2": {}
}
],
"firstInBoundStamp": 0,
"firstOutBoundStamp": 0,
"keymap": [
{
"property1": "string",
"property2": "string"
}
],
"labelId": [
"string"
],
"lane": "string",
"lastInBoundStamp": 0,
"lastOptInStamp": 0,
"lastOutBoundStamp": 0,
"lastPushStamp": 0,
"lastReplyStamp": 0,
"name": "John Doe",
"phone": 919876543210,
"phoneVerified": true,
"prefix": "string",
"profile": {
"code": "string",
"contactId": "string",
"email": "string",
"id": "string",
"labels": [
{
"format": "MM/DD/YY",
"key": "CUSTOMER_TYPE",
"name": "Customer Type",
"type": "TEXT",
"value": "Platinum"
}
],
"mobile": "string",
"name": "string",
"profileId": "string",
"userId": "string"
},
"profilePic": "string",
"sessionId": "string",
"tenant": "string",
"userid": "string"
}
ContactDTO
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
channelType | string | true | none | none |
contactId | string | false | none | none |
contactType | string | true | none | none |
country | string | true | none | none |
createdBy | string | true | none | none |
createdStamp | integer(int64) | true | none | none |
csid | string | true | none | none |
string | false | none | none | |
emailVerified | boolean | true | none | none |
filters | [Map_string_object_] | true | none | none |
firstInBoundStamp | integer(int64) | true | none | none |
firstOutBoundStamp | integer(int64) | true | none | none |
keymap | [Map_string_string_] | true | none | none |
labelId | [string] | true | none | none |
lane | string | true | none | none |
lastInBoundStamp | integer(int64) | true | none | none |
lastOptInStamp | integer(int64) | true | none | none |
lastOutBoundStamp | integer(int64) | true | none | none |
lastPushStamp | integer(int64) | true | none | none |
lastReplyStamp | integer(int64) | true | none | none |
name | string | false | none | none |
phone | string | false | none | none |
phoneVerified | boolean | true | none | none |
prefix | string | true | none | none |
profile | ChatProfileDTO | true | none | none |
profilePic | string | true | none | none |
sessionId | string | true | none | none |
tenant | string | true | none | none |
userid | string | true | none | none |
ContactInfoUpdate
{
"email": "abc@xyz.com",
"labels": [
{
"format": "MM/DD/YY",
"key": "CUSTOMER_TYPE",
"name": "Customer Type",
"type": "TEXT",
"value": "Platinum"
}
],
"mobile": 919988776655,
"name": "John Doe",
"profileId": "C34567"
}
ContactInfoUpdate
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
string | false | none | EmailId if to be changed | |
labels | [CustomerLabel] | false | none | Additional Labels |
mobile | string | false | none | Mobile Number if to be changed |
name | string | false | none | Name if to be Channel |
profileId | string | false | none | Unique Id assigned to Contact by Core Business Application |
ContactMeta
{
"channelType": "string",
"contactId": "wa919876543210",
"contactType": "string",
"country": "string",
"csid": "string",
"email": "John.Doe@company.co",
"filters": [
{
"property1": {},
"property2": {}
}
],
"keymap": [
{
"property1": "string",
"property2": "string"
}
],
"lane": "string",
"name": "John Doe",
"phone": 919876543210,
"prefix": "string",
"tenant": "string",
"userid": "string"
}
ContactMeta
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
channelType | string | true | none | none |
contactId | string | false | none | none |
contactType | string | true | none | none |
country | string | true | none | none |
csid | string | true | none | none |
string | false | none | none | |
filters | [Map_string_object_] | true | none | none |
keymap | [Map_string_string_] | true | none | none |
lane | string | true | none | none |
name | string | false | none | none |
phone | string | false | none | none |
prefix | string | true | none | none |
tenant | string | true | none | none |
userid | string | true | none | none |
ContactPrefsUpdate
{
"contactId": "fb:12121212121",
"lang": "en_US"
}
ContactPrefsUpdate
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
contactId | string | true | none | Contact to update |
lang | string | true | none | Language to set |
Contactable
{
"channelType": "string",
"contactId": "string",
"contactType": "string",
"csid": "string",
"email": "string",
"lane": "string",
"name": "string",
"phone": "string"
}
Contactable
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
channelType | string | true | none | none |
contactId | string | true | none | none |
contactType | string | true | none | none |
csid | string | true | none | none |
string | true | none | none | |
lane | string | true | none | none |
name | string | true | none | none |
phone | string | true | none | none |
CustomerLabel
{
"format": "MM/DD/YY",
"key": "CUSTOMER_TYPE",
"name": "Customer Type",
"type": "TEXT",
"value": "Platinum"
}
CustomerLabel
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
format | string | false | none | Data Format |
key | string | true | none | Unique LabelType |
name | string | false | none | Display LabelType, Labels with same name will be grouped together, if not provided key will be used instead |
type | string | false | none | Type of Label |
value | object | true | none | Value of Label Value |
Enumerated Values
Property | Value |
---|---|
format | MM/DD/YY |
type | TEXT |
type | DATE |
type | NUMBER |
type | LIST |
DigitalEventDto
{
"eventName": "CUSTOMER_CREATED",
"id": 1234567,
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
]
}
DigitalEventDto
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
eventName | string | true | none | Event Name and action |
id | string | true | none | Unique Id assigined by event |
links | [DigitalObjectLink] | true | none | none |
DigitalObjectDto
{
"data": {},
"id": "string",
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
],
"type": "string"
}
DigitalObjectDto
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | object | true | none | none |
id | string | true | none | none |
links | [DigitalObjectLink] | true | none | none |
type | string | true | none | none |
DigitalObjectLink
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
DigitalObjectLink
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
linkName | string | true | none | none |
linkType | string | true | none | none |
linkValue | string | true | none | none |
FormReply
{
"reply_desc": "string",
"reply_id": "ACCEPT",
"reply_json": {},
"reply_title": "I Accept"
}
FormReply
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
reply_desc | string | true | none | Button Description |
reply_id | string | true | none | Button Code |
reply_json | object | true | none | JSON Collection of all input selections by customer in form |
reply_title | string | true | none | Button Title |
HSMTemplateDoc
{
"approved": [
{
"channelId": "string",
"status": "string",
"templateId": "string"
}
],
"attachments": [
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
],
"body": "string",
"category": "string",
"categoryType": "string",
"code": "string",
"contactType": "string",
"createdBy": "string",
"createdStamp": 0,
"desc": "string",
"footer": "string",
"formatType": "string",
"header": "string",
"id": "string",
"lang": "string",
"meta": {},
"model": {},
"name": "string",
"options": {},
"template": "string",
"title": "string"
}
HSMTemplateDoc
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
approved | [ApprovedChannels] | true | none | none |
attachments | [Attachment] | true | none | none |
body | string | true | none | none |
category | string | true | none | none |
categoryType | string | true | none | none |
code | string | true | none | none |
contactType | string | true | none | none |
createdBy | string | true | none | none |
createdStamp | integer(int64) | true | none | none |
desc | string | true | none | none |
footer | string | true | none | none |
formatType | string | true | none | none |
header | string | true | none | none |
id | string | true | none | none |
lang | string | true | none | none |
meta | object | true | none | none |
model | object | true | none | none |
name | string | true | none | none |
options | object | true | none | none |
template | string | true | none | none |
title | string | true | none | none |
InBoundAction
{
"actionCode": "SEND_INVOICE"
}
InBoundAction
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
actionCode | string | true | none | Action Triggered by Agent/Service |
InBoundContact
{
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
}
InBoundContact
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
businessProfile | ContactBusinessProfile | true | none | none |
channelId | string | true | none | Channel for message |
contactId | string | true | none | Unique Id assigined to user by Service |
contactType | string | true | none | Contact Type |
csid | string | false | none | Channel Specific ID |
lane | string | true | none | Contact Used by User while sending messageeg your business number or email address |
profile | InBoundContactProfile | true | none | none |
Enumerated Values
Property | Value |
---|---|
contactType | SMS |
contactType | OA |
contactType | |
contactType | |
contactType | PUSH |
contactType | |
contactType | TELEGRAM |
contactType | WEBSITE |
contactType | |
contactType | |
contactType | DUMMY |
contactType | EMPTY |
InBoundContactProfile
{
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
InBoundContactProfile
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
string | false | none | Email Id collected from Channel | |
name | string | false | none | Name collected from Channel |
phone | string | false | none | Mobile Number collected from Channel |
InBoundEvent
{
"checksum": "string",
"contact": {
"channelType": "string",
"contactId": "string",
"contactType": "string",
"csid": "string",
"email": "string",
"lane": "string",
"name": "string",
"phone": "string"
},
"contactId": "string",
"eventCode": "SESSION_ROUTED",
"eventId": "string",
"messageId": "string",
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"session": {
"agent": "string",
"bot": "string",
"dept": "string",
"firstMessage": true,
"initMessage": true,
"mode": "string",
"queue": "string",
"resolved": true,
"routingId": "string",
"sessionStamp": 0,
"ticketHash": "string"
},
"sessionAssigned": {
"newAgent": "string",
"newBot": "string",
"newDept": "string",
"oldAgent": "string",
"oldBot": "string",
"oldDept": "string"
},
"sessionId": "string",
"sessionRouted": {
"params": {},
"routingId": "string",
"sessionStart": true,
"sourceQueue": "string",
"targetQueue": "string"
},
"trace": [
{}
],
"type": "INBOUND"
}
InBoundEvent
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
checksum | string | true | none | none |
contact | Contactable | true | none | none |
contactId | string | true | none | none |
eventCode | string | true | none | Event Triggered by App/Service |
eventId | string | true | none | none |
messageId | string | true | none | none |
route | MessageRouter | true | none | none |
session | MessageSession | true | none | none |
sessionAssigned | SessionAssigned | true | none | none |
sessionId | string | true | none | none |
sessionRouted | SessionRouted | true | none | none |
trace | [object] | true | none | none |
type | string | true | none | Bound Type of Event Triggered by App/Service |
Enumerated Values
Property | Value |
---|---|
type | INBOUND |
type | OUTBOUND |
type | ACTION |
InBoundMeta
{
"appCode": "my_bot",
"appId": "61ec7d9c2ce85742b201c5ab",
"appMode": "WEBHOOK",
"appType": "FEEDBACK_V2",
"debug": true,
"domain": "alex",
"server": "server.com"
}
InBoundMeta
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
appCode | string | false | none | Client App Queue Code if webhook is set for an App |
appId | string | false | none | Client App Id if webhook is set for an App |
appMode | string | false | none | Client App mode |
appType | string | false | none | Client App Type |
debug | boolean | true | none | none |
domain | string | true | none | your domain name |
server | string | true | none | Server as per Enviroment |
Enumerated Values
Property | Value |
---|---|
appMode | AGENT |
appMode | BOT |
appMode | SCRIPTUS |
appMode | PUSH |
appMode | WEBHOOK |
appMode | NONE |
appType | FEEDBACK_V2 |
appType | BOTFLOW |
appType | APP_SCRIPT |
appType | BOT |
appType | FAQ |
appType | DEFAULT |
InBoundMsg
{
"attachments": [
{
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
}
],
"audio": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"contactId": "wa919988776655_918828218374",
"document": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"form": {
"reply_desc": "string",
"reply_id": "ACCEPT",
"reply_json": {},
"reply_title": "I Accept"
},
"from": 919988776655,
"id": 1234567,
"image": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"location": {
"address": "1 Hacker Way, Menlo Park, CA, 94025",
"latitude": 12.90909,
"longitude": 6.90808,
"name": "Main Building",
"url": "Location URL"
},
"messageIdExt": 1234567,
"originalMessage": {},
"referral": {
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
},
"session": {
"assignedToAgent": "SUPPORT",
"assignedToDept": "SUPPORT",
"routingId": "xsds34434-323-232",
"sessionId": "xsds34434"
},
"tags": {
"categories": [
"string"
],
"cities": [
"string"
],
"countries": [
"string"
],
"langs": [
"string"
],
"locations": [
"string"
],
"organizations": [
"string"
],
"persons": [
"string"
],
"sentimentScore": 0,
"sentiments": [
"string"
]
},
"text": {
"body": "your-text-message-content",
"type": "image"
},
"timestamp": 156753339076,
"type": "text",
"video": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"voice": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
}
}
InBoundMsg
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
attachments | [InBoundMsgMedia] | true | none | none |
audio | InBoundMsgMedia | true | none | none |
contactId | string | true | none | Unique Contact Id of user |
document | InBoundMsgMedia | true | none | none |
form | FormReply | true | none | none |
from | string | true | none | Contact of user |
id | string | true | none | Unique Message Id assigined by Service |
image | InBoundMsgMedia | true | none | none |
location | CommonMsgLocation | true | none | none |
messageIdExt | string | true | none | Unique Message Id assigined by Channel if any |
originalMessage | object | true | none | Original Message sent by Channel : only if modified/error by service |
referral | MessageReferral | true | none | none |
session | MsgSession | true | none | none |
tags | TagDocument | true | none | none |
text | InBoundMsgText | true | none | none |
timestamp | integer(int64) | true | none | message-timestamp |
type | string | true | none | message-type |
video | InBoundMsgMedia | true | none | none |
voice | InBoundMsgMedia | true | none | none |
Enumerated Values
Property | Value |
---|---|
type | audio |
type | document |
type | image |
type | location |
type | system |
type | text |
type | video |
type | voice |
InBoundMsgMedia
{
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
}
InBoundMsgMedia
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
caption | string | false | none | The provided caption for the media. |
filename | string | false | none | Filename on the sender’s device. |
id | string | true | none | ID of the media |
link | string | true | none | link-to-file |
linkSecure | string | true | none | secure-link-to-file |
mime_type | string | true | none | Mime type of the media. |
sha256 | string | true | none | checksum |
type | string | true | none | Message Type |
InBoundMsgStatus
{
"contact": {
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
},
"contactId": "wa919988776655_918828218374",
"errors": [
{
"code": 470,
"details": "string",
"href": "https://developers.facebook.com/docs/whatsapp/api/errors#error",
"title": "Failed to send message because you are outside the support window for freeform messages to this user. Please use a valid HSM notification or reconsider."
}
],
"id": 1234567,
"messageIdExt": 1234567,
"status": "DLVRD",
"timestamp": 156753339076
}
InBoundMsgStatus
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
contact | InBoundContact | true | none | none |
contactId | string | true | none | Unique Contact Id of user |
errors | [MessageReportError] | true | none | none |
id | string | true | none | Unique Message Id assigined by Service |
messageIdExt | string | true | none | Unique Message Id assigined by Channel if any |
status | string | true | none | latest status shortcode of message |
timestamp | integer(int64) | true | none | message-timestamp |
Enumerated Values
Property | Value |
---|---|
status | READ |
status | DLVRD |
status | SENT |
status | FAILD |
status | DELTD |
InBoundMsgText
{
"body": "your-text-message-content",
"type": "image"
}
InBoundMsgText
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
body | string | true | none | Message Text |
type | string | true | none | Message Type |
InBoundWrapper
{
"actions": [
{
"actionCode": "SEND_INVOICE"
}
],
"contacts": [
{
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
}
],
"events": [
{
"checksum": "string",
"contact": {
"channelType": "string",
"contactId": "string",
"contactType": "string",
"csid": "string",
"email": "string",
"lane": "string",
"name": "string",
"phone": "string"
},
"contactId": "string",
"eventCode": "SESSION_ROUTED",
"eventId": "string",
"messageId": "string",
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"session": {
"agent": "string",
"bot": "string",
"dept": "string",
"firstMessage": true,
"initMessage": true,
"mode": "string",
"queue": "string",
"resolved": true,
"routingId": "string",
"sessionStamp": 0,
"ticketHash": "string"
},
"sessionAssigned": {
"newAgent": "string",
"newBot": "string",
"newDept": "string",
"oldAgent": "string",
"oldBot": "string",
"oldDept": "string"
},
"sessionId": "string",
"sessionRouted": {
"params": {},
"routingId": "string",
"sessionStart": true,
"sourceQueue": "string",
"targetQueue": "string"
},
"trace": [
{}
],
"type": "INBOUND"
}
],
"messages": [
{
"attachments": [
{
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
}
],
"audio": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"contactId": "wa919988776655_918828218374",
"document": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"form": {
"reply_desc": "string",
"reply_id": "ACCEPT",
"reply_json": {},
"reply_title": "I Accept"
},
"from": 919988776655,
"id": 1234567,
"image": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"location": {
"address": "1 Hacker Way, Menlo Park, CA, 94025",
"latitude": 12.90909,
"longitude": 6.90808,
"name": "Main Building",
"url": "Location URL"
},
"messageIdExt": 1234567,
"originalMessage": {},
"referral": {
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
},
"session": {
"assignedToAgent": "SUPPORT",
"assignedToDept": "SUPPORT",
"routingId": "xsds34434-323-232",
"sessionId": "xsds34434"
},
"tags": {
"categories": [
"string"
],
"cities": [
"string"
],
"countries": [
"string"
],
"langs": [
"string"
],
"locations": [
"string"
],
"organizations": [
"string"
],
"persons": [
"string"
],
"sentimentScore": 0,
"sentiments": [
"string"
]
},
"text": {
"body": "your-text-message-content",
"type": "image"
},
"timestamp": 156753339076,
"type": "text",
"video": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
},
"voice": {
"caption": "document-caption",
"filename": "document-filename",
"id": 2121212,
"link": "http(s)://link-to-media-file-url",
"linkSecure": "https://link-to-media-file-url",
"mime_type": "video/mp4",
"sha256": "m3232kaoe4belrr",
"type": "image"
}
}
],
"meta": {
"appCode": "my_bot",
"appId": "61ec7d9c2ce85742b201c5ab",
"appMode": "WEBHOOK",
"appType": "FEEDBACK_V2",
"debug": true,
"domain": "alex",
"server": "server.com"
},
"statuses": [
{
"contact": {
"businessProfile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655,
"profileId": "C34567"
},
"channelId": "wa360:919988776655",
"contactId": 1234567,
"contactType": "WHATSAPP",
"csid": "91YOURNUMBER",
"lane": 919999998888,
"profile": {
"email": "abc@xyz.com",
"name": "John Doe",
"phone": 919988776655
}
},
"contactId": "wa919988776655_918828218374",
"errors": [
{
"code": 470,
"details": "string",
"href": "https://developers.facebook.com/docs/whatsapp/api/errors#error",
"title": "Failed to send message because you are outside the support window for freeform messages to this user. Please use a valid HSM notification or reconsider."
}
],
"id": 1234567,
"messageIdExt": 1234567,
"status": "DLVRD",
"timestamp": 156753339076
}
],
"type": "message"
}
InBoundWrapper
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
actions | [InBoundAction] | true | none | none |
contacts | [InBoundContact] | true | none | none |
events | [InBoundEvent] | true | none | none |
messages | [InBoundMsg] | true | none | none |
meta | InBoundMeta | true | none | none |
statuses | [InBoundMsgStatus] | true | none | none |
type | string | true | none | Type of Event |
Enumerated Values
Property | Value |
---|---|
type | messages |
type | actions |
type | events |
type | statuses |
MapModel
{
"first": {}
}
MapModel
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
first | object | true | none | none |
MessagePrompt
{
"messageId": "string",
"pageIndex": 0,
"type": "string"
}
MessagePrompt
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
messageId | string | true | none | none |
pageIndex | integer(int32) | true | none | none |
type | string | true | none | none |
MessageReferral
{
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
}
MessageReferral
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
body | string | true | none | none |
bulkdId | string | true | none | none |
imageUrl | string | true | none | none |
info | object | true | none | none |
mediaType | string | true | none | none |
mediaUrl | string | true | none | none |
messageId | string | true | none | none |
messageIdExt | string | true | none | none |
sourceCategory | string | true | none | Category of Referral Source |
sourceId | string | true | none | none |
sourceType | string | true | none | Type of Referral Source |
sourceUrl | string | true | none | none |
thumbUrl | string | true | none | none |
title | string | true | none | none |
Enumerated Values
Property | Value |
---|---|
sourceCategory | message |
sourceCategory | social |
sourceCategory | ads |
sourceCategory | campaign |
sourceType | inbound |
sourceType | outbound |
sourceType | feedback |
sourceType | story |
sourceType | post |
MessageReportError
{
"code": 470,
"details": "string",
"href": "https://developers.facebook.com/docs/whatsapp/api/errors#error",
"title": "Failed to send message because you are outside the support window for freeform messages to this user. Please use a valid HSM notification or reconsider."
}
MessageReportError
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string | true | none | Error code. |
details | string | false | none | Error details provided, if available/applicable |
href | string | false | none | Location for error detail |
title | string | true | none | Error code |
MessageRouter
{
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
}
MessageRouter
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
queueCode | string | true | none | none |
routerId | string | true | none | none |
sendMode | string | true | none | none |
senderApp | string | true | none | none |
senderCode | string | true | none | none |
senderType | string | true | none | none |
MessageSession
{
"agent": "string",
"bot": "string",
"dept": "string",
"firstMessage": true,
"initMessage": true,
"mode": "string",
"queue": "string",
"resolved": true,
"routingId": "string",
"sessionStamp": 0,
"ticketHash": "string"
}
MessageSession
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
agent | string | true | none | none |
bot | string | true | none | none |
dept | string | true | none | none |
firstMessage | boolean | true | none | none |
initMessage | boolean | true | none | none |
mode | string | true | none | none |
queue | string | true | none | none |
resolved | boolean | true | none | none |
routingId | string | true | none | none |
sessionStamp | integer(int64) | true | none | none |
ticketHash | string | true | none | none |
MsgChannel
{
"channelId": "wa360:918828218374",
"contactType": "WHATSAPP",
"lane": 919999998888,
"name": "Customer Support"
}
MsgChannel
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
channelId | string | true | none | Channel used |
contactType | string | true | none | Contact Type |
lane | string | true | none | Contact Used by User while sending messageeg your business number or email address |
name | string | true | none | Channel name set in configuration |
Enumerated Values
Property | Value |
---|---|
contactType | SMS |
contactType | OA |
contactType | |
contactType | |
contactType | PUSH |
contactType | |
contactType | TELEGRAM |
contactType | WEBSITE |
contactType | |
contactType | |
contactType | DUMMY |
contactType | EMPTY |
MsgSession
{
"assignedToAgent": "SUPPORT",
"assignedToDept": "SUPPORT",
"routingId": "xsds34434-323-232",
"sessionId": "xsds34434"
}
MsgSession
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
assignedToAgent | string | true | none | Message Assignment If Any |
assignedToDept | string | true | none | Message Assignment If Any |
routingId | string | true | none | RoutingId |
sessionId | string | true | none | SessionId |
OutBoundContact
{
"contactId": "string",
"email": "string",
"name": "string",
"phone": "string"
}
OutBoundContact
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
contactId | string | true | none | Contact Id is unique id for any contact, you will recieve it in Inbound.contact |
string | true | none | Email Address for email message. | |
name | string | true | none | Name of to be used will, override the name in message |
phone | string | true | none | Phone in caseo of SMS/WHATSAPP |
OutBoundMsg
{
"audio": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
},
"channelId": "91SERVICENUMBER",
"contacts": [
{
"addresses": [
{
"city": "Menlo Park",
"country": "United States",
"country_code": "us",
"state": "CA",
"street": "1 Hacker Way",
"type": "HOME",
"zip": 94025
}
],
"birthday": "string",
"emails": [
{
"email": "test@whatsapp.com",
"type": "WORK"
}
],
"ims": [
{
"service": "FACEBOOK",
"userid": "https://www.facebook.com"
}
],
"name": {
"first_name": "John",
"formatted_name": "John Smith",
"last_name": "Smith"
},
"org": {
"company": "WhatsApp",
"department": "Design",
"title": "Manager"
},
"phones": [
{
"phone": "+1 (940) 555-1234",
"type": "HOME",
"wa_id": 16505551234
}
],
"urls": [
{
"type": "WORK",
"url": "https://www.facebook.com"
}
]
}
],
"document": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
},
"image": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
},
"location": {
"address": "1 Hacker Way, Menlo Park, CA, 94025",
"latitude": 12.90909,
"longitude": 6.90808,
"name": "Main Building",
"url": "Location URL"
},
"mask": false,
"messageIdResend": "gBEGkYiEB1VXAglK1ZEqA1YKPrU",
"options": {
"buttonDisplayScheme": "auto",
"buttons": [
{
"action": "NAVIGATE",
"code": "occupation",
"desc": "What occupation you have",
"label": "Occupation",
"name": "string",
"phone": "+91 9988776655",
"type": "QUICK_REPLY",
"uid": 806799978207096,
"url": "http://url",
"variable": "data.var_1"
}
]
},
"template": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"text": {
"body": "your-text-message-content"
},
"to": {
"contactId": "string",
"email": "string",
"name": "string",
"phone": "string"
},
"type": "text",
"video": {
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
}
}
OutBoundMsg
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
audio | OutBoundMsgMedia | false | none | none |
channelId | string | true | none | The ID that identifies the channel over which the message should be sent. |
contacts | [CommonMsgContactCard] | true | none | none |
document | OutBoundMsgMedia | false | none | none |
image | OutBoundMsgMedia | false | none | none |
location | CommonMsgLocation | true | none | none |
mask | boolean | true | none | Mask the outgoing message data |
messageIdResend | string | false | none | Messsage to be resent |
options | CommonMsgOptions | false | none | none |
template | CommonTemplateMeta | false | none | none |
text | OutBoundMsgText | false | none | none |
to | OutBoundContact | true | none | none |
type | string | true | none | message-type |
video | OutBoundMsgMedia | false | none | none |
Enumerated Values
Property | Value |
---|---|
type | audio |
type | document |
type | image |
type | location |
type | system |
type | text |
type | video |
type | voice |
type | contacts |
type | template |
type | optin |
type | optout |
OutBoundMsgContactAddress
{
"city": "Menlo Park",
"country": "United States",
"country_code": "us",
"state": "CA",
"street": "1 Hacker Way",
"type": "HOME",
"zip": 94025
}
OutBoundMsgContactAddress
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
city | string | true | none | none |
country | string | true | none | none |
country_code | string | true | none | none |
state | string | true | none | none |
street | string | true | none | none |
type | string | true | none | none |
zip | string | true | none | none |
OutBoundMsgContactEmail
{
"email": "test@whatsapp.com",
"type": "WORK"
}
OutBoundMsgContactEmail
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
string | true | none | none | |
type | string | true | none | none |
OutBoundMsgContactName
{
"first_name": "John",
"formatted_name": "John Smith",
"last_name": "Smith"
}
OutBoundMsgContactName
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
first_name | string | true | none | none |
formatted_name | string | true | none | none |
last_name | string | true | none | none |
OutBoundMsgContactOrg
{
"company": "WhatsApp",
"department": "Design",
"title": "Manager"
}
OutBoundMsgContactOrg
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
company | string | true | none | none |
department | string | true | none | none |
title | string | true | none | none |
OutBoundMsgContactPhone
{
"phone": "+1 (940) 555-1234",
"type": "HOME",
"wa_id": 16505551234
}
OutBoundMsgContactPhone
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
phone | string | true | none | none |
type | string | true | none | none |
wa_id | string | true | none | none |
OutBoundMsgContactSocial
{
"service": "FACEBOOK",
"userid": "https://www.facebook.com"
}
OutBoundMsgContactSocial
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
service | string | true | none | none |
userid | string | true | none | none |
OutBoundMsgContactUrl
{
"type": "WORK",
"url": "https://www.facebook.com"
}
OutBoundMsgContactUrl
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
type | string | true | none | none |
url | string | true | none | none |
OutBoundMsgMedia
{
"caption": "your-video-caption",
"filename": "your-video-caption",
"link": "http(s)://the-url"
}
OutBoundMsgMedia
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
caption | string | false | none | your-media-caption |
filename | string | false | none | your-document-filename |
link | string | false | none | Public URL of Media file |
OutBoundMsgText
{
"body": "your-text-message-content"
}
OutBoundMsgText
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
body | string | true | none | Message Text |
OutBoundReciept
{
"id": "gBEGkYiEB1VXAglK1ZEqA1YKPrU",
"templateCode": "string",
"templateId": "string",
"type": "string"
}
OutBoundReciept
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
templateCode | string | true | none | none |
templateId | string | true | none | none |
type | string | true | none | none |
OutboxMessage
{
"action": "string",
"attachments": [
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
],
"attempt": 0,
"bulkSessionId": "string",
"campaignTitle": "string",
"cancelExisting": true,
"collapseId": "string",
"contact": {
"channelType": "string",
"contactId": "string",
"contactType": "string",
"csid": "string",
"email": "string",
"lane": "string",
"name": "string",
"phone": "string"
},
"contacts": [
{
"channelType": "string",
"contactId": "wa919876543210",
"contactType": "string",
"country": "string",
"csid": "string",
"email": "John.Doe@company.co",
"filters": [
{
"property1": {},
"property2": {}
}
],
"keymap": [
{
"property1": "string",
"property2": "string"
}
],
"lane": "string",
"name": "John Doe",
"phone": 919876543210,
"prefix": "string",
"tenant": "string",
"userid": "string"
}
],
"csid": "string",
"files": [
{
"body": "string",
"content": "string",
"contentLength": 0,
"contentType": "string",
"converter": "AMXFS",
"extension": "string",
"fileFormat": "PDF",
"fileType": "IMAGE",
"headers": {
"property1": "string",
"property2": "string"
},
"meta": {},
"model": {},
"name": "string",
"options": {},
"password": "string",
"path": "string",
"template": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"thumb": "string",
"title": "string",
"url": "string"
}
],
"footer": "string",
"formatSubType": "string",
"formatType": "string",
"from": "string",
"fromName": "string",
"groupId": "string",
"groupName": "string",
"groups": [
"string"
],
"hsm": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"id": "string",
"lines": [
"string"
],
"logs": [
{}
],
"message": "string",
"messageId": "string",
"messageIdExt": "string",
"messageIdRef": "string",
"messageIdResend": "string",
"meta": {},
"model": {},
"options": {},
"priority": 0,
"prompt": {
"messageId": "string",
"pageIndex": 0,
"type": "string"
},
"queue": 0,
"rawMessageFormat": {},
"referenceKey": "string",
"referral": {
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
},
"replyId": "string",
"replyIdExt": "string",
"replyTo": {},
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"scheduler": {
"data": {},
"endAt": "string",
"interval": "string",
"repeat": true,
"repeatCount": 0,
"startAt": "string",
"taskId": "string",
"topic": "string"
},
"session": {
"agent": "string",
"bot": "string",
"dept": "string",
"firstMessage": true,
"initMessage": true,
"mode": "string",
"queue": "string",
"resolved": true,
"routingId": "string",
"sessionStamp": 0,
"ticketHash": "string"
},
"sessionId": "string",
"stamps": {
"property1": 0,
"property2": 0
},
"status": "SCHLD",
"subject": "string",
"templateExt": {
"code": "string",
"template": {},
"varMap": {}
},
"timestamp": 0,
"to": [
"string"
],
"trace": [
{}
],
"type": "string",
"vccards": [
{
"addresses": [
{
"city": "string",
"country": "string",
"countryCode": "string",
"state": "string",
"street": "string",
"type": "string",
"uuid": "string",
"zip": "string"
}
],
"dates": [
{
"date": "string",
"label": "string",
"type": "string"
}
],
"emails": [
{
"email": "string",
"label": "string",
"type": "string",
"uuid": "string"
}
],
"ims": [
{
"service": "string",
"userid": "string"
}
],
"locations": [
{
"address": "string",
"latitude": "string",
"longitude": "string",
"name": "string",
"url": "string"
}
],
"name": {
"firstName": "string",
"formattedName": "string",
"lastName": "string",
"middleName": "string"
},
"phones": [
{
"country": "string",
"countryCallingCode": "string",
"ext": "string",
"label": "string",
"nationalNumber": "string",
"phone": "string",
"type": "string",
"uuid": "string",
"whatsAppId": "string"
}
],
"urls": [
{
"label": "string",
"type": "string",
"url": "string",
"uuid": "string"
}
],
"work": [
{
"company": "string",
"department": "string",
"label": "string",
"title": "string"
}
]
}
]
}
OutboxMessage
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
action | string | true | none | none |
attachments | [Attachment] | true | none | none |
attempt | integer(int32) | true | none | none |
bulkSessionId | string | true | none | none |
campaignTitle | string | true | none | none |
cancelExisting | boolean | true | none | none |
collapseId | string | true | none | none |
contact | Contactable | true | none | none |
contacts | [ContactMeta] | true | none | none |
csid | string | true | none | none |
files | [PostManFile] | true | none | none |
footer | string | true | none | none |
formatSubType | string | true | none | none |
formatType | string | true | none | none |
from | string | true | none | none |
fromName | string | true | none | none |
groupId | string | true | none | none |
groupName | string | true | none | none |
groups | [string] | true | none | none |
hsm | CommonTemplateMeta | true | none | none |
id | string | true | none | none |
lines | [string] | true | none | none |
logs | [object] | true | none | none |
message | string | true | none | none |
messageId | string | true | none | none |
messageIdExt | string | true | none | none |
messageIdRef | string | true | none | none |
messageIdResend | string | true | none | none |
meta | object | true | none | none |
model | object | true | none | none |
options | object | true | none | none |
priority | integer(int32) | true | none | none |
prompt | MessagePrompt | true | none | none |
queue | number | true | none | none |
rawMessageFormat | object | true | none | none |
referenceKey | string | true | none | none |
referral | MessageReferral | true | none | none |
replyId | string | true | none | none |
replyIdExt | string | true | none | none |
replyTo | object | true | none | none |
route | MessageRouter | true | none | none |
scheduler | ChronoScheduler | true | none | none |
session | MessageSession | true | none | none |
sessionId | string | true | none | none |
stamps | object | true | none | none |
» additionalProperties | integer(int64) | false | none | none |
status | string | true | none | none |
subject | string | true | none | none |
templateExt | BasicExternalTemplate | true | none | none |
timestamp | integer(int64) | true | none | none |
to | [string] | true | none | none |
trace | [object] | true | none | none |
type | string | true | none | none |
vccards | [PBVCard] | true | none | none |
Enumerated Values
Property | Value |
---|---|
status | SCHLD |
status | CRTD |
status | INIT |
status | SENT |
status | SENT_ERR |
status | SENT_EXC |
status | SENTX |
status | SENTX_ERR |
status | DLVRD |
status | READ |
status | NSENT |
status | BLCKD |
status | LIMIT |
status | FAILD |
status | DELTD |
status | CCWIN |
status | RECEIVD |
status | CONSUMED |
status | FORWARDED |
status | FORWARD_ERR |
status | STATUS_FORWARD_ERR |
PBAddress
{
"city": "string",
"country": "string",
"countryCode": "string",
"state": "string",
"street": "string",
"type": "string",
"uuid": "string",
"zip": "string"
}
PBAddress
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
city | string | true | none | none |
country | string | true | none | none |
countryCode | string | true | none | none |
state | string | true | none | none |
street | string | true | none | none |
type | string | true | none | none |
uuid | string | true | none | none |
zip | string | true | none | none |
PBDate
{
"date": "string",
"label": "string",
"type": "string"
}
PBDate
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
date | string | true | none | none |
label | string | true | none | none |
type | string | true | none | none |
PBEmail
{
"email": "string",
"label": "string",
"type": "string",
"uuid": "string"
}
PBEmail
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
string | true | none | none | |
label | string | true | none | none |
type | string | true | none | none |
uuid | string | true | none | none |
PBLocation
{
"address": "string",
"latitude": "string",
"longitude": "string",
"name": "string",
"url": "string"
}
PBLocation
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
address | string | true | none | none |
latitude | string | true | none | none |
longitude | string | true | none | none |
name | string | true | none | none |
url | string | true | none | none |
PBName
{
"firstName": "string",
"formattedName": "string",
"lastName": "string",
"middleName": "string"
}
PBName
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
firstName | string | true | none | none |
formattedName | string | true | none | none |
lastName | string | true | none | none |
middleName | string | true | none | none |
PBPhone
{
"country": "string",
"countryCallingCode": "string",
"ext": "string",
"label": "string",
"nationalNumber": "string",
"phone": "string",
"type": "string",
"uuid": "string",
"whatsAppId": "string"
}
PBPhone
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
country | string | true | none | none |
countryCallingCode | string | true | none | none |
ext | string | true | none | none |
label | string | true | none | none |
nationalNumber | string | true | none | none |
phone | string | true | none | none |
type | string | true | none | none |
uuid | string | true | none | none |
whatsAppId | string | true | none | none |
PBSocial
{
"service": "string",
"userid": "string"
}
PBSocial
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
service | string | true | none | none |
userid | string | true | none | none |
PBVCard
{
"addresses": [
{
"city": "string",
"country": "string",
"countryCode": "string",
"state": "string",
"street": "string",
"type": "string",
"uuid": "string",
"zip": "string"
}
],
"dates": [
{
"date": "string",
"label": "string",
"type": "string"
}
],
"emails": [
{
"email": "string",
"label": "string",
"type": "string",
"uuid": "string"
}
],
"ims": [
{
"service": "string",
"userid": "string"
}
],
"locations": [
{
"address": "string",
"latitude": "string",
"longitude": "string",
"name": "string",
"url": "string"
}
],
"name": {
"firstName": "string",
"formattedName": "string",
"lastName": "string",
"middleName": "string"
},
"phones": [
{
"country": "string",
"countryCallingCode": "string",
"ext": "string",
"label": "string",
"nationalNumber": "string",
"phone": "string",
"type": "string",
"uuid": "string",
"whatsAppId": "string"
}
],
"urls": [
{
"label": "string",
"type": "string",
"url": "string",
"uuid": "string"
}
],
"work": [
{
"company": "string",
"department": "string",
"label": "string",
"title": "string"
}
]
}
PBVCard
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
addresses | [PBAddress] | true | none | none |
dates | [PBDate] | true | none | none |
emails | [PBEmail] | true | none | none |
ims | [PBSocial] | true | none | none |
locations | [PBLocation] | true | none | none |
name | PBName | true | none | none |
phones | [PBPhone] | true | none | none |
urls | [PBWebsite] | true | none | none |
work | [PBWork] | true | none | none |
PBWebsite
{
"label": "string",
"type": "string",
"url": "string",
"uuid": "string"
}
PBWebsite
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
label | string | true | none | none |
type | string | true | none | none |
url | string | true | none | none |
uuid | string | true | none | none |
PBWork
{
"company": "string",
"department": "string",
"label": "string",
"title": "string"
}
PBWork
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
company | string | true | none | none |
department | string | true | none | none |
label | string | true | none | none |
title | string | true | none | none |
PostManFile
{
"body": "string",
"content": "string",
"contentLength": 0,
"contentType": "string",
"converter": "AMXFS",
"extension": "string",
"fileFormat": "PDF",
"fileType": "IMAGE",
"headers": {
"property1": "string",
"property2": "string"
},
"meta": {},
"model": {},
"name": "string",
"options": {},
"password": "string",
"path": "string",
"template": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"thumb": "string",
"title": "string",
"url": "string"
}
PostManFile
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
body | string(byte) | true | none | none |
content | string | true | none | none |
contentLength | integer(int64) | true | none | none |
contentType | string | true | none | none |
converter | string | true | none | none |
extension | string | true | none | none |
fileFormat | string | true | none | none |
fileType | string | true | none | none |
headers | object | true | none | none |
» additionalProperties | string | false | none | none |
meta | object | true | none | none |
model | object | true | none | none |
name | string | true | none | none |
options | object | true | none | none |
password | string | true | none | none |
path | string | true | none | none |
template | CommonTemplateMeta | true | none | none |
thumb | string | true | none | none |
title | string | true | none | none |
url | string | true | none | none |
Enumerated Values
Property | Value |
---|---|
converter | AMXFS |
converter | FS |
converter | FOP |
converter | ITEXT5 |
converter | ITEXT7 |
converter | JASPER |
fileFormat | |
fileFormat | CSV |
fileFormat | PNG |
fileFormat | JPEG |
fileFormat | JPG |
fileFormat | BMP |
fileFormat | GIF |
fileFormat | TIFF |
fileFormat | TIF |
fileFormat | WEBP |
fileFormat | MP3 |
fileFormat | aac |
fileFormat | AMR |
fileFormat | OGG |
fileFormat | OGG_PLUS |
fileFormat | AUDIO_MP4 |
fileFormat | AUDIO_MPEG |
fileFormat | AUDIO_WEBM |
fileFormat | AUDIO_OPUS |
fileFormat | AUDIO_WEBM_OPUS |
fileFormat | MP4 |
fileFormat | VIDEO_3GPP |
fileFormat | JSON |
fileFormat | HTML |
fileFormat | TEXT |
fileFormat | UNKNOWN |
fileType | IMAGE |
fileType | VIDEO |
fileType | AUDIO |
fileType | TEXT |
fileType | DOCUMENT |
fileType | FILE |
fileType | URL |
SessionAssigned
{
"newAgent": "string",
"newBot": "string",
"newDept": "string",
"oldAgent": "string",
"oldBot": "string",
"oldDept": "string"
}
SessionAssigned
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
newAgent | string | true | none | none |
newBot | string | true | none | none |
newDept | string | true | none | none |
oldAgent | string | true | none | none |
oldBot | string | true | none | none |
oldDept | string | true | none | none |
SessionQueueAssignment
{
"agent": "external_bot",
"params": {},
"queue": "external_bot",
"sessionId": "61f3810a02e14c0877fc1a32",
"skills": [
"dental",
"ortho"
],
"team": "external_bot"
}
SessionQueueAssignment
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
agent | string | false | none | Agent Code, applicable only if queue type is Agent |
params | object | true | none | none |
queue | string | true | none | Next queue where session should be routed |
sessionId | string | true | none | Session to be routed |
skills | [string] | false | none | Agent Skills, applicable only if queue type is Agent |
team | string | false | none | Team Code, applicable only if queue type is Agent |
SessionRouted
{
"params": {},
"routingId": "string",
"sessionStart": true,
"sourceQueue": "string",
"targetQueue": "string"
}
SessionRouted
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
params | object | true | none | Additional params sent by Router |
routingId | string | true | none | none |
sessionStart | boolean | true | none | none |
sourceQueue | string | true | none | none |
targetQueue | string | true | none | none |
SessionStatusClose
{
"sessionId": "61f3810a02e14c0877fc1a32"
}
SessionStatusClose
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
sessionId | string | true | none | Session to be closed |
TagDocument
{
"categories": [
"string"
],
"cities": [
"string"
],
"countries": [
"string"
],
"langs": [
"string"
],
"locations": [
"string"
],
"organizations": [
"string"
],
"persons": [
"string"
],
"sentimentScore": 0,
"sentiments": [
"string"
]
}
TagDocument
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
categories | [string] | true | none | none |
cities | [string] | true | none | none |
countries | [string] | true | none | none |
langs | [string] | true | none | none |
locations | [string] | true | none | none |
organizations | [string] | true | none | none |
persons | [string] | true | none | none |
sentimentScore | integer(int32) | true | none | none |
sentiments | [string] | true | none | none |
TmplElement
{
"action": "NAVIGATE",
"code": "occupation",
"desc": "What occupation you have",
"label": "Occupation",
"name": "string",
"phone": "+91 9988776655",
"type": "QUICK_REPLY",
"uid": 806799978207096,
"url": "http://url",
"variable": "data.var_1"
}
TmplElement
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
action | string | false | none | Required in case of WA Flows |
code | string | false | none | key to be used programmatically |
desc | string | false | none | Description of of element |
label | string | false | none | Display Text to be used programmatically |
name | string | true | none | none |
phone | string | false | none | If type is set to PHONE_NUMBER |
type | string | false | none | Display Text |
uid | string | false | none | Any UniqeId to be used |
url | string | false | none | If type is set to URL |
variable | string | false | none | dynamic variable |
Enumerated Values
Property | Value |
---|---|
type | QUICK_REPLY |
type | URL |
type | PHONE_NUMBER |
type | LOCATION_REQUEST |
WebhookUrlRequest
{
"url": "https://www.example.com/webhook"
}
WebhookUrlRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
url | string | true | none | The webhook URL can either be: - the URL from your own application- or the partner |
ApiResponse_Attachment_object_
{
"data": {
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
},
"details": [
{}
],
"error": "string",
"errors": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
],
"exception": "string",
"extra": {},
"logs": [
"string"
],
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"params": {},
"path": "/postman/email/send",
"query": {},
"redirectUrl": "/go/to/some/other/url.html",
"results": [
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
],
"serverVersion": "string",
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string",
"traces": [
{}
],
"warningKey": "string",
"warnings": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
]
}
ApiResponse«Attachment,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | Attachment | true | none | none |
details | [object] | true | none | none |
error | string | true | none | none |
errors | [ApiFieldError] | true | none | none |
exception | string | true | none | none |
extra | object | true | none | none |
logs | [string] | true | none | none |
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
params | object | true | none | none |
path | string | true | none | none |
query | object | true | none | none |
redirectUrl | string | true | none | none |
results | [Attachment] | true | none | none |
serverVersion | string | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
traces | [object] | true | none | none |
warningKey | string | true | none | none |
warnings | [ApiFieldError] | true | none | none |
ApiResponse_ClientApp_object_
{
"data": {
"agentApp": true,
"appHook": "string",
"appHookFrwrd": "string",
"appMode": "string",
"appType": "string",
"config": {},
"feedbackApp": true,
"forward": "string",
"id": "string",
"key": "string",
"keyName": "string",
"keyVersion": "string",
"props": {},
"queue": "string",
"readOnly": true,
"secret": {},
"shared": true,
"type": "string",
"webhook": "string"
},
"details": [
{}
],
"error": "string",
"errors": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
],
"exception": "string",
"extra": {},
"logs": [
"string"
],
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"params": {},
"path": "/postman/email/send",
"query": {},
"redirectUrl": "/go/to/some/other/url.html",
"results": [
{
"agentApp": true,
"appHook": "string",
"appHookFrwrd": "string",
"appMode": "string",
"appType": "string",
"config": {},
"feedbackApp": true,
"forward": "string",
"id": "string",
"key": "string",
"keyName": "string",
"keyVersion": "string",
"props": {},
"queue": "string",
"readOnly": true,
"secret": {},
"shared": true,
"type": "string",
"webhook": "string"
}
],
"serverVersion": "string",
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string",
"traces": [
{}
],
"warningKey": "string",
"warnings": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
]
}
ApiResponse«ClientApp,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | ClientApp | true | none | none |
details | [object] | true | none | none |
error | string | true | none | none |
errors | [ApiFieldError] | true | none | none |
exception | string | true | none | none |
extra | object | true | none | none |
logs | [string] | true | none | none |
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
params | object | true | none | none |
path | string | true | none | none |
query | object | true | none | none |
redirectUrl | string | true | none | none |
results | [ClientApp] | true | none | none |
serverVersion | string | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
traces | [object] | true | none | none |
warningKey | string | true | none | none |
warnings | [ApiFieldError] | true | none | none |
ApiResponse_CompanyVarsConfigDoc_object_
{
"data": {
"description": "string",
"disabled": true,
"domain": "string",
"empty": true,
"group": "string",
"id": "string",
"key": "string",
"missing": true,
"present": true,
"primary": true,
"server": "string",
"shared": true,
"type": "string",
"value": {}
},
"details": [
{}
],
"error": "string",
"errors": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
],
"exception": "string",
"extra": {},
"logs": [
"string"
],
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"params": {},
"path": "/postman/email/send",
"query": {},
"redirectUrl": "/go/to/some/other/url.html",
"results": [
{
"description": "string",
"disabled": true,
"domain": "string",
"empty": true,
"group": "string",
"id": "string",
"key": "string",
"missing": true,
"present": true,
"primary": true,
"server": "string",
"shared": true,
"type": "string",
"value": {}
}
],
"serverVersion": "string",
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string",
"traces": [
{}
],
"warningKey": "string",
"warnings": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
]
}
ApiResponse«CompanyVarsConfigDoc,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | CompanyVarsConfigDoc | true | none | none |
details | [object] | true | none | none |
error | string | true | none | none |
errors | [ApiFieldError] | true | none | none |
exception | string | true | none | none |
extra | object | true | none | none |
logs | [string] | true | none | none |
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
params | object | true | none | none |
path | string | true | none | none |
query | object | true | none | none |
redirectUrl | string | true | none | none |
results | [CompanyVarsConfigDoc] | true | none | none |
serverVersion | string | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
traces | [object] | true | none | none |
warningKey | string | true | none | none |
warnings | [ApiFieldError] | true | none | none |
ApiResponse_DigitalEventDto_object_
{
"data": {
"eventName": "CUSTOMER_CREATED",
"id": 1234567,
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
]
},
"details": [
{}
],
"error": "string",
"errors": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
],
"exception": "string",
"extra": {},
"logs": [
"string"
],
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"params": {},
"path": "/postman/email/send",
"query": {},
"redirectUrl": "/go/to/some/other/url.html",
"results": [
{
"eventName": "CUSTOMER_CREATED",
"id": 1234567,
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
]
}
],
"serverVersion": "string",
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string",
"traces": [
{}
],
"warningKey": "string",
"warnings": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
]
}
ApiResponse«DigitalEventDto,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | DigitalEventDto | true | none | none |
details | [object] | true | none | none |
error | string | true | none | none |
errors | [ApiFieldError] | true | none | none |
exception | string | true | none | none |
extra | object | true | none | none |
logs | [string] | true | none | none |
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
params | object | true | none | none |
path | string | true | none | none |
query | object | true | none | none |
redirectUrl | string | true | none | none |
results | [DigitalEventDto] | true | none | none |
serverVersion | string | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
traces | [object] | true | none | none |
warningKey | string | true | none | none |
warnings | [ApiFieldError] | true | none | none |
ApiResponse_DigitalObjectDto_object_
{
"data": {
"data": {},
"id": "string",
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
],
"type": "string"
},
"details": [
{}
],
"error": "string",
"errors": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
],
"exception": "string",
"extra": {},
"logs": [
"string"
],
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"params": {},
"path": "/postman/email/send",
"query": {},
"redirectUrl": "/go/to/some/other/url.html",
"results": [
{
"data": {},
"id": "string",
"links": [
{
"linkName": "string",
"linkType": "string",
"linkValue": "string"
}
],
"type": "string"
}
],
"serverVersion": "string",
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string",
"traces": [
{}
],
"warningKey": "string",
"warnings": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
]
}
ApiResponse«DigitalObjectDto,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | DigitalObjectDto | true | none | none |
details | [object] | true | none | none |
error | string | true | none | none |
errors | [ApiFieldError] | true | none | none |
exception | string | true | none | none |
extra | object | true | none | none |
logs | [string] | true | none | none |
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
params | object | true | none | none |
path | string | true | none | none |
query | object | true | none | none |
redirectUrl | string | true | none | none |
results | [DigitalObjectDto] | true | none | none |
serverVersion | string | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
traces | [object] | true | none | none |
warningKey | string | true | none | none |
warnings | [ApiFieldError] | true | none | none |
ApiResponse_HSMTemplateDoc_object_
{
"data": {
"approved": [
{
"channelId": "string",
"status": "string",
"templateId": "string"
}
],
"attachments": [
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
],
"body": "string",
"category": "string",
"categoryType": "string",
"code": "string",
"contactType": "string",
"createdBy": "string",
"createdStamp": 0,
"desc": "string",
"footer": "string",
"formatType": "string",
"header": "string",
"id": "string",
"lang": "string",
"meta": {},
"model": {},
"name": "string",
"options": {},
"template": "string",
"title": "string"
},
"details": [
{}
],
"error": "string",
"errors": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
],
"exception": "string",
"extra": {},
"logs": [
"string"
],
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"params": {},
"path": "/postman/email/send",
"query": {},
"redirectUrl": "/go/to/some/other/url.html",
"results": [
{
"approved": [
{
"channelId": "string",
"status": "string",
"templateId": "string"
}
],
"attachments": [
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
],
"body": "string",
"category": "string",
"categoryType": "string",
"code": "string",
"contactType": "string",
"createdBy": "string",
"createdStamp": 0,
"desc": "string",
"footer": "string",
"formatType": "string",
"header": "string",
"id": "string",
"lang": "string",
"meta": {},
"model": {},
"name": "string",
"options": {},
"template": "string",
"title": "string"
}
],
"serverVersion": "string",
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string",
"traces": [
{}
],
"warningKey": "string",
"warnings": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
]
}
ApiResponse«HSMTemplateDoc,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | HSMTemplateDoc | true | none | none |
details | [object] | true | none | none |
error | string | true | none | none |
errors | [ApiFieldError] | true | none | none |
exception | string | true | none | none |
extra | object | true | none | none |
logs | [string] | true | none | none |
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
params | object | true | none | none |
path | string | true | none | none |
query | object | true | none | none |
redirectUrl | string | true | none | none |
results | [HSMTemplateDoc] | true | none | none |
serverVersion | string | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
traces | [object] | true | none | none |
warningKey | string | true | none | none |
warnings | [ApiFieldError] | true | none | none |
ApiResponse_OutBoundReciept_object_
{
"data": {
"id": "gBEGkYiEB1VXAglK1ZEqA1YKPrU",
"templateCode": "string",
"templateId": "string",
"type": "string"
},
"details": [
{}
],
"error": "string",
"errors": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
],
"exception": "string",
"extra": {},
"logs": [
"string"
],
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"params": {},
"path": "/postman/email/send",
"query": {},
"redirectUrl": "/go/to/some/other/url.html",
"results": [
{
"id": "gBEGkYiEB1VXAglK1ZEqA1YKPrU",
"templateCode": "string",
"templateId": "string",
"type": "string"
}
],
"serverVersion": "string",
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string",
"traces": [
{}
],
"warningKey": "string",
"warnings": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
]
}
ApiResponse«OutBoundReciept,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | OutBoundReciept | true | none | none |
details | [object] | true | none | none |
error | string | true | none | none |
errors | [ApiFieldError] | true | none | none |
exception | string | true | none | none |
extra | object | true | none | none |
logs | [string] | true | none | none |
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
params | object | true | none | none |
path | string | true | none | none |
query | object | true | none | none |
redirectUrl | string | true | none | none |
results | [OutBoundReciept] | true | none | none |
serverVersion | string | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
traces | [object] | true | none | none |
warningKey | string | true | none | none |
warnings | [ApiFieldError] | true | none | none |
ApiResponse_OutboxMessage_object_
{
"data": {
"action": "string",
"attachments": [
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
],
"attempt": 0,
"bulkSessionId": "string",
"campaignTitle": "string",
"cancelExisting": true,
"collapseId": "string",
"contact": {
"channelType": "string",
"contactId": "string",
"contactType": "string",
"csid": "string",
"email": "string",
"lane": "string",
"name": "string",
"phone": "string"
},
"contacts": [
{
"channelType": "string",
"contactId": "wa919876543210",
"contactType": "string",
"country": "string",
"csid": "string",
"email": "John.Doe@company.co",
"filters": [
{
"property1": {},
"property2": {}
}
],
"keymap": [
{
"property1": "string",
"property2": "string"
}
],
"lane": "string",
"name": "John Doe",
"phone": 919876543210,
"prefix": "string",
"tenant": "string",
"userid": "string"
}
],
"csid": "string",
"files": [
{
"body": "string",
"content": "string",
"contentLength": 0,
"contentType": "string",
"converter": "AMXFS",
"extension": "string",
"fileFormat": "PDF",
"fileType": "IMAGE",
"headers": {
"property1": "string",
"property2": "string"
},
"meta": {},
"model": {},
"name": "string",
"options": {},
"password": "string",
"path": "string",
"template": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"thumb": "string",
"title": "string",
"url": "string"
}
],
"footer": "string",
"formatSubType": "string",
"formatType": "string",
"from": "string",
"fromName": "string",
"groupId": "string",
"groupName": "string",
"groups": [
"string"
],
"hsm": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"id": "string",
"lines": [
"string"
],
"logs": [
{}
],
"message": "string",
"messageId": "string",
"messageIdExt": "string",
"messageIdRef": "string",
"messageIdResend": "string",
"meta": {},
"model": {},
"options": {},
"priority": 0,
"prompt": {
"messageId": "string",
"pageIndex": 0,
"type": "string"
},
"queue": 0,
"rawMessageFormat": {},
"referenceKey": "string",
"referral": {
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
},
"replyId": "string",
"replyIdExt": "string",
"replyTo": {},
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"scheduler": {
"data": {},
"endAt": "string",
"interval": "string",
"repeat": true,
"repeatCount": 0,
"startAt": "string",
"taskId": "string",
"topic": "string"
},
"session": {
"agent": "string",
"bot": "string",
"dept": "string",
"firstMessage": true,
"initMessage": true,
"mode": "string",
"queue": "string",
"resolved": true,
"routingId": "string",
"sessionStamp": 0,
"ticketHash": "string"
},
"sessionId": "string",
"stamps": {
"property1": 0,
"property2": 0
},
"status": "SCHLD",
"subject": "string",
"templateExt": {
"code": "string",
"template": {},
"varMap": {}
},
"timestamp": 0,
"to": [
"string"
],
"trace": [
{}
],
"type": "string",
"vccards": [
{
"addresses": [
{
"city": "string",
"country": "string",
"countryCode": "string",
"state": "string",
"street": "string",
"type": "string",
"uuid": "string",
"zip": "string"
}
],
"dates": [
{
"date": "string",
"label": "string",
"type": "string"
}
],
"emails": [
{
"email": "string",
"label": "string",
"type": "string",
"uuid": "string"
}
],
"ims": [
{
"service": "string",
"userid": "string"
}
],
"locations": [
{
"address": "string",
"latitude": "string",
"longitude": "string",
"name": "string",
"url": "string"
}
],
"name": {
"firstName": "string",
"formattedName": "string",
"lastName": "string",
"middleName": "string"
},
"phones": [
{
"country": "string",
"countryCallingCode": "string",
"ext": "string",
"label": "string",
"nationalNumber": "string",
"phone": "string",
"type": "string",
"uuid": "string",
"whatsAppId": "string"
}
],
"urls": [
{
"label": "string",
"type": "string",
"url": "string",
"uuid": "string"
}
],
"work": [
{
"company": "string",
"department": "string",
"label": "string",
"title": "string"
}
]
}
]
},
"details": [
{}
],
"error": "string",
"errors": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
],
"exception": "string",
"extra": {},
"logs": [
"string"
],
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"params": {},
"path": "/postman/email/send",
"query": {},
"redirectUrl": "/go/to/some/other/url.html",
"results": [
{
"action": "string",
"attachments": [
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
],
"attempt": 0,
"bulkSessionId": "string",
"campaignTitle": "string",
"cancelExisting": true,
"collapseId": "string",
"contact": {
"channelType": "string",
"contactId": "string",
"contactType": "string",
"csid": "string",
"email": "string",
"lane": "string",
"name": "string",
"phone": "string"
},
"contacts": [
{
"channelType": "string",
"contactId": "wa919876543210",
"contactType": "string",
"country": "string",
"csid": "string",
"email": "John.Doe@company.co",
"filters": [
{
"property1": {},
"property2": {}
}
],
"keymap": [
{
"property1": "string",
"property2": "string"
}
],
"lane": "string",
"name": "John Doe",
"phone": 919876543210,
"prefix": "string",
"tenant": "string",
"userid": "string"
}
],
"csid": "string",
"files": [
{
"body": "string",
"content": "string",
"contentLength": 0,
"contentType": "string",
"converter": "AMXFS",
"extension": "string",
"fileFormat": "PDF",
"fileType": "IMAGE",
"headers": {
"property1": "string",
"property2": "string"
},
"meta": {},
"model": {},
"name": "string",
"options": {},
"password": "string",
"path": "string",
"template": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"thumb": "string",
"title": "string",
"url": "string"
}
],
"footer": "string",
"formatSubType": "string",
"formatType": "string",
"from": "string",
"fromName": "string",
"groupId": "string",
"groupName": "string",
"groups": [
"string"
],
"hsm": {
"code": "FEEDBACK",
"data": {
"amount": 10,
"currency": "INR"
},
"id": "60d236c6142e53561cb7716c",
"lang": "en_US",
"linked": "string"
},
"id": "string",
"lines": [
"string"
],
"logs": [
{}
],
"message": "string",
"messageId": "string",
"messageIdExt": "string",
"messageIdRef": "string",
"messageIdResend": "string",
"meta": {},
"model": {},
"options": {},
"priority": 0,
"prompt": {
"messageId": "string",
"pageIndex": 0,
"type": "string"
},
"queue": 0,
"rawMessageFormat": {},
"referenceKey": "string",
"referral": {
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
},
"replyId": "string",
"replyIdExt": "string",
"replyTo": {},
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"scheduler": {
"data": {},
"endAt": "string",
"interval": "string",
"repeat": true,
"repeatCount": 0,
"startAt": "string",
"taskId": "string",
"topic": "string"
},
"session": {
"agent": "string",
"bot": "string",
"dept": "string",
"firstMessage": true,
"initMessage": true,
"mode": "string",
"queue": "string",
"resolved": true,
"routingId": "string",
"sessionStamp": 0,
"ticketHash": "string"
},
"sessionId": "string",
"stamps": {
"property1": 0,
"property2": 0
},
"status": "SCHLD",
"subject": "string",
"templateExt": {
"code": "string",
"template": {},
"varMap": {}
},
"timestamp": 0,
"to": [
"string"
],
"trace": [
{}
],
"type": "string",
"vccards": [
{
"addresses": [
{
"city": "string",
"country": "string",
"countryCode": "string",
"state": "string",
"street": "string",
"type": "string",
"uuid": "string",
"zip": "string"
}
],
"dates": [
{
"date": "string",
"label": "string",
"type": "string"
}
],
"emails": [
{
"email": "string",
"label": "string",
"type": "string",
"uuid": "string"
}
],
"ims": [
{
"service": "string",
"userid": "string"
}
],
"locations": [
{
"address": "string",
"latitude": "string",
"longitude": "string",
"name": "string",
"url": "string"
}
],
"name": {
"firstName": "string",
"formattedName": "string",
"lastName": "string",
"middleName": "string"
},
"phones": [
{
"country": "string",
"countryCallingCode": "string",
"ext": "string",
"label": "string",
"nationalNumber": "string",
"phone": "string",
"type": "string",
"uuid": "string",
"whatsAppId": "string"
}
],
"urls": [
{
"label": "string",
"type": "string",
"url": "string",
"uuid": "string"
}
],
"work": [
{
"company": "string",
"department": "string",
"label": "string",
"title": "string"
}
]
}
]
}
],
"serverVersion": "string",
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string",
"traces": [
{}
],
"warningKey": "string",
"warnings": [
{
"body": {},
"code": "string",
"codeKey": "string",
"codes": [
"string"
],
"description": "string",
"descriptionKey": "string",
"field": "string",
"obzect": "string",
"possibleValues": [
{}
]
}
]
}
ApiResponse«OutboxMessage,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
data | OutboxMessage | true | none | none |
details | [object] | true | none | none |
error | string | true | none | none |
errors | [ApiFieldError] | true | none | none |
exception | string | true | none | none |
extra | object | true | none | none |
logs | [string] | true | none | none |
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
params | object | true | none | none |
path | string | true | none | none |
query | object | true | none | none |
redirectUrl | string | true | none | none |
results | [OutboxMessage] | true | none | none |
serverVersion | string | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
traces | [object] | true | none | none |
warningKey | string | true | none | none |
warnings | [ApiFieldError] | true | none | none |
ApiResultsMetaCompactResponse_ChatMessageDTO_object_
{
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"results": [
{
"action": "string",
"attachments": [
{
"attachmentId": "23m234233232323",
"drive": "Drive02",
"mediaCaption": "Transaction Receipt",
"mediaCode": "ABC_PROMO",
"mediaId": "23m234233232323",
"mediaIdExt": "23m234233232323ext",
"mediaIdInline": "23m234233232323inline",
"mediaMimeType": "image/png",
"mediaName": "TransactionReceipt.pdf",
"mediaSrc": "https://client.service.com/docs/media/12.png",
"mediaSubType": "IMAGE",
"mediaTemplate": "Hi <b>John</b>, this is your <i>image</i>",
"mediaTemplateStyle": "background-color:white;width:400px;min-height:200px",
"mediaType": "IMAGE",
"mediaURL": "https://client.service.com/docs/media/12.png"
}
],
"bulkSessionId": "string",
"contact": {
"channelType": "string",
"contactId": "wa919876543210",
"contactType": "string",
"country": "string",
"createdBy": "string",
"createdStamp": 0,
"csid": "string",
"email": "John.Doe@company.co",
"emailVerified": true,
"filters": [
{
"property1": {},
"property2": {}
}
],
"firstInBoundStamp": 0,
"firstOutBoundStamp": 0,
"keymap": [
{
"property1": "string",
"property2": "string"
}
],
"labelId": [
"string"
],
"lane": "string",
"lastInBoundStamp": 0,
"lastOptInStamp": 0,
"lastOutBoundStamp": 0,
"lastPushStamp": 0,
"lastReplyStamp": 0,
"name": "John Doe",
"phone": 919876543210,
"phoneVerified": true,
"prefix": "string",
"profile": {
"code": "string",
"contactId": "string",
"email": "string",
"id": "string",
"labels": [
{
"format": "MM/DD/YY",
"key": "CUSTOMER_TYPE",
"name": "Customer Type",
"type": "TEXT",
"value": "Platinum"
}
],
"mobile": "string",
"name": "string",
"profileId": "string",
"userId": "string"
},
"profilePic": "string",
"sessionId": "string",
"tenant": "string",
"userid": "string"
},
"form": {},
"logs": [
{}
],
"messageId": "string",
"messageIdExt": "string",
"messageIdRef": "string",
"messageIdResend": "string",
"messageTrail": "string",
"meta": {},
"name": "string",
"options": {},
"referral": {
"body": "string",
"bulkdId": "string",
"imageUrl": "string",
"info": {},
"mediaType": "string",
"mediaUrl": "string",
"messageId": "string",
"messageIdExt": "string",
"sourceCategory": "feedback",
"sourceId": "string",
"sourceType": "feedback",
"sourceUrl": "string",
"thumbUrl": "string",
"title": "string"
},
"replyId": "string",
"replyIdExt": "string",
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"sender": "string",
"sessionId": "string",
"stamps": {
"property1": 0,
"property2": 0
},
"status": "string",
"tags": {
"categories": [
"string"
],
"cities": [
"string"
],
"countries": [
"string"
],
"langs": [
"string"
],
"locations": [
"string"
],
"organizations": [
"string"
],
"persons": [
"string"
],
"sentimentScore": 0,
"sentiments": [
"string"
]
},
"template": "string",
"templateId": "string",
"text": "string",
"timestamp": 0,
"type": "string",
"vccards": [
{
"addresses": [
{
"city": "string",
"country": "string",
"countryCode": "string",
"state": "string",
"street": "string",
"type": "string",
"uuid": "string",
"zip": "string"
}
],
"dates": [
{
"date": "string",
"label": "string",
"type": "string"
}
],
"emails": [
{
"email": "string",
"label": "string",
"type": "string",
"uuid": "string"
}
],
"ims": [
{
"service": "string",
"userid": "string"
}
],
"locations": [
{
"address": "string",
"latitude": "string",
"longitude": "string",
"name": "string",
"url": "string"
}
],
"name": {
"firstName": "string",
"formattedName": "string",
"lastName": "string",
"middleName": "string"
},
"phones": [
{
"country": "string",
"countryCallingCode": "string",
"ext": "string",
"label": "string",
"nationalNumber": "string",
"phone": "string",
"type": "string",
"uuid": "string",
"whatsAppId": "string"
}
],
"urls": [
{
"label": "string",
"type": "string",
"url": "string",
"uuid": "string"
}
],
"work": [
{
"company": "string",
"department": "string",
"label": "string",
"title": "string"
}
]
}
]
}
],
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string"
}
ApiResultsMetaCompactResponse«ChatMessageDTO,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
results | [ChatMessageDTO] | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
ApiResultsMetaCompactResponse_InBoundEvent_object_
{
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"results": [
{
"checksum": "string",
"contact": {
"channelType": "string",
"contactId": "string",
"contactType": "string",
"csid": "string",
"email": "string",
"lane": "string",
"name": "string",
"phone": "string"
},
"contactId": "string",
"eventCode": "SESSION_ROUTED",
"eventId": "string",
"messageId": "string",
"route": {
"queueCode": "string",
"routerId": "string",
"sendMode": "string",
"senderApp": "string",
"senderCode": "string",
"senderType": "string"
},
"session": {
"agent": "string",
"bot": "string",
"dept": "string",
"firstMessage": true,
"initMessage": true,
"mode": "string",
"queue": "string",
"resolved": true,
"routingId": "string",
"sessionStamp": 0,
"ticketHash": "string"
},
"sessionAssigned": {
"newAgent": "string",
"newBot": "string",
"newDept": "string",
"oldAgent": "string",
"oldBot": "string",
"oldDept": "string"
},
"sessionId": "string",
"sessionRouted": {
"params": {},
"routingId": "string",
"sessionStart": true,
"sourceQueue": "string",
"targetQueue": "string"
},
"trace": [
{}
],
"type": "INBOUND"
}
],
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string"
}
ApiResultsMetaCompactResponse«InBoundEvent,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
results | [InBoundEvent] | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
ApiResultsMetaCompactResponse_MsgChannel_object_
{
"message": "This is success message in plain english",
"messageKey": "MESSAGE_SUCCESS:MOBILE:12",
"meta": {},
"results": [
{
"channelId": "wa360:918828218374",
"contactType": "WHATSAPP",
"lane": 919999998888,
"name": "Customer Support"
}
],
"status": 200,
"statusKey": "SUCCESS",
"timestamp": 1541276788518,
"traceid": "string"
}
ApiResultsMetaCompactResponse«MsgChannel,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
message | string | true | none | none |
messageKey | string | true | none | none |
meta | object | true | none | none |
results | [MsgChannel] | true | none | none |
status | string | true | none | none |
statusKey | string | true | none | none |
timestamp | integer(int64) | true | none | none |
traceid | string | true | none | none |
Map_string_object_
{
"property1": {},
"property2": {}
}
Map«string,object»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
additionalProperties | object | false | none | none |
Map_string_string_
{
"property1": "string",
"property2": "string"
}
Map«string,string»
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
additionalProperties | string | false | none | none |