curl --request PATCH \
--url https://api.statisfy.com/v1/approvals/{approval_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {},
"exclude": [
"<string>"
],
"include": [
"<string>"
],
"message": "<string>",
"messages": [
{
"html": "<string>",
"subject": "<string>",
"to": "<string>"
}
],
"remove_attachments": [
"<string>"
],
"rows": [
{}
]
}
'import requests
url = "https://api.statisfy.com/v1/approvals/{approval_id}"
payload = {
"data": {},
"exclude": ["<string>"],
"include": ["<string>"],
"message": "<string>",
"messages": [
{
"html": "<string>",
"subject": "<string>",
"to": "<string>"
}
],
"remove_attachments": ["<string>"],
"rows": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {},
exclude: ['<string>'],
include: ['<string>'],
message: '<string>',
messages: [{html: '<string>', subject: '<string>', to: '<string>'}],
remove_attachments: ['<string>'],
rows: [{}]
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
],
'exclude' => [
'<string>'
],
'include' => [
'<string>'
],
'message' => '<string>',
'messages' => [
[
'html' => '<string>',
'subject' => '<string>',
'to' => '<string>'
]
],
'remove_attachments' => [
'<string>'
],
'rows' => [
[
]
]
]),
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/{approval_id}"
payload := strings.NewReader("{\n \"data\": {},\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ],\n \"message\": \"<string>\",\n \"messages\": [\n {\n \"html\": \"<string>\",\n \"subject\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"remove_attachments\": [\n \"<string>\"\n ],\n \"rows\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.statisfy.com/v1/approvals/{approval_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {},\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ],\n \"message\": \"<string>\",\n \"messages\": [\n {\n \"html\": \"<string>\",\n \"subject\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"remove_attachments\": [\n \"<string>\"\n ],\n \"rows\": [\n {}\n ]\n}")
.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::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {},\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ],\n \"message\": \"<string>\",\n \"messages\": [\n {\n \"html\": \"<string>\",\n \"subject\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"remove_attachments\": [\n \"<string>\"\n ],\n \"rows\": [\n {}\n ]\n}"
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>"
}Edit a pending approval before deciding (your own key)
Changes what a pending approval will send, as the app’s Approvals page does before you approve: an email’s subject or HTML body (messages, for one recipient’s message or every message), recipients taken off (exclude) or put back (include) and attachments removed (remove_attachments, ids from GET); a custom step’s message, data or table rows. The same checks as the app: an email keeps at least one recipient (reject it instead), and an address can’t be both sent to and taken off (422 with the app’s code). Returns the approval as edited, its HTML included. Only a person edits, with their own key, an approval assigned to them (or any, when they build in Agent Studio); 409 once it is decided. The run sends what was saved when it is approved. 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. 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 PATCH \
--url https://api.statisfy.com/v1/approvals/{approval_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {},
"exclude": [
"<string>"
],
"include": [
"<string>"
],
"message": "<string>",
"messages": [
{
"html": "<string>",
"subject": "<string>",
"to": "<string>"
}
],
"remove_attachments": [
"<string>"
],
"rows": [
{}
]
}
'import requests
url = "https://api.statisfy.com/v1/approvals/{approval_id}"
payload = {
"data": {},
"exclude": ["<string>"],
"include": ["<string>"],
"message": "<string>",
"messages": [
{
"html": "<string>",
"subject": "<string>",
"to": "<string>"
}
],
"remove_attachments": ["<string>"],
"rows": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {},
exclude: ['<string>'],
include: ['<string>'],
message: '<string>',
messages: [{html: '<string>', subject: '<string>', to: '<string>'}],
remove_attachments: ['<string>'],
rows: [{}]
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
],
'exclude' => [
'<string>'
],
'include' => [
'<string>'
],
'message' => '<string>',
'messages' => [
[
'html' => '<string>',
'subject' => '<string>',
'to' => '<string>'
]
],
'remove_attachments' => [
'<string>'
],
'rows' => [
[
]
]
]),
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/{approval_id}"
payload := strings.NewReader("{\n \"data\": {},\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ],\n \"message\": \"<string>\",\n \"messages\": [\n {\n \"html\": \"<string>\",\n \"subject\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"remove_attachments\": [\n \"<string>\"\n ],\n \"rows\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.statisfy.com/v1/approvals/{approval_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {},\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ],\n \"message\": \"<string>\",\n \"messages\": [\n {\n \"html\": \"<string>\",\n \"subject\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"remove_attachments\": [\n \"<string>\"\n ],\n \"rows\": [\n {}\n ]\n}")
.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::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {},\n \"exclude\": [\n \"<string>\"\n ],\n \"include\": [\n \"<string>\"\n ],\n \"message\": \"<string>\",\n \"messages\": [\n {\n \"html\": \"<string>\",\n \"subject\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"remove_attachments\": [\n \"<string>\"\n ],\n \"rows\": [\n {}\n ]\n}"
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.
Body
Response
Successful Response
Was this page helpful?