PermuteDocs
Go to Permute

Access requests · accessRequestsDecide

Approve, resolve, reject, or cancel an access request

Approval grants the requested caller access and closes the request atomically after verifying current caller and app access. App grants are never expanded. Resolve only verifies access already granted. Requesters may cancel their own pending requests.

POST/v1/access-requests/{requestId}/decisions
betaauthenticatedworkspace

When to use

Verify and resolve a reviewed request, reject it, or cancel your own pending request.

For agents

Approve grants the requested caller access and closes the request atomically. Missing app grants block approval without changing caller access. Resolve verifies access already granted. Neither decision replays the failed operation. Hosted app clients support cancellation only.

Example

typescript
import { PermuteClient } from '@permute/sdk';

const orgClient = new PermuteClient({
  apiKey: process.env.PERMUTE_API_KEY!,
});

const client = orgClient.withWorkspace(process.env.PERMUTE_WORKSPACE_ID!);

const result = await client.accessRequests.decide('task_abcdefghijklmnopqrstuvwx', { decision: 'approved' });

Request body

json
{
  "decision": "approved"
}

Response

json
{
  "data": {
    "id": "task_abcdefghijklmnopqrstuvwx",
    "resourceId": "dbas_abcdefghijklmnopqrstuvwx",
    "resourceType": "database",
    "principalType": "apiKey",
    "principalId": "apikey_example",
    "level": "read",
    "reason": "Read customer accounts for support.",
    "status": "approved",
    "createdAt": "2026-10-27T12:00:00.000Z",
    "expiresAt": "2026-11-03T12:00:00.000Z"
  }
}