curl --request POST \
--url https://api.statisfy.com/v1/integrations/microsoft_teams/teams/{team_id}/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"days": 30
}'import requests
url = "https://api.statisfy.com/v1/integrations/microsoft_teams/teams/{team_id}/refresh"
payload = { "days": 30 }
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({days: 30})
};
fetch('https://api.statisfy.com/v1/integrations/microsoft_teams/teams/{team_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/microsoft_teams/teams/{team_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_POSTFIELDS => json_encode([
'days' => 30
]),
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/microsoft_teams/teams/{team_id}/refresh"
payload := strings.NewReader("{\n \"days\": 30\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.statisfy.com/v1/integrations/microsoft_teams/teams/{team_id}/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"days\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/microsoft_teams/teams/{team_id}/refresh")
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 \"days\": 30\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"run_id": 123,
"started_at": "2023-11-07T05:31:56Z",
"status": "scheduled"
}{
"message": "<string>",
"run_id": 123,
"started_at": "2023-11-07T05:31:56Z",
"status": "scheduled"
}Refresh a Microsoft Teams team
Reads the team’s channels and members again, and its messages of the last days days as a run (what is already stored is skipped): 202 scheduled. One Teams run at a time, for any team: while one is in flight the answer is 200 already_running with that run, and nothing is read for this team. A refresh within 15 minutes after a completed run is a 409 with Retry-After. A team without Statisfy, or a connection Microsoft refused, is a 409; a 422 when Microsoft refuses Statisfy during the call. Calls Microsoft Graph: a 502 when Microsoft fails or cannot be reached, a 503 (with Retry-After when Microsoft sends one) while it throttles Statisfy, a 500 when Statisfy’s own Microsoft sign-in fails.
curl --request POST \
--url https://api.statisfy.com/v1/integrations/microsoft_teams/teams/{team_id}/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"days": 30
}'import requests
url = "https://api.statisfy.com/v1/integrations/microsoft_teams/teams/{team_id}/refresh"
payload = { "days": 30 }
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({days: 30})
};
fetch('https://api.statisfy.com/v1/integrations/microsoft_teams/teams/{team_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/microsoft_teams/teams/{team_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_POSTFIELDS => json_encode([
'days' => 30
]),
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/microsoft_teams/teams/{team_id}/refresh"
payload := strings.NewReader("{\n \"days\": 30\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.statisfy.com/v1/integrations/microsoft_teams/teams/{team_id}/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"days\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/microsoft_teams/teams/{team_id}/refresh")
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 \"days\": 30\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"run_id": 123,
"started_at": "2023-11-07T05:31:56Z",
"status": "scheduled"
}{
"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
Body
Response
Successful Response
Was this page helpful?