Skip to main content
POST
/
v2
/
access-policies
Create Access Policy
curl --request POST \
  --url https://public.api.serval.com/v2/access-policies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "teamId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "maxAccessMinutes": 123,
  "requireBusinessJustification": true,
  "recommendedAccessMinutes": 123
}'
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "maxAccessMinutes": 123,
    "requireBusinessJustification": true,
    "recommendedAccessMinutes": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
teamId
string

The ID of the team.

name
string

The name of the access policy.

description
string

A description of the access policy.

maxAccessMinutes
integer | null

The maximum number of minutes that access can be granted for (optional).

requireBusinessJustification
boolean | null

Whether a business justification is required when requesting access (optional).

The recommended duration in minutes for access requests (optional).

Response

Success

data
object

The created access policy.