Delete an access policy
Deletes an access policy of a Sign-In Context, with its email patterns.
DELETE /organizations/{organizationId}/contexts/sign-in/{contextId}/access-policies/{policyId}
Permission: Sign In › Access Policies (Write). See API permissions.
- The fallback policy stays. The fallback policy of the context,
the one with
"default": true, cannot be deleted and returns409with theerrorCodeSIGN_IN_FALLBACK_POLICY_NOT_DELETABLE. - Addresses move to the next match. The email addresses the policy governed are governed by the policies that match them next, and by the fallback policy when no other policy matches.
Request
Section titled “Request”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organizationId | Path | string | Yes | The Organization ID of the API key. Any other ID returns 404. |
contextId | Path | string | Yes | The ID of a Sign-In Context of the Organization. Any other ID returns 404. |
policyId | Path | string | Yes | The ID of the access policy. An unknown ID returns 404. |
Request example
curl -X DELETE "$API_BASE_URL/organizations/$ORGANIZATION_ID/contexts/sign-in/$CONTEXT_ID/access-policies/66f2a1c4e8b0a93d5c1e7f20" \ -H "Authorization: Bearer $NCP_API_TOKEN"Response
Section titled “Response”204 with no body.
Errors
Section titled “Errors”| Status | errorCode | When |
|---|---|---|
404 | RESOURCE_NOT_FOUND | The context has no access policy with this ID, organizationId is not the Organization of the API key, or contextId is not one of its Sign-In Contexts. |
409 | SIGN_IN_FALLBACK_POLICY_NOT_DELETABLE | The policy is the fallback policy of the context. |
{ "type": "about:blank", "title": "Conflict", "status": 409, "detail": "The context's fallback policy cannot be deleted.", "errorCode": "SIGN_IN_FALLBACK_POLICY_NOT_DELETABLE", "requestId": "0d4b7c29-5e61-4f3a-9a2e-7c18b6e0f453"}Errors common to all operations are in Errors.