Change a Slack channel
curl --request PATCH \
--url https://api.statisfy.com/v1/integrations/slack/channels/{channel_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cust_id": "<string>",
"enable_stella": true,
"ingestion_disabled": true
}
'import requests
url = "https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}"
payload = {
"cust_id": "<string>",
"enable_stella": True,
"ingestion_disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cust_id: '<string>', enable_stella: true, ingestion_disabled: true})
};
fetch('https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}', 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.statisfy.com/v1/integrations/slack/channels/{channel_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'cust_id' => '<string>',
'enable_stella' => true,
'ingestion_disabled' => true
]),
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.statisfy.com/v1/integrations/slack/channels/{channel_id}"
payload := strings.NewReader("{\n \"cust_id\": \"<string>\",\n \"enable_stella\": true,\n \"ingestion_disabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cust_id\": \"<string>\",\n \"enable_stella\": true,\n \"ingestion_disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cust_id\": \"<string>\",\n \"enable_stella\": true,\n \"ingestion_disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"channel": {
"bot_present": true,
"channel_id": "<string>",
"ingestion_disabled": true,
"is_archived": true,
"cust_id": "<string>",
"cust_ids": [
"<string>"
],
"cust_name": "<string>",
"cust_names": [
"<string>"
],
"enable_stella": true,
"external": true,
"is_group_chat": true,
"is_private": true,
"name": "<string>",
"visibility": "public",
"workspace_id": "<string>",
"workspace_name": "<string>"
}
}integrations
Change a Slack channel
Sets the channel’s account, whether Statisfy reads it, and whether Stella answers in it; only the fields sent change, and a null enable_stella unsets it (off). An account that does not exist is a 422; a channel Statisfy does not have is a 404. Nothing changes in Slack.
PATCH
/
v1
/
integrations
/
slack
/
channels
/
{channel_id}
Change a Slack channel
curl --request PATCH \
--url https://api.statisfy.com/v1/integrations/slack/channels/{channel_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cust_id": "<string>",
"enable_stella": true,
"ingestion_disabled": true
}
'import requests
url = "https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}"
payload = {
"cust_id": "<string>",
"enable_stella": True,
"ingestion_disabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cust_id: '<string>', enable_stella: true, ingestion_disabled: true})
};
fetch('https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}', 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.statisfy.com/v1/integrations/slack/channels/{channel_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'cust_id' => '<string>',
'enable_stella' => true,
'ingestion_disabled' => true
]),
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.statisfy.com/v1/integrations/slack/channels/{channel_id}"
payload := strings.NewReader("{\n \"cust_id\": \"<string>\",\n \"enable_stella\": true,\n \"ingestion_disabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cust_id\": \"<string>\",\n \"enable_stella\": true,\n \"ingestion_disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cust_id\": \"<string>\",\n \"enable_stella\": true,\n \"ingestion_disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"channel": {
"bot_present": true,
"channel_id": "<string>",
"ingestion_disabled": true,
"is_archived": true,
"cust_id": "<string>",
"cust_ids": [
"<string>"
],
"cust_name": "<string>",
"cust_names": [
"<string>"
],
"enable_stella": true,
"external": true,
"is_group_chat": true,
"is_private": true,
"name": "<string>",
"visibility": "public",
"workspace_id": "<string>",
"workspace_name": "<string>"
}
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Path Parameters
Body
application/json
Was this page helpful?