---
title: "Apply a tenant policy template to an agent"
method: POST
path: "/tenants/{id}/config/templates/{name}/apply"
tags: ["Tenant Config"]
---

# Apply a tenant policy template to an agent

`POST /tenants/{id}/config/templates/{name}/apply`

## Request

- Base URL: `http://localhost:3200`
- URL: `http://localhost:3200/tenants/{id}/config/templates/{name}/apply`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/steward-fi/apis/steward-api/docs/tenants/:id/config/templates/:name/apply/post.ts> (a function with typed inputs; its response is checked against the schema)

Requires an owner/admin browser session with recent MFA. Tenant API keys and agent tokens cannot mutate tenant security configuration. Applies a validated policy template to an agent, with optional per-field overrides restricted to template customizable fields.

## Headers

- `X-Steward-Request-Timestamp` string
- `X-Steward-Request-Expires-At` string
- `X-Steward-Signature` string
- `X-Steward-Signing-Key-Id` string
- `Idempotency-Key` string

## Request body

- object
  - `agentId` string, required
  - `overrides` object

## Response `200`

JSON response

- object
  - `ok` true, required
  - `data` object, required
    - `templateId` string, required
    - `templateName` string, required
    - `agentId` string, required
    - `policiesApplied` integer, required
    - `policies` object[], required

## Other responses

- `400`: JSON response
- `401`: JSON response
- `403`: JSON response
- `404`: JSON response
- `408`: JSON response
- `409`: JSON response

## Changes

- **2026-08-17** `261a7c8070b2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/steward-fi/apis/steward-api/changes/tenants/:id/config/templates/:name/apply/post.md)

---

[API](https://skmtc.dev/steward-fi/apis/steward-api.md) - [All operations](https://skmtc.dev/steward-fi/apis/steward-api/llms.txt) - [OpenAPI document](https://skmtc.dev/steward-fi/apis/steward-api/revisions/b88b4b97a664?raw)
