Ash
06/11/2026, 11:18 PM/schema/wrkr/${this.environment}/roles/${role}/permissions
ADD permissions API- POST /schema/wrkr/${this.environment}/roles/${role}/permissions (edited)Ask Inkeep
06/11/2026, 11:18 PMAsh
06/11/2026, 11:18 PMAsk Inkeep
06/11/2026, 11:18 PM/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/permissions (1)
The endpoint requires the following path parameters :
• `resource_id`: Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug")
• `role_id`: Either the unique id of the role, or the URL-friendly key of the role (i.e: the "slug")
• `proj_id`: Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug")
• `env_id`: Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug")
The body should contain the permissions to remove in this format :
{
"permissions": [
"document:share"
]
}
Note that if some of the permissions specified are already unassigned, the API will skip them .
To help our engineers investigate your specific issue, could you please provide:
1. Which Workspace / Project / Env you are using
2. What calls you are performing (as SDK code or CURL)
3. Which PDP version you are running
4. Relevant logs from your PDP
This information will help us identify what might be going wrong with your permission API calls.Ask Inkeep
06/11/2026, 11:18 PMNatalia Edelson
06/11/2026, 11:20 PMAsh
06/11/2026, 11:22 PM<https://api.permit.io/v2/redoc#tag/Roles/operation/remove_permissions_from_role>Ash
06/11/2026, 11:22 PM<https://api.permit.io/v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions>Ash
06/11/2026, 11:23 PMAsh
06/11/2026, 11:23 PMNatalia Edelson
06/11/2026, 11:24 PMAsk Inkeep
06/11/2026, 11:25 PMAsk Inkeep
06/11/2026, 11:25 PMDELETE /v2/schema/{proj_id}/{env_id}/roles/{role_id}/permissions
is the correct one for removing permissions from roles, where the resource key is specified in the request body.
Given that you're experiencing issues with the ADD permissions API failing after successfully removing permissions, especially when handling 75-100 permissions per role with minimal delay between calls, this could be related to:
1. *Rate limiting or throttling* on the API side
2. *Race conditions* when making rapid sequential calls
3. *Potential timing issues* with permission propagation
To help our engineers investigate this issue properly, could you please provide:
1. Which Workspace / Project / Env you are using
2. What calls you are performing (as SDK code or CURL) - including the exact body payloads
3. Which PDP version you are running
4. Relevant logs from your PDP
Additionally, could you share:
• The exact error message or response you're receiving from the ADD permissions API
• Whether this happens consistently or intermittently
• The approximate delay you're using between the REMOVE and ADD calls
This information will help the team identify what changed and resolve the issAsk Inkeep
06/11/2026, 11:25 PMAsh
06/11/2026, 11:29 PMwrkr, Env: stage/test/all
2. Simple await fetch() nodejs call
3. No error message, when checked for permissions on SaaS, no permissions "ticked"
4. Delay is 200 milliseconds between remove and addAsk Inkeep
06/11/2026, 11:29 PMAsk Inkeep
06/11/2026, 11:29 PMconst permit = new Permit({
token: "<your-api-key>",
pdp: "<http://localhost:7766>",
proxyFactsViaPdp: true
}) ;
With proxyFactsViaPdp enabled, API calls wait until data is fully synced to the PDP before returning, ensuring permission checks work immediately after .
*Important Notes:*
• This feature requires *PDP version 0.5.1 or above*
• It increases API latency but provides faster sync times compared to direct Permit API calls
• It works best when PDPs are deployed as Centralized PDPs or Sidecars to your application
*Alternative Approach:*
If you cannot use the above feature, consider increasing the delay between REMOVE and ADD operations to allow for propagation time, or implement a retry mechanism that verifies permissions were added before proceeding.
To help our engineers investigate further, please also provide:
1. Which PDP version you are running
2. Relevant logs from your PDP showing the timing of these operations
3. The exact fetch() code you're using for both the REMOVE and ADD callsAsk Inkeep
06/11/2026, 11:29 PMAsh
06/11/2026, 11:40 PMdavid
06/12/2026, 11:21 AMAsh
06/12/2026, 1:11 PMEli Moshkovich
06/12/2026, 2:53 PM