/v1/permissions/{permissionId}When to use
Edit access or expiry on an existing grant without replacing its recipient or scope.
For agents
Read the grant first and pass its returned updatedAt as expectedUpdatedAt. Omitted fields stay unchanged; null expiry removes the deadline. A changed or removed grant returns a conflict or not-found response. Refresh and review before retrying. Current delegation authority still applies; default member access and unsupported scoped grants cannot be edited.
Example
import { PermuteClient } from '@permute/sdk';
const orgClient = new PermuteClient({
apiKey: process.env.PERMUTE_API_KEY!,
});
const result = await orgClient.permissions.update("perm_abcdefghijklmnopqrstuvwx", { expectedUpdatedAt: "2026-10-30T12:00:00.000Z", expiresAt: null });Request body
{
"expectedUpdatedAt": "2026-10-30T12:00:00.000Z",
"expiresAt": null
}Response
{
"data": {
"id": "perm_abcdefghijklmnopqrstuvwx",
"principalType": "apiKey",
"principalId": "apikey_example",
"resourceId": "dbas_abcdefghijklmnopqrstuvwx",
"resourceType": "database",
"subResourceId": null,
"level": "read",
"operations": null,
"organizationId": "org_abcdefghijklmnopqrstuvwx",
"workspaceId": "wksp_abcdefghijklmnopqrstuvwx",
"grantedBy": "user_abcdefghijklmnopqrstuvwx",
"expiresAt": null,
"createdAt": "2026-10-30T12:00:00.000Z",
"updatedAt": "2026-10-30T12:00:00.000Z"
}
}