Code copied successfuly

Support Inbox API

Version: v1.0

Specification Release Notes Other versions

The Support Inbox API is a JSON REST API to connect to social messaging platforms like WhatsApp Business, Apple Business Chat, Facebook Messenger, Twitter DM, Viber, LINE and more.

HTTP requests

Standard HTTP methods, such as GET or POST, are used with the application/json content type. API keys are used for authentication and TLS 1.2 is required.

HTTP responses

HTTP success status codes, such as 200 OK or 201 Created, are returned for successful responses and the response data has the application/json content type.

HTTP error status codes, such as 400 Bad Request or 401 Unauthorized, are returned for error responses. See Error codes for more information.

Channels & JIDs

The API uses Jabber IDs (JIDs) to identify channels and contacts. They have the same format as email addresses. The following channels are supported:

Channel JID example
WhatsApp Business 31611111111@whatsapp.eazy.im
Apple Business Chat d2b9f484-08ac-45a7-bbe0-f2f7d844bcb6@apple.eazy.im
Facebook Messenger 1918363544518991@messenger.eazy.im
Line 8191584934115639@line.eazy.im
Twitter DM 872362551@twitter.eazy.im
Viber voON2IU2FTGtgUB50qc08g@viber.eazy.im
Web chat 8191584934115639@webchat.eazy.im
SMS 31633333333@sms.eazy.im

Note: Custom channels can be added on your demand. For instance, an existing chat in your custom mobile app or live chat on your website can be added as a channel in the Support Inbox.

Error codes

400 Bad Request

{
    "error": {
        "code": 1005,
        "message": "Jid is invalid"
    },
    "traceId": "7e6459"
}

In the case an HTTP error status (4xx) was returned, the response provides a detailed error code and message in the JSON body, see the sample on the right.

The traceId can be used by our support team to track down the corresponding request.

The following error codes and messages are defined:

Error code Description
1001 Unauthorized
1002 Access denied
1003 Service unavailable
1004 Internal server error
1005 Validation error
1006 Template name does not exist
1007 User does not have WhatsApp
1008 Media is invalid
1009 Not found
1010 Assistant has no ownership of conversation
1011 Message rejected
1012 Bad gateway
1013 Parameter count mismatch
1014 Already exists
1015 Customer care window expired

Base URLs

API Keys

You can read information about your API keys and their scopes.

List all API keys

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/keys \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/keys HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/keys',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/keys',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/keys', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/keys', 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("https://api.cmd.tyntec.com/keys");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/keys", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /keys

A list of all keys can be retrieved using the GET method.

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Current API key

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/keys/currrent \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/keys/currrent HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/keys/currrent',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/keys/currrent',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/keys/currrent', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/keys/currrent', 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("https://api.cmd.tyntec.com/keys/currrent");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/keys/currrent", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /keys/currrent

A specific agent can be requested

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Company Management

Each owner is defined by a company. Owners can only manage their own company except for resellers who can manage multiple companies.

Agents and teams

Agents are accounts of users in your company who respond to your customers via the Support Inbox.

You may organize agents into teams (e.g. support team, sales team).

Assistants

AI assistants can be used to automate conversations. If you want to add and assign an assistant to your agent, contact us.

Labels

Labels can be used to assign friendly titles in colored boxes to conversations.

List all companies

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/companies \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/companies HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/companies',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/companies', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/companies', 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("https://api.cmd.tyntec.com/companies");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/companies", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies

List of all companies can be requested

Example responses

200 Response

[
  {
    "id": "458e633a-ab50-445f-9d1f-52afbf720ec3",
    "name": "tyntec"
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [companyResponse] false none [Company response]
» id string false none ID of the company
» name string(string) false none Name of the company

Current company

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/companies/current \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/companies/current HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/current',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/companies/current',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/companies/current', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/companies/current', 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("https://api.cmd.tyntec.com/companies/current");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/companies/current", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies/current

The current company can be requested

Example responses

200 Response

{
  "id": "458e633a-ab50-445f-9d1f-52afbf720ec3",
  "name": "tyntec"
}

Responses

Status Meaning Description Schema
200 OK OK companyResponse

Company by ID

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/companies/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/companies/{id} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/companies/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/companies/{id}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/companies/{id}', 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("https://api.cmd.tyntec.com/companies/{id}");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/companies/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies/{id}

Request a company by the ID

Parameters

Name In Type Required Description
id path string true ID of the company

Example responses

200 Response

{
  "id": "458e633a-ab50-445f-9d1f-52afbf720ec3",
  "name": "tyntec"
}

Responses

Status Meaning Description Schema
200 OK OK companyResponse

List all agents

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/companies/{companyId}/agents \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/companies/{companyId}/agents HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/agents',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/companies/{companyId}/agents',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/companies/{companyId}/agents', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/companies/{companyId}/agents', 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("https://api.cmd.tyntec.com/companies/{companyId}/agents");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/companies/{companyId}/agents", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies/{companyId}/agents

A list of all agents can be retrieved using the GET method. The objects field specifies to which objects the key has access to. IP whitelisting can be used to restrict originating IP addresses.

Parameters

Name In Type Required Description
companyId path string true ID of the company

Example responses

200 Response

[
  {
    "email": "jane@mycompany.com",
    "name": {
      "firstName": "Jane",
      "fullName": "Jane Mayers",
      "lastName": "Mayers"
    },
    "roles": [
      "admin",
      "user"
    ],
    "status": "OFFLINE",
    "teams": [
      "company@domail.com"
    ]
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [agentResponse] false none [Details of an agent]
» email string false none email address
» name object false none Name
»» firstName string false none First Name of the Agent
»» fullName string false none Full Name of the Agent
»» lastName string false none Last Name of the Agent
» roles [string] false none The role of the agent
» status string false none Status of the agent
» teams [string] false none Teams to be contacted with email
Enumerated values
Property Value
status OFFLINE
status AWAY
status ONLINE

Read an agent

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/companies/{companyId}/agents/{email} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/companies/{companyId}/agents/{email} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/agents/{email}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/companies/{companyId}/agents/{email}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/companies/{companyId}/agents/{email}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/companies/{companyId}/agents/{email}', 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("https://api.cmd.tyntec.com/companies/{companyId}/agents/{email}");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/companies/{companyId}/agents/{email}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies/{companyId}/agents/{email}

A specific agent can be retrieved using the GET method.

Parameters

Name In Type Required Description
companyId path string true ID of the company
email path string(email) true email of the agent

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Create a team

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/companies/{companyId}/teams \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/companies/{companyId}/teams HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/teams',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/companies/{companyId}/teams',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/companies/{companyId}/teams', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/companies/{companyId}/teams', 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("https://api.cmd.tyntec.com/companies/{companyId}/teams");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/companies/{companyId}/teams", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /companies/{companyId}/teams

Create a new team

Parameters

Name In Type Required Description
companyId path string true Company ID
name body string true Name of the team to be created

Example responses

Responses

Status Meaning Description Schema
201 Created Created None
Response Schema

List all teams

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/companies/{companyId}/teams \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/companies/{companyId}/teams HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/teams',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/companies/{companyId}/teams',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/companies/{companyId}/teams', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/companies/{companyId}/teams', 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("https://api.cmd.tyntec.com/companies/{companyId}/teams");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/companies/{companyId}/teams", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies/{companyId}/teams

A list of all teams can be requested

Parameters

Name In Type Required Description
companyId path string true Company ID

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Update a team

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}', 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("https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /companies/{companyId}/teams/{jid}

A team can be updated using the PATCH method. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated color, metadata, name

Parameters

Name In Type Required Description
companyId path string true Company ID
jid path string(email) true Jabber IDs to represent contacts
name body string true Name of the team to be created

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Delete a team

Code samples

# You can also use wget
curl -X DELETE https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}', 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("https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.cmd.tyntec.com/companies/{companyId}/teams/{jid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /companies/{companyId}/teams/{jid}

An existing Team can be deleted

Parameters

Name In Type Required Description
companyId path string true Company ID
jid path string(email) true Jabber IDs to represent contacts

Responses

Status Meaning Description Schema
204 No Content No Content None

List all assistants

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/companies/{companyId}/assistants \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/companies/{companyId}/assistants HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/assistants',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/companies/{companyId}/assistants',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/companies/{companyId}/assistants', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/companies/{companyId}/assistants', 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("https://api.cmd.tyntec.com/companies/{companyId}/assistants");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/companies/{companyId}/assistants", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies/{companyId}/assistants

A list of all assistants can be requested using the GET method.

Parameters

Name In Type Required Description
companyId path string true ID of the company

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Update an assistant

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/companies/{companyId}/assistants/{jid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/companies/{companyId}/assistants/{jid} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/assistants/{jid}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/companies/{companyId}/assistants/{jid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/companies/{companyId}/assistants/{jid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/companies/{companyId}/assistants/{jid}', 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("https://api.cmd.tyntec.com/companies/{companyId}/assistants/{jid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/companies/{companyId}/assistants/{jid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /companies/{companyId}/assistants/{jid}

An assistant can be updated using the PATCH method. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated, color, description, name

Parameters

Name In Type Required Description
companyId path string true ID of the company
jid path string(email) true Jabber IDs to represent contacts
color body integer false Color
description body string false Description of the assistant
name body string false Name of the assistant

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Create a label

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/companies/{companyId}/labels \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/companies/{companyId}/labels HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/labels',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/companies/{companyId}/labels',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/companies/{companyId}/labels', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/companies/{companyId}/labels', 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("https://api.cmd.tyntec.com/companies/{companyId}/labels");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/companies/{companyId}/labels", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /companies/{companyId}/labels

Create a new label. The name must be unique.

Parameters

Name In Type Required Description
companyId path string true Company ID
description body string false Description of the label
name body string false Name of the label

Example responses

Responses

Status Meaning Description Schema
201 Created Created None
Response Schema

List all labels

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/companies/{companyId}/labels \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/companies/{companyId}/labels HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/labels',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/companies/{companyId}/labels',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/companies/{companyId}/labels', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/companies/{companyId}/labels', 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("https://api.cmd.tyntec.com/companies/{companyId}/labels");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/companies/{companyId}/labels", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /companies/{companyId}/labels

A list of all labels can be requested

Parameters

Name In Type Required Description
companyId path string true Company ID

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Update a label

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}', 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("https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /companies/{companyId}/labels/{jid}

A label can be updated using the PATCH method. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated color, name, priority.

Parameters

Name In Type Required Description
companyId path string true Company ID
jid path string(email) true Jabber IDs to represent contacts
color body integer false Color of the label
name body string false Friendly name of the label
priority body integer false Priority of the label

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Delete a label

Code samples

# You can also use wget
curl -X DELETE https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}', 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("https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.cmd.tyntec.com/companies/{companyId}/labels/{jid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /companies/{companyId}/labels/{jid}

An existing label can be deleted by using the DELETE method.

Parameters

Name In Type Required Description
companyId path string true Company ID
jid path string(email) true Jabber IDs to represent contacts

Responses

Status Meaning Description Schema
204 No Content No Content None

Channel Management

The available channels can be used.

List all channels

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/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("https://api.cmd.tyntec.com/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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels

A list of all channels can be requested

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Update a channel

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/channels/{channelJid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/channels/{channelJid} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/channels/{channelJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/channels/{channelJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/channels/{channelJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/channels/{channelJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /channels/{channelJid}

A channel can be updated using the PATCH method. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated, name, priority

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
name body integer false Name of the channel
priority body integer false Priority of the channel

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

WhatsApp Management

WhatsApp Business channel has the following additional features:

  • Profile – define customer-facing information that consists of a logo, business information and an About message
  • QR code – assign QR codes to messages and other objects in WhatsApp
  • Message templates – define your message templates

Message templates

Operations for WhatsApp Business templates.

An example of a media template with a header, body, footer and buttons is as follows:

{
     "category": "TICKET_UPDATE",
     "components": [
         {
             "format": "DOCUMENT",
             "type": "HEADER"
         },
         {
             "text": "This is your KLM ticket for your flight on December 20th to New York.",
             "type": "BODY"
         },
         {
             "text": "Questions? We are available now, just send us a message",
             "type": "FOOTER"
         },
         {
             "buttons": [
                 {
                     "text": "Confirm",
                     "type": "QUICK_REPLY"
                 },
                 {
                     "text": "Reschedule",
                     "type": "QUICK_REPLY"
                 }
             ],
             "type": "BUTTONS"
         }
     ],
     "language": "en",
     "name": "ticket"
 }

And this is a response example:

{
    "namespace": "e08e69cb_d136_86fc_c33f_0f64becd1f46",
    "templates": [
        {
            "category": "ISSUE_RESOLUTION",
            "name": "delivery_notification",
            "translations": [
                {
                    "components": [
                        {
                            "text": "Hello {{1}}, your order with reference {{2}} has been delivered.",
                            "type": "body"
                        }
                    ],
                    "localeName": "en",
                    "status": "APPROVED"
                },
                {
                    "components": [
                        {
                            "text": "Hallo {{1}}, je bestelling met nummer {{2}} is afgeleverd.",
                            "type": "body"
                        }
                    ],
                    "localeName": "nl",
                    "rejectedReason": "NONE",
                    "status": "APPROVED"
                }
            ]
        },
        {
            "category": "ACCOUNT_UPDATE",
            "name": "hello",
            "translations": [
                {
                    "components": [
                        {
                            "text": "Hello {{1}}",
                            "type": "body"
                        }
                    ],
                    "localeName": "en",
                    "rejectedReason": "PROMOTIONAL",
                    "status": "REJECTED"
                }
            ]
        }
    ]
}

Read your profile

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/profile \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/profile HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/profile',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/profile',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/profile', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/profile', 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("https://api.cmd.tyntec.com/channels/{channelJid}/profile");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/profile", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/profile

The WhatsApp Business profile can be retrieved

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Overwrite your profile

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/profile \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/profile HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/profile',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/profile',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/profile', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/profile', 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("https://api.cmd.tyntec.com/channels/{channelJid}/profile");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/profile", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/profile

The WhatsApp Business profile can be completely overwritten or partially updated. The POST method is used to overwrite the whole profile.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
about body string false Description of what is this profile about.
businessProfile body object false WhatsApp for Business profile

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Update your profile

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/channels/{channelJid}/profile \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/channels/{channelJid}/profile HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/profile',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/channels/{channelJid}/profile',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/channels/{channelJid}/profile', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/channels/{channelJid}/profile', 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("https://api.cmd.tyntec.com/channels/{channelJid}/profile");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/channels/{channelJid}/profile", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /channels/{channelJid}/profile

The PATCH method is used for a partial update. Unspecified fields will remain unchanged.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
businessProfile body object false Example of WhatsApp for Business profile update

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

List all QR codes

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes', 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("https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/qr-codes

A list of all QR codes can be requested

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Create a QR code

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes', 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("https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/qr-codes

Create a new QR code with a prefilled message for WhatsApp Business

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
message body string false Text/Body of the message.

Example responses

Responses

Status Meaning Description Schema
201 Created Created None
Response Schema

Update a QR code

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /channels/{channelJid}/qr-codes/{code}

The prefilled message of a QR code can be updated using the PATCH method. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated message

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
code path string true QR code
message body string true Text/Body of the message.

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Delete a QR code

Code samples

# You can also use wget
curl -X DELETE https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.cmd.tyntec.com/channels/{channelJid}/qr-codes/{code}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /channels/{channelJid}/qr-codes/{code}

An existing QR code can be deleted

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
code path string true QR code

Responses

Status Meaning Description Schema
204 No Content No Content None

List all templates

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/templates \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/templates HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/templates',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/templates',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/templates', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/templates', 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("https://api.cmd.tyntec.com/channels/{channelJid}/templates");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/templates", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/templates

All WhatsApp Business templates can be retrieved

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel

Responses

Status Meaning Description Schema
200 OK OK - Check response in example above None

Create a template

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/templates \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/templates HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/templates',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/templates',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/templates', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/templates', 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("https://api.cmd.tyntec.com/channels/{channelJid}/templates");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/templates", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/templates

Create a new WhatsApp Business template. Templates can include a header, body, footer and buttons.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
category body string true Category text
components body string false Array of components to be used in the template
language body string true Language to be used in the template
name body string true Name of the template

Responses

Status Meaning Description Schema
201 Created Created - Check response in example above None

Delete a template

Code samples

# You can also use wget
curl -X DELETE https://api.cmd.tyntec.com/channels/{channelJid}/templates/{name} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api.cmd.tyntec.com/channels/{channelJid}/templates/{name} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/templates/{name}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.cmd.tyntec.com/channels/{channelJid}/templates/{name}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.cmd.tyntec.com/channels/{channelJid}/templates/{name}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.cmd.tyntec.com/channels/{channelJid}/templates/{name}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/templates/{name}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.cmd.tyntec.com/channels/{channelJid}/templates/{name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /channels/{channelJid}/templates/{name}

An existing Template can be deleted

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
name path string true Name of the template to be deleted

Responses

Status Meaning Description Schema
204 No Content No Content None

Contact Management

Operations regarding contacts.

Remarks & Notes

Assign remarks and notes to contacts.

Contact lists

Operations regarding custom lists of contacts that can be created in the GUI. You may use contact lists to send the same message to several contacts at once while keeping them as individual recipients.

Black list

Contacts can be black listed so that any messages received from those contacts are ignored. Also agents will not be able to send messages to blacklisted contacts.

Create a contact

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/contacts \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/contacts HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/contacts', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/contacts', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/contacts

Create a new contact.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
jid body string false Contact ID
name body string false Name of the contact
reference body string false Reference of the contact
remarks body string false Comment for the contact

Example responses

Responses

Status Meaning Description Schema
201 Created Created None
Response Schema

Read a contact

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/contacts/{contactJid}

A contact can be retrieved

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Update a contact

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /channels/{channelJid}/contacts/{contactJid}

A contact can be updated using the PATCH method. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated name, reference, remarks

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts
name body string false Name of the contact
reference body string false Reference of the contact
remarks body string false Comment for the contact

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

List blocked contacts

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/contacts/blacklist

A list of all blocked contacts can be requested.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Block a contact

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid} \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/contacts/blacklist/{contactJid}

A contact can be blocked by adding it to the blacklist. Messages received from a blocked contact will be ignored and it is not possible to send messages to it.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts

Responses

Status Meaning Description Schema
204 No Content No Content None

Unblock a contact

Code samples

# You can also use wget
curl -X DELETE https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts/blacklist/{contactJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /channels/{channelJid}/contacts/blacklist/{contactJid}

A contact can be removed from the blacklist

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts

Responses

Status Meaning Description Schema
204 No Content No Content None

List all contact lists

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/lists \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/lists HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/lists',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/lists',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/lists', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/lists', 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("https://api.cmd.tyntec.com/channels/{channelJid}/lists");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/lists", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/lists

All lists can be requested

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Add a contact to a list

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid} \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/lists/{listJid}/{contactJid}

A contact can be added to a list.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
listJid path string(email) true Jabber IDs to represent a list
contactJid path string(email) true Jabber IDs to represent contacts

Responses

Status Meaning Description Schema
200 OK OK None

Remove a contact from a list

Code samples

# You can also use wget
curl -X DELETE https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.cmd.tyntec.com/channels/{channelJid}/lists/{listJid}/{contactJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /channels/{channelJid}/lists/{listJid}/{contactJid}

A contact can be removed from a list.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
listJid path string(email) true Jabber IDs to represent a list
contactJid path string(email) true Jabber IDs to represent contacts

Responses

Status Meaning Description Schema
200 OK OK None

List all notes

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/contacts/{contactJid}/notes

List all notes from a contact.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Create a note

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/contacts/{contactJid}/notes

Create a new note in a contact.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts
body body string false Text/Body of the note.
referenceId body string false Friendly reference name as an ID.

Example responses

Responses

Status Meaning Description Schema
201 Created Created None
Response Schema

Update a note

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/contacts/{contactJid}/notes/{id}

Update a note in a contact. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated: body, isPinned, isReadOnly, referenceId

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts
id path string true ID of the node
body body string false Text/Body of the note.
isPinnel body boolean false Is this note pinned?
isReadOnly body boolean false Is this note read only or not?
referenceId body string false Friendly reference name as an ID.

Example responses

Responses

Status Meaning Description Schema
201 Created Created None
Response Schema

Delete a note

Code samples

# You can also use wget
curl -X DELETE https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.cmd.tyntec.com/channels/{channelJid}/contacts/{contactJid}/notes/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /channels/{channelJid}/contacts/{contactJid}/notes/{id}

Delete an existing note in a contact.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts
id path string true ID of the node

Responses

Status Meaning Description Schema
204 No Content No Content None

Conversation Management

Operations regarding conversations.

Use cases

The following table shows a quick reference of the most common use cases.

Example Description
status: "CLOSED" Close the conversation
assignee: "john@mycompany.com" Handover the conversation from the assistant to a specific agent or assistant
assignee: null Handover the conversation from the assistant to the agents
labels: ["1580486175684@label.eazy.im"] Label the conversation with the specified labels
labels: [] Unlabel the conversation
unreadCount: null Mark as read
unreadCount: 0 Mark as unread

Comments

Comments can be used in many paths of this API.

Automated messages

Automated messages are used in conversations.

List all automated messages

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/automated-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("https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/automated-messages

A list of all automated messages can be requested using the GET method.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Read an automated message

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/automated-messages/{type}

A specific automated message can be requested.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
type path string true Type of automated message

Example responses

Responses

Status Meaning Description Schema
200 OK The message is accepted by our system None
Response Schema

Update an automated message

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/channels/{channelJid}/automated-messages/{type}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /channels/{channelJid}/automated-messages/{type}

An automated message can be updated using the PATCH method. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated body, enabled

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
type path string true Type of automated message

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Create a comment

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}/comments \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}/comments HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}/comments',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}/comments',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}/comments', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}/comments', 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("https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}/comments");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}/comments", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/conversations/{contactJid}/comments

Create a new comment for a conversation.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts
body body string false Text for the comment

Example responses

Responses

Status Meaning Description Schema
201 Created Created None
Response Schema

Read a conversation

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/conversations/{contactJid}

A conversation can be requested

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Update a conversation

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/channels/{channelJid}/conversations/{contactJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /channels/{channelJid}/conversations/{contactJid}

A conversation can be updated using the PATCH method. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated assignee, labels, status, unreadCount

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts
assignee body string false Assistant to the agents
label body string false Labels of the conversation
status body string false Status of the conversation
unreadCount body integer false Number of unread messages

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Messaging

Send a message

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/messages/{contactJid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/messages/{contactJid} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/messages/{contactJid}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/messages/{contactJid}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/messages/{contactJid}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/messages/{contactJid}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/messages/{contactJid}");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/messages/{contactJid}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/messages/{contactJid}

Request to send a message to a contact in a channel.

The JSON body structure of each message type is listed below.

Audio

Element Value Mandatory Description
mimeType string Y MIME type
type "audio" Y Message type

Contact

Element Value Mandatory Description
contacts array Y Contact structure
type "contact" Y Message type

Document

Element Value Mandatory Description
fileName string Y File name
mimeType string Y MIME type
title string Y Document title
type "document" Y Message type

Gif

Element Value Mandatory Description
caption string N Caption text message
mimeType string Y MIME type
type "gif" Y Message type

Image

Element Value Mandatory Description
caption string N Caption text message
mimeType string Y MIME type
type "image" Y Message type

Location

Element Value Mandatory Description
latitude float Y Latitude coordinate
longitude float Y Longitude coordinate
name string N Name of the location
type "location" Y Message type
url string N Website URL

Voice message

Element Value Mandatory Description
mimeType string Y MIME type
type "ptt" Y Message type

Sticker

Element Value Mandatory Description
mimeType string Y MIME type
type "sticker" Y Message type

Template

Element Value Mandatory Description
template array Y Template structure
type "template" Y Message type

Text

Element Value Mandatory Description
body string Y Message body
type "text" Y Message type

Video

Element Value Mandatory Description
caption string N Caption text message
mimeType string Y MIME type
type "video" Y Message type

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
contactJid path string(email) true Jabber IDs to represent contacts
message body integer false Color of the label

Example responses

202 Response

{
  "id": "b48eaa2fab1e942cad8b8717ec6bf3ed2dad05a"
}

Responses

Status Meaning Description Schema
202 Accepted Accepted Inline
Response Schema

Status Code 202

Name Type Required Restrictions Description
» id integer false none The returned id can be used to match delivery receipts to the original message.

Receive messages

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/incoming \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/incoming HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/incoming',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/incoming',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/incoming', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/incoming', 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("https://api.cmd.tyntec.com/incoming");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/incoming", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /incoming

To receive messages, create an endpoint on your webserver that will be able to process POST requests and subscribe its URL via Webhook Configuration to the "message" events.

Note: The path above is only an example, you may choose your URL freely.

Responses

Status Meaning Description Schema

Webhook Configuration

Webhooks are used to receive real-time events like messages and receipts. Multiple webhooks can be defined per channel, each with their own events.

Webhooks must always return a 200 OK response.

Important: HTTPS with TLS 1.2 is required. Self-signed certificates are NOT allowed.

Retries

In the case of connection or HTTP errors, the platform will retry indefinitely.

Webhook Events

The following events are defined:

Name Description
custom Custom event for specific customer purposes
echo Outgoing messages sent by agents or assistants
handover Handover event whenever a conversation is transferred to an assistant or agent
label Label event whenever a conversation is labelled or unlabelledv
message Incoming messages from customers
note Note creation or deletion event
postback Postback event for WhatsApp button templates, Apple list pickers etc
receipt Message receipt event
template_pack Template updates whenever templates are approved, rejected etc.
typing Typing indications when customers are typing a message

List all webhooks

Code samples

# You can also use wget
curl -X GET https://api.cmd.tyntec.com/channels/{channelJid}/webhooks \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET https://api.cmd.tyntec.com/channels/{channelJid}/webhooks HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/webhooks',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://api.cmd.tyntec.com/channels/{channelJid}/webhooks',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api.cmd.tyntec.com/channels/{channelJid}/webhooks', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.cmd.tyntec.com/channels/{channelJid}/webhooks', 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("https://api.cmd.tyntec.com/channels/{channelJid}/webhooks");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.cmd.tyntec.com/channels/{channelJid}/webhooks", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /channels/{channelJid}/webhooks

A list of all webhooks can be requested

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel

Example responses

200 Response

[]

Responses

Status Meaning Description Schema
200 OK OK Inline
Response Schema

Status Code 200

Name Type Required Restrictions Description
» anonymous any false none none

Create a webhook

Code samples

# You can also use wget
curl -X POST https://api.cmd.tyntec.com/channels/{channelJid}/webhooks \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST https://api.cmd.tyntec.com/channels/{channelJid}/webhooks HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/webhooks',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://api.cmd.tyntec.com/channels/{channelJid}/webhooks',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.cmd.tyntec.com/channels/{channelJid}/webhooks', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.cmd.tyntec.com/channels/{channelJid}/webhooks', 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("https://api.cmd.tyntec.com/channels/{channelJid}/webhooks");
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{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.cmd.tyntec.com/channels/{channelJid}/webhooks", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /channels/{channelJid}/webhooks

Create a new webhook for the specified events.

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
events body object true Events described above
url body string(uri) true URL of the webhook

Example responses

Responses

Status Meaning Description Schema
201 Created Created None
Response Schema

Update a webhook

Code samples

# You can also use wget
curl -X PATCH https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PATCH https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id} HTTP/1.1
Host: api.cmd.tyntec.com
Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.patch 'https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
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{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /channels/{channelJid}/webhooks/{id}

A webhook can be updated using the PATCH method. Only the specified fields will be updated, all other fields will remain unchanged. The following fields can be updated name

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
id path string true ID of the node
name body string true Name of the webhook to be created

Example responses

Responses

Status Meaning Description Schema
200 OK OK None
Response Schema

Delete a webhook

Code samples

# You can also use wget
curl -X DELETE https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id} \
  -H 'Authorization: Bearer {access-token}'

DELETE https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id} HTTP/1.1
Host: api.cmd.tyntec.com


const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete 'https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}', params={

}, headers = headers)

print r.json()

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}', 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("https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
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{
        "Authorization": []string{"Bearer {access-token}"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.cmd.tyntec.com/channels/{channelJid}/webhooks/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /channels/{channelJid}/webhooks/{id}

An existing Webhook can be deleted

Parameters

Name In Type Required Description
channelJid path string(email) true Jabber IDs to represent channel
id path string true ID of the node

Responses

Status Meaning Description Schema
204 No Content No Content None

Schemas

agentResponse

{
  "email": "jane@mycompany.com",
  "name": {
    "firstName": "Jane",
    "fullName": "Jane Mayers",
    "lastName": "Mayers"
  },
  "roles": [
    "admin",
    "user"
  ],
  "status": "OFFLINE",
  "teams": [
    "company@domail.com"
  ]
}

Details of an agent

Properties

Name Type Required Restrictions Description
email string false none email address
name object false none Name
» firstName string false none First Name of the Agent
» fullName string false none Full Name of the Agent
» lastName string false none Last Name of the Agent
roles [string] false none The role of the agent
status string false none Status of the agent
teams [string] false none Teams to be contacted with email
Enumerated values
Property Value
status OFFLINE
status AWAY
status ONLINE

apiKeyResponse

{
  "cipherKey": "string",
  "description": "Test environment",
  "id": "509000e9-05c9-43a9-b6f1-70f1c6a5448a",
  "lastUsed": "2020-03-11T19:53:02.000000Z",
  "objects": [
    [
      "'jid': '31612345678@tyntec.com'",
      "'type': 'CHANNEL'"
    ]
  ],
  "scope": "CHANNEL",
  "whitelist": [
    "95.95.95.95",
    "12.12.12.12"
  ]
}

Current API key response

Properties

Name Type Required Restrictions Description
cipherKey string false none Cipher Key
description string false none Description for the key or usage of the key
id string false none Id of the key
lastUsed string(date-time) false none When the key last used
objects [array] false none Array of objects. Check example on the right
scope string false none The scope of this key
whitelist [string] false none Array of whitelisted IPs. Check example on the right

assistantResponse

{
  "color": 8,
  "description": "Sales assistant",
  "jid": "jane@mycompany.com",
  "name": "Jane Mayer"
}

Single assistant response

Properties

Name Type Required Restrictions Description
color integer false none Color
description string false none Role of the Assistant
jid string(email) false none Id of the key
name string false none Name of the assistant

autoMessageResponse

{
  "body": "Sorry, we are currently closed. Your question will be answered as soon as possible.",
  "createdAt": "2020-03-11T19:00:02.000000Z",
  "enabled": true,
  "type": "AWAY",
  "updatedAt": "2020-04-11T19:00:02.000000Z"
}

Automated message response

Properties

Name Type Required Restrictions Description
body string false none Body/text of the message
createdAt string(date-time) false none When message is created
enabled boolean false none Is the message enabled?
type string false none Name of the assistant
updatedAt string(date-time) false none When message is last updated
Enumerated values
Property Value
type AWAY
type GREETING

channelResponse

{
  "dataRetentionInDays": 90,
  "jid": "31611111111@company.com",
  "name": "WhatApp",
  "priority": 0
}

Channel Response

Properties

Name Type Required Restrictions Description
dataRetentionInDays integer false none Body/text of the message
jid string(email) false none ID
name string false none Name of the channel
priority integer false none Priority of the channel

commentResponse

{
  "id": "ee487689cac84f972ff1d8d10ed7b64f4148"
}

Comment response

Properties

Name Type Required Restrictions Description
id string false none ID of the contact added the comment

companyResponse

{
  "id": "458e633a-ab50-445f-9d1f-52afbf720ec3",
  "name": "tyntec"
}

Company response

Properties

Name Type Required Restrictions Description
id string false none ID of the company
name string(string) false none Name of the company

contactResponse

{
  "names": [],
  "notes": [],
  "phoneNumber": 31611111111,
  "reference": "Customer #545",
  "remarks": "VIP",
  "type": "INDIVIDUAL"
}

Contact response

Properties

Name Type Required Restrictions Description
names [name] false none Names
notes [note] false none Notes
phoneNumber integer false none Phone number of the contact
reference string false none Reference of the contact
remarks string false none Comment for the contact
type string false none Type of the contact

conversationResponse

{
  "assignee": "john@mycompany.com",
  "channel": "string",
  "contact": "string",
  "createdAt": "2019-04-04T15:29:47.000000Z",
  "labels": [],
  "lastMessageReceivedAt": "2019-04-08T23:55:39.000000Z",
  "lastMessageSentAt": "2019-04-07T17:12:00.000000Z",
  "messagesReceived": 12,
  "messagesSent": 8,
  "status": "CLOSED",
  "unreadCount": 5
}

Conversation response

Properties

Name Type Required Restrictions Description
assignee string false none Assistant to the agents
channel string false none Channel to be used
contact string false none Contact of the conversation
createdAt string(date-time) false none Date and time the conversation is created
labels [allLabelsResponse] false none Labels of the conversation
lastMessageReceivedAt string(date-time) false none Date and time the last message is received
lastMessageSentAt string(date-time) false none Date and time that the last message is sent
messagesReceived integer false none Number of messages received
messagesSent integer false none Number of messages sent
status string false none Status of the conversation
unreadCount integer false none Number of unread messages

emailsResponse

[
  "jane@mycompany1.com",
  "jo@mycompany1.com",
  "john@company2.com"
]

List all email addresses

Properties

Name Type Required Restrictions Description
anonymous [email] false none List all email addresses

labelResponse

{
  "color": 8,
  "jid": "31611111111@company.com",
  "name": "Support",
  "priority": 0
}

Single Label Response

Properties

Name Type Required Restrictions Description
color integer false none Color
jid string(email) false none ID
name string false none Name of the label
priority integer false none Priority of the channel

listResponse

{
  "jid": "31611111111@company.com",
  "name": "Mailing list",
  "remarks": "Support"
}

Single list response

Properties

Name Type Required Restrictions Description
jid string(email) false none ID
name string false none Name of the list
remarks string false none Comment for the list

noteResponse

{
  "body": "Return order received",
  "createdAt": "2020-03-11T19:53:02.000000Z",
  "createdBy": "john@mycompany.com",
  "id": "280cbbe0-c08a-4606-bf8d-a30242c4eaa4",
  "isPinned": false,
  "isReadOnly": false,
  "updatedAt": "2020-04-11T19:53:02.000000Z",
  "referenceId": "CUSTOMER_NUMBER"
}

Single Note Response

Properties

Name Type Required Restrictions Description
body string false none Text/Body of the note
createdAt string(date-time) false none Date and time the note is created
createdBy string(email) false none Who created this note
id string false none ID of the note
isPinned boolean false none Is this note pinned?
isReadOnly boolean false none Is this note read only or not?
updatedAt string(date-time) false none Date and time the note is last updated
referenceId string false none Reference ID of the note

profileResponse

{
  "about": "Welcome! We are here to help you 24/7",
  "businessProfile": {
    "address": "High Street 15, New York",
    "description": "YourCompany Ltd.",
    "email": "info@your-company.com",
    "vertical": "Vertical",
    "websites": [
      "www.company1.com",
      "www.company2.com"
    ]
  },
  "name": "YourCompany",
  "phoneNumber": 31612345678,
  "pictureUrl": "https://pps.whatsapp.net/v/t61.24694-24/s96x96/71527172_751740171986704_2078049712831220364_n.jpg?oe=5E2168E9&oh=174efd2076218dff633a1e748beac190"
}

WhatsApp for Business profile response

Properties

Name Type Required Restrictions Description
about string false none Description of what is this profile about.
businessProfile businessProfile false none WhatsApp for Business profile response
name string false none Name of the profile
phoneNumber integer false none Phone number associated with the WhatsApp for Business profile
pictureUrl string false none URL of the picture used in the profile

qrCodeResponse

{
  "code": "VETO8Y3SYCSFH1",
  "createdAt": "2020-03-11T19:53:02.000000Z",
  "image": "https://scontent.xx.fbcdn.net/...",
  "message": "I have a question about product ABC",
  "updatedAt": "2020-04-11T19:53:02.000000Z",
  "url": "https://wa.me/message/VEKO8Y3SYCSFH1"
}

Single QR code response

Properties

Name Type Required Restrictions Description
code string false none QR code
createdAt string(date-time) false none Date and time the note is created
image string(uri) false none QR image URL
message string false none QR message to be displayed
updatedAt string(date-time) false none Date and time the note is last updated
url string(uri) false none QR URL

teamResponse

{
  "channels": [
    {
      "dataRetentionInDays": 90,
      "jid": "31611111111@company.com",
      "name": "WhatApp",
      "priority": 0
    }
  ],
  "color": 8,
  "jid": "31611111111@company.com",
  "metadata": "string",
  "name": "Support"
}

Single team response

Properties

Name Type Required Restrictions Description
channels [channelResponse] false none Array of channels
color integer false none Color
jid string(email) false none ID
metadata string false none Metadata information
name string false none Name of the team

webhookResponse

{
  "assistant": "john@mycompany.com",
  "cipherKey": "string",
  "createdAt": "2019-04-04T15:29:47.000000Z",
  "enabled": true,
  "events": [],
  "headers": {},
  "id": "8520d8d6-7b28-4d6f-8631-ecd528a0246d",
  "updatedAt": "2019-04-07T17:12:00.000000Z",
  "url": "https://your.company.com/webhook"
}

Webhook response

Properties

Name Type Required Restrictions Description
assistant string false none Assistant to the agents
cipherKey string false none Cipher key to be used in the webhook
createdAt string(date-time) false none Date and time the Webhook is created
enabled boolean false none Is the Webhook active or not?
events [events] false none Array of event on the webhooks
headers object false none Header parameters
id string false none ID of the event
updatedAt string(date-time) false none Date and time that the last message is sent
url string false none URL of the webhook

businessProfile

{
  "address": "High Street 15, New York",
  "description": "YourCompany Ltd.",
  "email": "info@your-company.com",
  "vertical": "Vertical",
  "websites": [
    "www.company1.com",
    "www.company2.com"
  ]
}

WhatsApp for Business profile response

Properties

Name Type Required Restrictions Description
address string false none Address associated with the profile
description string false none Description of the profile
email string(email) false none email address associated with the WhatsApp for business profile
vertical string false none Vertical
websites [website] false none Website list of URLs

website

"https://your-company.com"

Website URL

Properties

Name Type Required Restrictions Description
anonymous string false none Website URL