---
title: "Replace admin team-agent key scope"
method: POST
path: "/v1/admin/team/agents/{agent_id}/scope"
tags: ["Operations"]
---

# Replace admin team-agent key scope

`POST /v1/admin/team/agents/{agent_id}/scope`

## Request

- Base URL: `https://loppee.com`
- URL: `https://loppee.com/v1/admin/team/agents/{agent_id}/scope`
- Auth: HTTP bearer

Replace admin team-agent key scope. The response is scoped and validated by the runtime repository; unknown or unauthorized resources use the canonical error envelope.

## Path parameters

- `agent_id` string, required

## Request body

- object
  - `expected_key_id` string, required
  - `expected_allowed_actions` string[], required
  - `allowed_actions` string[], required
  - `reason` string, required
  - `confirm` boolean, required

## Response `200`

Replace admin team-agent key scope response

- object: Atomically replaced the exact team-agent key scope and wrote an audit receipt.

## Other responses

- `400`: ErrorResponse
- `401`: ErrorResponse
- `403`: ErrorResponse
- `404`: ErrorResponse
- `409`: ErrorResponse
- `413`: ErrorResponse
- `429`: RateLimitError
- `default`: ErrorResponse

---

[API](https://skmtc.dev/loppee/apis/loppee-business-registry-api-for-external-agents.md) · [All operations](https://skmtc.dev/loppee/apis/loppee-business-registry-api-for-external-agents/llms.txt) · [OpenAPI document](https://skmtc.dev/loppee/apis/loppee-business-registry-api-for-external-agents/revisions/37285f7cddcd?raw)
