Refresh a Slack channel
curl --request POST \
--url https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh', 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}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"run_id": 123,
"started_at": "2023-11-07T05:31:56Z",
"status": "scheduled"
}integrations
Refresh a Slack channel
Reads the channel’s messages from Slack again as a run, from the last stored message’s last update (60 days back when none is stored): 202 scheduled. A channel Statisfy does not have is a 404. While a pull of the channel is in flight, a 409; within 15 minutes after the last completed one ended, a 409 with Retry-After (a failed one can be retried at once). A 409 when the channel’s Slack workspace is no longer installed. A run that cannot be queued is a 503 with Retry-After.
POST
/
v1
/
integrations
/
slack
/
channels
/
{channel_id}
/
refresh
Refresh a Slack channel
curl --request POST \
--url https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh', 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}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/slack/channels/{channel_id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"run_id": 123,
"started_at": "2023-11-07T05:31:56Z",
"status": "scheduled"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Path Parameters
Response
202 - application/json
Successful Response
Was this page helpful?