Skip to Content
API reference

Review actions that need approval

Read pending permission requests while keeping approval decisions inside an interactive administrator session.

API reference
01

Approval boundaries

Workspace members can list permission approvals. Non administrators see requests scoped to their own work, while administrators can inspect the workspace queue.

Approval decisions require an interactive administrator session. API keys cannot call the decision route, even when they have read and write access. This prevents unattended credentials from approving their own sensitive actions.

GET
List visible permission approvals for the workspace
POST
Decide an approval from an interactive administrator session
import json
import os
import urllib.request
url = "https://api.trysupervisor.com/workspaces/{workspaceId}/permission-approvals"
request = urllib.request.Request(url, method="GET")
request.add_header("Authorization", f"Bearer {os.environ['SUPERVISOR_API_KEY']}")
request.add_header("Content-Type", "application/json")
with urllib.request.urlopen(request) as response:
result = json.load(response)
print(json.dumps(result, indent=2))
02

Follow the durable run

An operation waiting for approval uses the awaiting_approval status. Read the run again after the administrator decides the request to obtain its next state.