curl --request POST \
--url https://api.statisfy.com/v1/approvals/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"approval_ids": [
"<string>"
],
"approved": true
}
'import requests
url = "https://api.statisfy.com/v1/approvals/decisions"
payload = {
"approval_ids": ["<string>"],
"approved": True
}
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({approval_ids: ['<string>'], approved: true})
};
fetch('https://api.statisfy.com/v1/approvals/decisions', 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/decisions",
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([
'approval_ids' => [
'<string>'
],
'approved' => true
]),
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/approvals/decisions"
payload := strings.NewReader("{\n \"approval_ids\": [\n \"<string>\"\n ],\n \"approved\": true\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/approvals/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"approval_ids\": [\n \"<string>\"\n ],\n \"approved\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/approvals/decisions")
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 \"approval_ids\": [\n \"<string>\"\n ],\n \"approved\": true\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"status": "approved",
"app_url": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{}
]
}
}
]
}Approve or reject approvals (your own key)
Approves (approved: true) or rejects (false) up to 100 approvals at once, as the app’s Approvals page does for one or many, as the key’s person. Only a person decides an approval, with their own key: any other key is refused (403). Approving resumes each run on its own shortly after, and a run can send email to your customers; rejecting ends it and nothing it was waiting to send goes out. Each approval must be assigned to the person, unless they build in Agent Studio. Each item answers on its own, in request order: approved or rejected, or failed with the error a single decision would have had (not_found for one the key can’t see, as GET answers, conflict when already decided, upstream_failed when the run couldn’t be queued to resume: retry it when it is pending again; its message says when it is stuck approved instead, for someone to put right). Each item carries the approval’s app_url: end the answer with the links. Over MCP: first show the person what will be sent (GET the approval: recipients, subject, the email as text) with its app_url, where the email shows rendered, and act only on their explicit go-ahead for these approvals.
curl --request POST \
--url https://api.statisfy.com/v1/approvals/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"approval_ids": [
"<string>"
],
"approved": true
}
'import requests
url = "https://api.statisfy.com/v1/approvals/decisions"
payload = {
"approval_ids": ["<string>"],
"approved": True
}
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({approval_ids: ['<string>'], approved: true})
};
fetch('https://api.statisfy.com/v1/approvals/decisions', 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/decisions",
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([
'approval_ids' => [
'<string>'
],
'approved' => true
]),
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/approvals/decisions"
payload := strings.NewReader("{\n \"approval_ids\": [\n \"<string>\"\n ],\n \"approved\": true\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/approvals/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"approval_ids\": [\n \"<string>\"\n ],\n \"approved\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/approvals/decisions")
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 \"approval_ids\": [\n \"<string>\"\n ],\n \"approved\": true\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"status": "approved",
"app_url": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{}
]
}
}
]
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
Was this page helpful?