Create Channel Binding
curl --request POST \
--url https://api.veryfront.com/projects/{project_reference}/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": "slack",
"assistant_id": "<string>",
"name": "<string>",
"allowed_channels": [
"<string>"
],
"welcome_message": "<string>",
"error_message": "<string>",
"max_response_tokens": 32768,
"target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.veryfront.com/projects/{project_reference}/channels"
payload = {
"platform": "slack",
"assistant_id": "<string>",
"name": "<string>",
"allowed_channels": ["<string>"],
"welcome_message": "<string>",
"error_message": "<string>",
"max_response_tokens": 32768,
"target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
platform: 'slack',
assistant_id: '<string>',
name: '<string>',
allowed_channels: ['<string>'],
welcome_message: '<string>',
error_message: '<string>',
max_response_tokens: 32768,
target_environment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target_branch_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.veryfront.com/projects/{project_reference}/channels', 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.veryfront.com/projects/{project_reference}/channels",
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([
'platform' => 'slack',
'assistant_id' => '<string>',
'name' => '<string>',
'allowed_channels' => [
'<string>'
],
'welcome_message' => '<string>',
'error_message' => '<string>',
'max_response_tokens' => 32768,
'target_environment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'target_branch_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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.veryfront.com/projects/{project_reference}/channels"
payload := strings.NewReader("{\n \"platform\": \"slack\",\n \"assistant_id\": \"<string>\",\n \"name\": \"<string>\",\n \"allowed_channels\": [\n \"<string>\"\n ],\n \"welcome_message\": \"<string>\",\n \"error_message\": \"<string>\",\n \"max_response_tokens\": 32768,\n \"target_environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_branch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.veryfront.com/projects/{project_reference}/channels")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": \"slack\",\n \"assistant_id\": \"<string>\",\n \"name\": \"<string>\",\n \"allowed_channels\": [\n \"<string>\"\n ],\n \"welcome_message\": \"<string>\",\n \"error_message\": \"<string>\",\n \"max_response_tokens\": 32768,\n \"target_environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_branch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/projects/{project_reference}/channels")
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 \"platform\": \"slack\",\n \"assistant_id\": \"<string>\",\n \"name\": \"<string>\",\n \"allowed_channels\": [\n \"<string>\"\n ],\n \"welcome_message\": \"<string>\",\n \"error_message\": \"<string>\",\n \"max_response_tokens\": 32768,\n \"target_environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_branch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "slack",
"enabled": true,
"platform_team_id": "<string>",
"platform_bot_id": "<string>",
"allowed_channels": [
"<string>"
],
"resolved_target": {
"runtime_target": {
"target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"resolved_environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"resolved_branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"resolved_deployment": {
"id": "<string>",
"runtime_version": "<string>",
"deployment_revision": "<string>",
"last_deployed_at": "<string>"
},
"resolved_managed_domain": {
"domain": "<string>",
"health_url": "<string>"
},
"last_resolution_error": {
"code": "<string>",
"retryable": true,
"message": "<string>"
}
},
"created_at": "<string>",
"updated_at": "<string>",
"binding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"installation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"assistant_id": "<string>",
"workspace_name": "<string>",
"welcome_message": "<string>",
"error_message": "<string>",
"max_response_tokens": 1,
"target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>"
}Creates a new channel binding for a project.
POST
/
projects
/
{project_reference}
/
channels
Create Channel Binding
curl --request POST \
--url https://api.veryfront.com/projects/{project_reference}/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": "slack",
"assistant_id": "<string>",
"name": "<string>",
"allowed_channels": [
"<string>"
],
"welcome_message": "<string>",
"error_message": "<string>",
"max_response_tokens": 32768,
"target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.veryfront.com/projects/{project_reference}/channels"
payload = {
"platform": "slack",
"assistant_id": "<string>",
"name": "<string>",
"allowed_channels": ["<string>"],
"welcome_message": "<string>",
"error_message": "<string>",
"max_response_tokens": 32768,
"target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
platform: 'slack',
assistant_id: '<string>',
name: '<string>',
allowed_channels: ['<string>'],
welcome_message: '<string>',
error_message: '<string>',
max_response_tokens: 32768,
target_environment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target_branch_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.veryfront.com/projects/{project_reference}/channels', 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.veryfront.com/projects/{project_reference}/channels",
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([
'platform' => 'slack',
'assistant_id' => '<string>',
'name' => '<string>',
'allowed_channels' => [
'<string>'
],
'welcome_message' => '<string>',
'error_message' => '<string>',
'max_response_tokens' => 32768,
'target_environment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'target_branch_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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.veryfront.com/projects/{project_reference}/channels"
payload := strings.NewReader("{\n \"platform\": \"slack\",\n \"assistant_id\": \"<string>\",\n \"name\": \"<string>\",\n \"allowed_channels\": [\n \"<string>\"\n ],\n \"welcome_message\": \"<string>\",\n \"error_message\": \"<string>\",\n \"max_response_tokens\": 32768,\n \"target_environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_branch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.veryfront.com/projects/{project_reference}/channels")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": \"slack\",\n \"assistant_id\": \"<string>\",\n \"name\": \"<string>\",\n \"allowed_channels\": [\n \"<string>\"\n ],\n \"welcome_message\": \"<string>\",\n \"error_message\": \"<string>\",\n \"max_response_tokens\": 32768,\n \"target_environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_branch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/projects/{project_reference}/channels")
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 \"platform\": \"slack\",\n \"assistant_id\": \"<string>\",\n \"name\": \"<string>\",\n \"allowed_channels\": [\n \"<string>\"\n ],\n \"welcome_message\": \"<string>\",\n \"error_message\": \"<string>\",\n \"max_response_tokens\": 32768,\n \"target_environment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_branch_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "slack",
"enabled": true,
"platform_team_id": "<string>",
"platform_bot_id": "<string>",
"allowed_channels": [
"<string>"
],
"resolved_target": {
"runtime_target": {
"target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"resolved_environment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"resolved_branch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"resolved_deployment": {
"id": "<string>",
"runtime_version": "<string>",
"deployment_revision": "<string>",
"last_deployed_at": "<string>"
},
"resolved_managed_domain": {
"domain": "<string>",
"health_url": "<string>"
},
"last_resolution_error": {
"code": "<string>",
"retryable": true,
"message": "<string>"
}
},
"created_at": "<string>",
"updated_at": "<string>",
"binding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"installation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"assistant_id": "<string>",
"workspace_name": "<string>",
"welcome_message": "<string>",
"error_message": "<string>",
"max_response_tokens": 1,
"target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Use a JWT bearer token or a Veryfront API key in the Authorization header.
Path Parameters
Body
application/json
Available options:
slack Minimum string length:
1Required string length:
1 - 255Available options:
mentions, direct_messages, all Maximum array length:
250Required string length:
1 - 255Maximum string length:
4000Maximum string length:
4000Required range:
0 < x <= 65536Available options:
main_branch, environment, preview_branch Response
Created channel binding
Available options:
slack Available options:
mentions, direct_messages, all Available options:
connected, needs_reauth, error Available options:
main_branch, environment, preview_branch Show child attributes
Show child attributes
Minimum string length:
1Required range:
x > 0⌘I