Approvals
Request approval
POST
https://postifuse.com/v1/posts/{id}/approvalOptional. Without it, a post goes out as soon as preflight passes. With it, the post waits until a person approves it: Postifuse emails the approver a link, and the post goes out only after approve. Made for agents that draft and humans who sign off.
To decide once per account instead of per post, set its agent_mode.
curl --request POST \
--url 'https://postifuse.com/v1/posts/id_1/approval' \
--header 'Authorization: Bearer pf_live_…' \
--header 'Content-Type: application/json' \
--data '{
"approver": "owner@example.com"
}'
const res = await fetch("https://postifuse.com/v1/posts/id_1/approval", {
method: "POST",
headers: {
"Authorization": "Bearer pf_live_…",
"Content-Type": "application/json"
},
body: JSON.stringify({
"approver": "owner@example.com"
}),
});
const data = await res.json();
import requests
res = requests.post(
"https://postifuse.com/v1/posts/id_1/approval",
headers={"Authorization": "Bearer pf_live_…"},
json={
"approver": "owner@example.com"
},
)
print(res.json())
{
"id": "apr_7",
"status": "pending",
"url": "https://postifuse.com/a/…"
}
{
"error": "workspace_not_active",
"message": "The workspace for this key is not active yet.",
"docs": "https://postifuse.com/docs/errors/"
}
Headers
AuthorizationstringrequiredBearer followed by a workspace key, a profile key or an OAuth token. See authentication.
Example Bearer pf_live_…
Path parameters
idstringrequiredThe post id.
Body application/json
approverstring<email>requiredWho receives the approval link.
Example owner@example.com
Response
200Pending approval
403Workspace not active