---
title: "Create Access Policy"
method: POST
path: "/v2/access-policies"
tags: ["Access Policy API"]
---

# Create Access Policy

`POST /v2/access-policies`

Create a new access policy for a team.

## Request body

- SvflowPublicapiCreateAccessPolicyRequest
  - `teamId` string, required — The ID of the team.
  - `name` string, required — The name of the access policy.
  - `description` string — A description of the access policy.
  - `maxAccessMinutes` integer, nullable — The maximum number of minutes that access can be granted for (optional).
  - `requireBusinessJustification` boolean, nullable — Whether a business justification is required when requesting access (optional).
  - `recommendedAccessMinutes` integer, nullable — The recommended duration in minutes for access requests (optional).
  - `requireOnBehalfOfConfirmation` boolean, nullable — Whether requests made on behalf of others require the target user's confirmation (optional).

## Response `200`

Success

- SvflowPublicapiCreateAccessPolicyResponse
  - `data` SvflowPubapimodelsAccessPolicy
    - `id` string — The ID of the access policy.
    - `teamId` string — The ID of the team that the access policy belongs to.
    - `name` string — The name of the access policy.
    - `description` string, nullable — A description of the access policy.
    - `maxAccessMinutes` integer, nullable — The maximum number of minutes that access can be granted for.
    - `requireBusinessJustification` boolean, nullable — Whether a business justification is required when requesting access.
    - `recommendedAccessMinutes` integer, nullable — The recommended duration in minutes for access requests (optional).
    - `requireOnBehalfOfConfirmation` boolean, nullable — Whether requests made on behalf of others require the target user's confirmation.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/serval/apis/serval-public-api.md) · [All operations](https://skmtc.net/serval/apis/serval-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/serval/serval-public-api/versions/0549515e9384/schema)
