---
title: "Add project(s) and/or environment(s) to the Agent Allow list"
method: PATCH
path: "/v1/agents/{agentId}/allowlist"
tags: ["Agents"]
---

# Add project(s) and/or environment(s) to the Agent Allow list

`PATCH /v1/agents/{agentId}/allowlist`

A request to add project(s) and/or environment(s)to the Agent Allow list.

NOTE: Whilst the Agent property `restrictedAccess` is set to false, any amendments to will not be enforced until `restrictedAccess` is set to true.

## Path parameters

- `agentId` string, required

## Request body

- UpdateAgentAccessRequest
  - `projects` object, required — The list of projects and associated environments to be added to the list the Agent is allowed to be scoped to. Each project should be provided as an object with the Project ID. The list of projects cannot be left empty.

## Response `202`

Project and/or environment successfully added to the Agent Allow list

## Other responses

- `400` — Wrong request parameters used
- `403` — Forbidden
- `404` — Agent not found
- `500` — Unexpected error occurred

---

[API](https://skmtc.net/maia/apis/maia-public-rest-api.md) · [All operations](https://skmtc.net/maia/apis/maia-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maia/maia-public-rest-api/revisions/6239825f68eb/schema)
