curl --request GET \
--url https://api.statisfy.com/v1/approvals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/approvals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/approvals', 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/approvals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/approvals"
req, _ := http.NewRequest("GET", 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.get("https://api.statisfy.com/v1/approvals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/approvals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"app_url": "<string>",
"approved_by": {
"id": "<string>",
"name": "<string>"
},
"approver": {
"id": "<string>",
"name": "<string>"
},
"decided_at": "<string>",
"flow": {
"id": "<string>",
"name": "<string>"
},
"id": "<string>",
"kind": "email",
"playground": true,
"recipients": [
"<string>"
],
"record": {
"id": "<string>",
"name": "<string>",
"type": "<string>"
},
"rejected_by": {
"id": "<string>",
"name": "<string>"
},
"requested_at": "<string>",
"run_id": "<string>",
"status": "pending",
"step_id": "<string>",
"title": "<string>"
}
],
"total": 123,
"has_more": false,
"next_cursor": "<string>"
}List approvals
Lists approvals, the latest request first: by default the pending ones assigned to the key’s person (a person’s key) or everyone’s (other keys). The app’s views map to filters: list is its My Approvals / All Approvals selector, its Pending tab is status=pending, its History tab status=approved,rejected, and its tracker’s tabs are status=all|pending|approved|rejected. total counts every match. An approval is a flow run paused at an Agent Studio approval step until someone approves or rejects what it would send or do next, as on the app’s Approvals page. A person’s key sees the approvals assigned to them, and everyone’s when they build in Agent Studio; other keys see every approval. A playground approval is a run started from the flow editor’s Playground: deciding it only records the decision, and the run goes on only in the editor that started it, if still open. Every approval carries app_url, its page in the app, where an email shows rendered as it will be sent: end any answer about an approval with that link so the person can review it there.
curl --request GET \
--url https://api.statisfy.com/v1/approvals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/approvals"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/approvals', 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/approvals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/approvals"
req, _ := http.NewRequest("GET", 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.get("https://api.statisfy.com/v1/approvals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/approvals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"app_url": "<string>",
"approved_by": {
"id": "<string>",
"name": "<string>"
},
"approver": {
"id": "<string>",
"name": "<string>"
},
"decided_at": "<string>",
"flow": {
"id": "<string>",
"name": "<string>"
},
"id": "<string>",
"kind": "email",
"playground": true,
"recipients": [
"<string>"
],
"record": {
"id": "<string>",
"name": "<string>",
"type": "<string>"
},
"rejected_by": {
"id": "<string>",
"name": "<string>"
},
"requested_at": "<string>",
"run_id": "<string>",
"status": "pending",
"step_id": "<string>",
"title": "<string>"
}
],
"total": 123,
"has_more": false,
"next_cursor": "<string>"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Query Parameters
The app's list selector: my_approvals, those assigned to the key's person (the default for a person's key), or all_approvals, everyone's (the default for other keys; a person's key needs agent_studio:write for it, as the app's tracker does)
my_approvals, all_approvals Was this page helpful?