curl --request GET \
--url https://api.statisfy.com/v1/approvals/{approval_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/approvals/{approval_id}"
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/{approval_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/approvals/{approval_id}",
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/{approval_id}"
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/{approval_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/approvals/{approval_id}")
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{
"app_url": "<string>",
"approved_by": {
"id": "<string>",
"name": "<string>"
},
"approver": {
"id": "<string>",
"name": "<string>"
},
"content": {
"basic": {
"data": {},
"message": "<string>",
"rows": [
{}
]
},
"email": {
"attachments": [
{
"filename": "<string>",
"id": "<string>",
"mime_type": "<string>",
"size_bytes": 123
}
],
"excluded": [
{
"contact_id": "<string>",
"email": "<string>",
"name": "<string>"
}
],
"messages": [
{
"bcc": [
"<string>"
],
"cc": [
"<string>"
],
"edited": true,
"subject": "<string>",
"text": "<string>",
"to": [
{
"contact_id": "<string>",
"email": "<string>",
"name": "<string>"
}
],
"html": "<string>"
}
],
"sender": {
"email": "<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>"
}Get one approval with what it would send
Returns one approval with its content: for an email, each message (recipients, subject, the body as plain text; its HTML with include_html=true), who was taken off and the attachments (read one with GET /v1/approvals//attachments/); for a custom step, its message and data. 404 for an approval the key can’t list. 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/{approval_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/approvals/{approval_id}"
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/{approval_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/approvals/{approval_id}",
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/{approval_id}"
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/{approval_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/approvals/{approval_id}")
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{
"app_url": "<string>",
"approved_by": {
"id": "<string>",
"name": "<string>"
},
"approver": {
"id": "<string>",
"name": "<string>"
},
"content": {
"basic": {
"data": {},
"message": "<string>",
"rows": [
{}
]
},
"email": {
"attachments": [
{
"filename": "<string>",
"id": "<string>",
"mime_type": "<string>",
"size_bytes": 123
}
],
"excluded": [
{
"contact_id": "<string>",
"email": "<string>",
"name": "<string>"
}
],
"messages": [
{
"bcc": [
"<string>"
],
"cc": [
"<string>"
],
"edited": true,
"subject": "<string>",
"text": "<string>",
"to": [
{
"contact_id": "<string>",
"email": "<string>",
"name": "<string>"
}
],
"html": "<string>"
}
],
"sender": {
"email": "<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>"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Query Parameters
Response
Successful Response
Was this page helpful?