---
title: "Update a Policy"
method: PATCH
path: "/v1/fleet/{fleet_name}/policies/{policy_name}"
tags: ["Fleets"]
---

# Update a Policy

`PATCH /v1/fleet/{fleet_name}/policies/{policy_name}`

## Request

- Base URL: `https://api.edgegap.com`
- URL: `https://api.edgegap.com/v1/fleet/{fleet_name}/policies/{policy_name}`
- Auth: API key in header `authorization`

Update a policy with new specifications.

## Path parameters

- `fleet_name` string, required
- `policy_name` string, required

## Request body

- FleetPoliciesPatchPayload
  - `name` string: Name of the Policy
  - `enabled` boolean: If the Policy is enabled. Defaults to true.
  - `type` 'Location' | 'Tag' | 'Coordinates': Type of the Policy. See our documentation for more information on the type and it's data.
  - `minimum` integer: Minimum deployments at all time
  - `maximum` integer: Maximum deployments for the provided type.
  - `threshold` number: Based on the number of sockets connected, how filled should a session deployment be before initiating a scale-up deployment. Float between 0.1 and 1.
  - `data` object: JSON object for your filters. See our documentation for more information.
  - `create_time` string: UTC time of policy creation
  - `last_updated` string: UTC time of policy last update

## Response `200`

Success

- FleetPoliciesPatchPayload
  - `name` string: Name of the Policy
  - `enabled` boolean: If the Policy is enabled. Defaults to true.
  - `type` 'Location' | 'Tag' | 'Coordinates': Type of the Policy. See our documentation for more information on the type and it's data.
  - `minimum` integer: Minimum deployments at all time
  - `maximum` integer: Maximum deployments for the provided type.
  - `threshold` number: Based on the number of sockets connected, how filled should a session deployment be before initiating a scale-up deployment. Float between 0.1 and 1.
  - `data` object: JSON object for your filters. See our documentation for more information.
  - `create_time` string: UTC time of policy creation
  - `last_updated` string: UTC time of policy last update

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/edgegap/apis/edgegap-v1.md) · [All operations](https://skmtc.dev/edgegap/apis/edgegap-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/edgegap/apis/edgegap-v1/revisions/9fa2b393a6be?raw)
