curl --request POST \
--url https://api.truthlocks.com/v1/approvals \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "<string>",
"action": "<string>",
"resource": "<string>",
"scope": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
action: '<string>',
resource: '<string>',
scope: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/approvals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/approvals"
payload = {
"agent_id": "<string>",
"action": "<string>",
"resource": "<string>",
"scope": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/approvals"
payload := strings.NewReader("{\n \"agent_id\": \"<string>\",\n \"action\": \"<string>\",\n \"resource\": \"<string>\",\n \"scope\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"requested_by": "<string>",
"status": "pending",
"expires_at": "2023-11-07T05:31:56Z",
"required_approvals": 5,
"current_approvals": 5,
"decisions": [
{
"reviewer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decision": "approved",
"reason": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"resource": "<string>",
"scope": "<string>",
"justification": "<string>",
"decision_reason": "<string>",
"risk_level": "low",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by": "<string>"
}Request agent approval
Records a request for independent human review. Does not execute an agent action, grant permissions, or automatically pause or resume a Temporal workflow.
curl --request POST \
--url https://api.truthlocks.com/v1/approvals \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "<string>",
"action": "<string>",
"resource": "<string>",
"scope": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
action: '<string>',
resource: '<string>',
scope: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/approvals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/approvals"
payload = {
"agent_id": "<string>",
"action": "<string>",
"resource": "<string>",
"scope": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/approvals"
payload := strings.NewReader("{\n \"agent_id\": \"<string>\",\n \"action\": \"<string>\",\n \"resource\": \"<string>\",\n \"scope\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"requested_by": "<string>",
"status": "pending",
"expires_at": "2023-11-07T05:31:56Z",
"required_approvals": 5,
"current_approvals": 5,
"decisions": [
{
"reviewer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decision": "approved",
"reason": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"action": "<string>",
"resource": "<string>",
"scope": "<string>",
"justification": "<string>",
"decision_reason": "<string>",
"risk_level": "low",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by": "<string>"
}Authorizations
Body
An active, uncompromised agent in this authenticated workspace environment.
The intended action; 1–200 UTF-8 bytes. Creating a request does not execute it.
Specific target resource; 1–2000 UTF-8 bytes.
Intended permission; 1–200 UTF-8 bytes. Does not grant access.
Supporting evidence and purpose; at most 4000 UTF-8 bytes. Never include secrets.
low, medium, high, critical Distinct authorized human reviewers; requester excluded.
1 <= x <= 101 <= x <= 10080Response
Recorded result
Authenticated requester: human user UUID or api_key:; never a caller-supplied reviewer.
pending, approved, rejected, expired, cancelled 1 <= x <= 100 <= x <= 10Immutable individual reviews. The queue response leaves this empty; get the request for its complete review history.
Show child attributes
Show child attributes
low, medium, high, critical Final reviewer or requester cancelling the request; absent while pending.

