---
title: "Set the limits of one API key or connected AI app (dashboard session only)"
method: PUT
path: "/api/guardrails/{kind}/{id}"
---

# Set the limits of one API key or connected AI app (dashboard session only)

`PUT /api/guardrails/{kind}/{id}`

## Request

- Base URL: `https://postwire.io`
- URL: `https://postwire.io/api/guardrails/{kind}/{id}`
- Auth: HTTP bearer

kind = key (an API key) or app (a connected AI app, as listed by GET /api/connected-apps). monthly_cap counts each network a post is sent or queued to through it, per UTC month; a network that fails is given back. networks / brand_ids: what it may post to (null = all). require_approval: every post from it waits for approval, whatever the brand's rules. An empty body removes the limits. Paid plans.

## Path parameters

- `kind` 'key' | 'app', required
- `id` string, uuid, required

## Request body

- object
  - `monthly_cap` integer, nullable
  - `networks` string[], nullable
  - `brand_ids` string[], nullable
  - `require_approval` boolean

## Response `200`

{ ok, subject: key|app, id, guard }

## Other responses

- `403`: approval_requires_human or plan_feature
- `404`: not_found

---

[API](https://skmtc.dev/postwire/apis/postwire-api.md) · [All operations](https://skmtc.dev/postwire/apis/postwire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postwire/apis/postwire-api/revisions/513a409ab8f7?raw)
