curl --request POST \
--url https://api.example.com/api/v1/destination \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantId": 123,
"tags": [],
"value": "<string>",
"uri": "http://localhost:8080/some/path",
"method": "<string>",
"headers": {},
"telegramBotUsername": "<string>",
"telegramUsername": "<string>",
"telegramUserId": "<string>",
"telegramChatId": "<string>",
"telegramChatTitle": "<string>",
"telegramChatType": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/destination"
payload = {
"tenantId": 123,
"tags": [],
"value": "<string>",
"uri": "http://localhost:8080/some/path",
"method": "<string>",
"headers": {},
"telegramBotUsername": "<string>",
"telegramUsername": "<string>",
"telegramUserId": "<string>",
"telegramChatId": "<string>",
"telegramChatTitle": "<string>",
"telegramChatType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantId: 123,
tags: [],
value: '<string>',
uri: 'http://localhost:8080/some/path',
method: '<string>',
headers: {},
telegramBotUsername: '<string>',
telegramUsername: '<string>',
telegramUserId: '<string>',
telegramChatId: '<string>',
telegramChatTitle: '<string>',
telegramChatType: '<string>'
})
};
fetch('https://api.example.com/api/v1/destination', 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://api.example.com/api/v1/destination",
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([
'tenantId' => 123,
'tags' => [
],
'value' => '<string>',
'uri' => 'http://localhost:8080/some/path',
'method' => '<string>',
'headers' => [
],
'telegramBotUsername' => '<string>',
'telegramUsername' => '<string>',
'telegramUserId' => '<string>',
'telegramChatId' => '<string>',
'telegramChatTitle' => '<string>',
'telegramChatType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.example.com/api/v1/destination"
payload := strings.NewReader("{\n \"tenantId\": 123,\n \"tags\": [],\n \"value\": \"<string>\",\n \"uri\": \"http://localhost:8080/some/path\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"telegramBotUsername\": \"<string>\",\n \"telegramUsername\": \"<string>\",\n \"telegramUserId\": \"<string>\",\n \"telegramChatId\": \"<string>\",\n \"telegramChatTitle\": \"<string>\",\n \"telegramChatType\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.example.com/api/v1/destination")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": 123,\n \"tags\": [],\n \"value\": \"<string>\",\n \"uri\": \"http://localhost:8080/some/path\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"telegramBotUsername\": \"<string>\",\n \"telegramUsername\": \"<string>\",\n \"telegramUserId\": \"<string>\",\n \"telegramChatId\": \"<string>\",\n \"telegramChatTitle\": \"<string>\",\n \"telegramChatType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/destination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": 123,\n \"tags\": [],\n \"value\": \"<string>\",\n \"uri\": \"http://localhost:8080/some/path\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"telegramBotUsername\": \"<string>\",\n \"telegramUsername\": \"<string>\",\n \"telegramUserId\": \"<string>\",\n \"telegramChatId\": \"<string>\",\n \"telegramChatTitle\": \"<string>\",\n \"telegramChatType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantId": 123,
"type": "EMAIL",
"uid": "Telegram: /start {uid}",
"tags": [
"DEFAULT"
],
"value": "<string>",
"telegramBotUsername": "<string>",
"telegramUserId": "<string>",
"telegramUsername": "<string>",
"telegramChatId": "<string>",
"telegramChatTitle": "<string>",
"telegramChatType": "<string>",
"slackUri": "<string>",
"slackChannelId": "<string>",
"slackChannelName": "<string>",
"uri": "<string>",
"method": "<string>",
"headers": {}
}create entity
curl --request POST \
--url https://api.example.com/api/v1/destination \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantId": 123,
"tags": [],
"value": "<string>",
"uri": "http://localhost:8080/some/path",
"method": "<string>",
"headers": {},
"telegramBotUsername": "<string>",
"telegramUsername": "<string>",
"telegramUserId": "<string>",
"telegramChatId": "<string>",
"telegramChatTitle": "<string>",
"telegramChatType": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/destination"
payload = {
"tenantId": 123,
"tags": [],
"value": "<string>",
"uri": "http://localhost:8080/some/path",
"method": "<string>",
"headers": {},
"telegramBotUsername": "<string>",
"telegramUsername": "<string>",
"telegramUserId": "<string>",
"telegramChatId": "<string>",
"telegramChatTitle": "<string>",
"telegramChatType": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantId: 123,
tags: [],
value: '<string>',
uri: 'http://localhost:8080/some/path',
method: '<string>',
headers: {},
telegramBotUsername: '<string>',
telegramUsername: '<string>',
telegramUserId: '<string>',
telegramChatId: '<string>',
telegramChatTitle: '<string>',
telegramChatType: '<string>'
})
};
fetch('https://api.example.com/api/v1/destination', 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://api.example.com/api/v1/destination",
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([
'tenantId' => 123,
'tags' => [
],
'value' => '<string>',
'uri' => 'http://localhost:8080/some/path',
'method' => '<string>',
'headers' => [
],
'telegramBotUsername' => '<string>',
'telegramUsername' => '<string>',
'telegramUserId' => '<string>',
'telegramChatId' => '<string>',
'telegramChatTitle' => '<string>',
'telegramChatType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.example.com/api/v1/destination"
payload := strings.NewReader("{\n \"tenantId\": 123,\n \"tags\": [],\n \"value\": \"<string>\",\n \"uri\": \"http://localhost:8080/some/path\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"telegramBotUsername\": \"<string>\",\n \"telegramUsername\": \"<string>\",\n \"telegramUserId\": \"<string>\",\n \"telegramChatId\": \"<string>\",\n \"telegramChatTitle\": \"<string>\",\n \"telegramChatType\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.example.com/api/v1/destination")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": 123,\n \"tags\": [],\n \"value\": \"<string>\",\n \"uri\": \"http://localhost:8080/some/path\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"telegramBotUsername\": \"<string>\",\n \"telegramUsername\": \"<string>\",\n \"telegramUserId\": \"<string>\",\n \"telegramChatId\": \"<string>\",\n \"telegramChatTitle\": \"<string>\",\n \"telegramChatType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/destination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": 123,\n \"tags\": [],\n \"value\": \"<string>\",\n \"uri\": \"http://localhost:8080/some/path\",\n \"method\": \"<string>\",\n \"headers\": {},\n \"telegramBotUsername\": \"<string>\",\n \"telegramUsername\": \"<string>\",\n \"telegramUserId\": \"<string>\",\n \"telegramChatId\": \"<string>\",\n \"telegramChatTitle\": \"<string>\",\n \"telegramChatType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"tenantId": 123,
"type": "EMAIL",
"uid": "Telegram: /start {uid}",
"tags": [
"DEFAULT"
],
"value": "<string>",
"telegramBotUsername": "<string>",
"telegramUserId": "<string>",
"telegramUsername": "<string>",
"telegramChatId": "<string>",
"telegramChatTitle": "<string>",
"telegramChatType": "<string>",
"slackUri": "<string>",
"slackChannelId": "<string>",
"slackChannelName": "<string>",
"uri": "<string>",
"method": "<string>",
"headers": {}
}Authorizations
Authentication
Body
ID of the tenant
Type of the destination information
EMAIL, TELEGRAM, HTTP, SLACK Destination tags
DEFAULT, DETECTOR, WALLET The destination information value, e.g., an email address, phone number, http uri, etc.
Http uri
"http://localhost:8080/some/path"
Http method
Http headers
Show child attributes
Show child attributes
Response
OK
Unique identifier of the entity
1
Time when entity was created
Time when entity was updated
ID of the tenant
Type of the destination information
EMAIL, TELEGRAM, HTTP, SLACK The uid which can be used to bind a destination
"Telegram: /start {uid}"
Destination tags
DEFAULT, DETECTOR, WALLET The destination information value, e.g., an email address, phone number, http uri, etc.
The telegram bot username
The telegram user id
The telegram username
The telegram chat id
The telegram chat title
The telegram chat type
Webhook slack uri
Slack Channel id
Slack Channel name
Http uri
Http method
Http headers
Show child attributes
Show child attributes