Create Access Policy
Create a new access policy for a team. Set approval_procedure_id to the ID of a named approval procedure to require its approval for requests for roles governed by the policy; the policy is created only if the procedure can be attached. Without it, the policy has no approval procedure, and those requests proceed without approval until you attach one with Update Access Policy or the Access Policy Approval Procedure API.
Authentication and permissions
Token requirements: User-based token (OAuth) or Organization-scoped API key or Team-scoped API key. Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.
- Attach an approval procedure: With a non-empty approval_procedure_id, the procedure must be a named approval procedure in the requested team.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The ID of the team.
The name of the access policy.
A description of the access policy.
The maximum number of minutes that access can be granted for (optional).
Whether a business justification is required when requesting access (optional).
The recommended duration in minutes for access requests (optional).
Whether requests made on behalf of others require the target user's confirmation (optional).
Stable, team-scoped identity for the policy (apo_ + 22 base62 chars). Omit to have one minted. Must be unique within the team; reserved sentinel values (the team-default policy) are rejected.
The ID of a named approval procedure that must approve requests for roles governed by the policy. Omit it, or send an empty string, to create the policy without approval. Attaching requires permission to view approval procedures.
Response
Success
The created access policy.

