Create an external application inbox
curl --request POST \
--url https://web-api.clerk.chat/public/twilio-connector/inbox/application \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"name": "My Voice Application",
"accountSID": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"authToken": "your_auth_token"
}
'import requests
url = "https://web-api.clerk.chat/public/twilio-connector/inbox/application"
payload = {
"name": "My Voice Application",
"accountSID": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"authToken": "your_auth_token"
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Voice Application',
accountSID: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
authToken: 'your_auth_token'
})
};
fetch('https://web-api.clerk.chat/public/twilio-connector/inbox/application', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://web-api.clerk.chat/public/twilio-connector/inbox/application",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Voice Application',
'accountSID' => 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'authToken' => 'your_auth_token'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://web-api.clerk.chat/public/twilio-connector/inbox/application"
payload := strings.NewReader("{\n \"name\": \"My Voice Application\",\n \"accountSID\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"authToken\": \"your_auth_token\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://web-api.clerk.chat/public/twilio-connector/inbox/application")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Voice Application\",\n \"accountSID\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"authToken\": \"your_auth_token\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://web-api.clerk.chat/public/twilio-connector/inbox/application")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Voice Application\",\n \"accountSID\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"authToken\": \"your_auth_token\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"externalId": "APxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"name": "My Voice Application"
}
}Twilio
Create an external application inbox
Creates a new external inbox with a Twilio application and stores the Application SID as the external ID.
POST
/
public
/
twilio-connector
/
inbox
/
application
Create an external application inbox
curl --request POST \
--url https://web-api.clerk.chat/public/twilio-connector/inbox/application \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"name": "My Voice Application",
"accountSID": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"authToken": "your_auth_token"
}
'import requests
url = "https://web-api.clerk.chat/public/twilio-connector/inbox/application"
payload = {
"name": "My Voice Application",
"accountSID": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"authToken": "your_auth_token"
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Voice Application',
accountSID: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
authToken: 'your_auth_token'
})
};
fetch('https://web-api.clerk.chat/public/twilio-connector/inbox/application', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://web-api.clerk.chat/public/twilio-connector/inbox/application",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Voice Application',
'accountSID' => 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'authToken' => 'your_auth_token'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://web-api.clerk.chat/public/twilio-connector/inbox/application"
payload := strings.NewReader("{\n \"name\": \"My Voice Application\",\n \"accountSID\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"authToken\": \"your_auth_token\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://web-api.clerk.chat/public/twilio-connector/inbox/application")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Voice Application\",\n \"accountSID\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"authToken\": \"your_auth_token\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://web-api.clerk.chat/public/twilio-connector/inbox/application")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Voice Application\",\n \"accountSID\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"authToken\": \"your_auth_token\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"externalId": "APxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"name": "My Voice Application"
}
}Authorizations
Body
application/json
Friendly name for the inbox and Twilio application
Example:
"My Voice Application"
Twilio Account SID. Must be provided together with authToken. If neither is provided, the global Twilio account will be used.
Example:
"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Twilio Auth Token. Must be provided together with accountSID. If neither is provided, the global Twilio auth token will be used.
Example:
"your_auth_token"
Response
The created external inbox
Represents an external inbox resource
Show child attributes
Show child attributes
⌘I