Read an approval request
Returns the exact calls, requester, decision and execution receipt.
GET
Returns the exact calls, requester, decision and execution receipt. The original OAuth caller may read its own requests; an organization owner may read them from a signed-in session. A pending request past its deadline reads expired.
apiKeyheader
x-api-key<token>id*stringMatch
^apr_[0-9a-hjkmnp-tv-z]{16,24}$ApprovalRequest
application/json- response
id*ApprovalRequestIdMatch
^apr_[0-9a-hjkmnp-tv-z]{16,24}$organizationId*OrganizationIdMatch
^org_[0-9a-hjkmnp-tv-z]{16,24}$namespaceId*|nullclientId*stringrequestedBy*UserIdMatch
^user_[0-9a-hjkmnp-tv-z]{16,24}$intent*stringcalls*array<>Items
1 <= items <= 20status*stringValue in
"pending""executing""executed""rejected""failed""expired"expiresAt*stringcreatedAt*stringdecidedAt*string|nulldecidedBy*|nullreason*string|nullresults*array<any>|nullerror*string|nullapprovalUrl*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.approvalRequests.get({
"id": "example"
});Example Response
{
"id": "string",
"organizationId": "string",
"namespaceId": "string",
"clientId": "string",
"requestedBy": "string",
"intent": "string",
"calls": [
{
"toolName": "string",
"arguments": {
"property1": "string",
"property2": "string"
}
}
],
"status": "pending",
"expiresAt": "string",
"createdAt": "string",
"decidedAt": "string",
"decidedBy": "string",
"reason": "string",
"results": [],
"error": "string",
"approvalUrl": "string"
}