---
title: "Generate Agent Api Key"
method: POST
path: "/agents/{agent_id}:generate-api-key"
tags: ["Agents"]
---

# Generate Agent Api Key

`POST /agents/{agent_id}:generate-api-key`

Generate a new API key for an active agent. Rotates any existing key.

## Path parameters

- `agent_id` string, required

## Response `200`

Successful Response

- ApiKeyResponse — Response containing a plaintext API key (shown once).
  - `key` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/jentic/apis/jentic-control-plane-api.md) · [All operations](https://skmtc.net/jentic/apis/jentic-control-plane-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jentic/jentic-control-plane-api/versions/ff371f19960a/schema)
