Preview Salesforce Chatter
curl --request POST \
--url https://api.statisfy.com/v1/integrations/salesforce/preview/chatter \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"excluded_feed_types": [
"<string>"
],
"last_n_days": 3,
"limit": 5,
"parent_filter_string": "<string>",
"parent_types": [
"Account"
]
}
'import requests
url = "https://api.statisfy.com/v1/integrations/salesforce/preview/chatter"
payload = {
"excluded_feed_types": ["<string>"],
"last_n_days": 3,
"limit": 5,
"parent_filter_string": "<string>",
"parent_types": ["Account"]
}
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({
excluded_feed_types: ['<string>'],
last_n_days: 3,
limit: 5,
parent_filter_string: '<string>',
parent_types: ['Account']
})
};
fetch('https://api.statisfy.com/v1/integrations/salesforce/preview/chatter', 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/salesforce/preview/chatter",
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([
'excluded_feed_types' => [
'<string>'
],
'last_n_days' => 3,
'limit' => 5,
'parent_filter_string' => '<string>',
'parent_types' => [
'Account'
]
]),
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/salesforce/preview/chatter"
payload := strings.NewReader("{\n \"excluded_feed_types\": [\n \"<string>\"\n ],\n \"last_n_days\": 3,\n \"limit\": 5,\n \"parent_filter_string\": \"<string>\",\n \"parent_types\": [\n \"Account\"\n ]\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/salesforce/preview/chatter")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"excluded_feed_types\": [\n \"<string>\"\n ],\n \"last_n_days\": 3,\n \"limit\": 5,\n \"parent_filter_string\": \"<string>\",\n \"parent_types\": [\n \"Account\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/salesforce/preview/chatter")
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 \"excluded_feed_types\": [\n \"<string>\"\n ],\n \"last_n_days\": 3,\n \"limit\": 5,\n \"parent_filter_string\": \"<string>\",\n \"parent_types\": [\n \"Account\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"is_valid": true,
"count_at_cap": false,
"error_message": "<string>",
"samples": [
{
"feed_item_type": "<string>",
"id": "<string>",
"parent_id": "<string>",
"parent_name": "<string>",
"parent_type": "<string>",
"author_name": "<string>",
"body_excerpt": "",
"created_date": "<string>"
}
],
"total_count": 0
}integrations
Preview Salesforce Chatter
The Chatter posts the settings would sync: up to limit samples (author and an excerpt of the body) and a count, capped at 500 (count_at_cap). Needs integrations:write: the posts are Salesforce data. Calls Salesforce. A preview that Salesforce refuses or cannot answer, for any reason (an expired session or a used-up API limit included), answers is_valid false with a fixed message: Salesforce’s reason is not passed on. The object list is a 502 when Salesforce does not answer, and the fields of an object it does not describe are a 404. A 500 on an unexpected failure.
POST
/
v1
/
integrations
/
salesforce
/
preview
/
chatter
Preview Salesforce Chatter
curl --request POST \
--url https://api.statisfy.com/v1/integrations/salesforce/preview/chatter \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"excluded_feed_types": [
"<string>"
],
"last_n_days": 3,
"limit": 5,
"parent_filter_string": "<string>",
"parent_types": [
"Account"
]
}
'import requests
url = "https://api.statisfy.com/v1/integrations/salesforce/preview/chatter"
payload = {
"excluded_feed_types": ["<string>"],
"last_n_days": 3,
"limit": 5,
"parent_filter_string": "<string>",
"parent_types": ["Account"]
}
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({
excluded_feed_types: ['<string>'],
last_n_days: 3,
limit: 5,
parent_filter_string: '<string>',
parent_types: ['Account']
})
};
fetch('https://api.statisfy.com/v1/integrations/salesforce/preview/chatter', 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/salesforce/preview/chatter",
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([
'excluded_feed_types' => [
'<string>'
],
'last_n_days' => 3,
'limit' => 5,
'parent_filter_string' => '<string>',
'parent_types' => [
'Account'
]
]),
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/salesforce/preview/chatter"
payload := strings.NewReader("{\n \"excluded_feed_types\": [\n \"<string>\"\n ],\n \"last_n_days\": 3,\n \"limit\": 5,\n \"parent_filter_string\": \"<string>\",\n \"parent_types\": [\n \"Account\"\n ]\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/salesforce/preview/chatter")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"excluded_feed_types\": [\n \"<string>\"\n ],\n \"last_n_days\": 3,\n \"limit\": 5,\n \"parent_filter_string\": \"<string>\",\n \"parent_types\": [\n \"Account\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/salesforce/preview/chatter")
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 \"excluded_feed_types\": [\n \"<string>\"\n ],\n \"last_n_days\": 3,\n \"limit\": 5,\n \"parent_filter_string\": \"<string>\",\n \"parent_types\": [\n \"Account\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"is_valid": true,
"count_at_cap": false,
"error_message": "<string>",
"samples": [
{
"feed_item_type": "<string>",
"id": "<string>",
"parent_id": "<string>",
"parent_name": "<string>",
"parent_type": "<string>",
"author_name": "<string>",
"body_excerpt": "",
"created_date": "<string>"
}
],
"total_count": 0
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
application/json
Was this page helpful?