Reject agent approval
curl --request POST \
--url https://api.truthlocks.com/v1/approvals/{approvalID}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.truthlocks.com/v1/approvals/{approvalID}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/approvals/{approvalID}/reject"
payload = { "reason": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"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/{approvalID}/reject"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\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))
}{
"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>",
"approval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Agent approvals (MAIP)
Reject agent approval
An independent authorized human reviewer may reject once. One rejection immediately closes the request. Requesters, previous reviewers, API keys, and expired requests cannot be reviewed.
POST
/
v1
/
approvals
/
{approvalID}
/
reject
Reject agent approval
curl --request POST \
--url https://api.truthlocks.com/v1/approvals/{approvalID}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.truthlocks.com/v1/approvals/{approvalID}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/approvals/{approvalID}/reject"
payload = { "reason": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"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/{approvalID}/reject"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\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))
}{
"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>",
"approval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}An independent authorized human reviewer may reject once. One rejection immediately closes the request. Requesters, previous reviewers, API keys, and expired requests cannot be reviewed.
See independent agent reviews for the authorization and execution boundaries.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
UUID returned when the approval request was created.
Body
application/json
Reason for the decision; nonblank and at most 2000 UTF-8 bytes.
Minimum string length:
1Response
Recorded result
Authenticated requester: human user UUID or api_key:; never a caller-supplied reviewer.
Available options:
pending, approved, rejected, expired, cancelled Required range:
1 <= x <= 10Required range:
0 <= x <= 10Immutable individual reviews. The queue response leaves this empty; get the request for its complete review history.
Show child attributes
Show child attributes
Available options:
low, medium, high, critical Final reviewer or requester cancelling the request; absent while pending.
Alias of id for compatibility.

