---
title: "Replace the caller's own standing directives for an agent"
method: PUT
path: "/api/v1/agents/{id}/directives"
tags: ["Agents"]
---

# Replace the caller's own standing directives for an agent

`PUT /api/v1/agents/{id}/directives`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/agents/{id}/directives`
- Auth: API key in header `api-key`

Replaces the whole list -- send `[]` to clear it. These never ride a viewer-relative payload; only this agent's own webhook/socket deliveries (`agent_directives`, see docs/) and the caller's own GET /api/v1/agent_preferences ever see them.

## Path parameters

- `id` string, required

## Request body

- object
  - `directives` string[], required: At most 10 entries, each at most 200 characters after stripping; blanks and duplicates are dropped.
  - `paid_rules` object[]: Optional. The `{service}` entries to KEEP of the structured "don't ask again" rules (see GET /api/v1/agent_preferences); send `[]` to clear them all. Whatever you send, an entry whose line (`Use <Service> without asking`) is no longer in `directives` is dropped too.
    - `service` string

## Response `200`

OK.

- object
  - `agent_id` string
  - `nickname` string, nullable
  - `directives` string[]

## Other responses

- `401`: Missing or invalid credentials.
- `404`: Agent not found.
- `422`: Validation failure -- e.g. more than 10 entries, or one over 200 characters.

---

[API](https://skmtc.dev/saltapp/apis/salt-agent-api.md) · [All operations](https://skmtc.dev/saltapp/apis/salt-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/saltapp/apis/salt-agent-api/revisions/a8b8642ab7f8?raw)
