POST
/v1/access-requestsbetaauthenticatedworkspace
When to use
Ask for access for the current user or API key after a denied resource read.
For agents
Submission does not confirm that a resource exists or grant access. App sessions still require both caller and app grants (a request cannot widen either). Requests expire after seven days.
Example
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.create({
"resourceId": "dbas_abcdefghijklmnopqrstuvwx",
"level": "read",
"reason": "Read customer accounts for support."
});Request body
{
"resourceId": "dbas_abcdefghijklmnopqrstuvwx",
"level": "read",
"reason": "Read customer accounts for support."
}Response
{
"data": {
"id": "task_abcdefghijklmnopqrstuvwx",
"resourceId": "dbas_abcdefghijklmnopqrstuvwx",
"resourceType": "database",
"principalType": "apiKey",
"principalId": "apikey_example",
"level": "read",
"reason": "Read customer accounts for support.",
"status": "pending",
"createdAt": "2026-10-27T12:00:00.000Z",
"expiresAt": "2026-11-03T12:00:00.000Z"
}
}