---
title: "Replace webhook subscriptions for an agent"
method: POST
path: "/agent/{agentId}/webhook-subscriptions"
tags: ["Webhooks"]
---

# Replace webhook subscriptions for an agent

`POST /agent/{agentId}/webhook-subscriptions`

**Replaces** all existing webhook subscriptions for the agent with the provided event types.
Any previously configured subscriptions for this agent are deleted before the new ones are created.
To add subscriptions without removing existing ones, retrieve current subscriptions first and include them in the request.

## Path parameters

- `agentId` string, required

## Request body

- object
  - `eventTypes` string[], required — Array of event types to subscribe to
  - `webhookId` string, required — The ID of the webhook to subscribe to

## Response `201`

Subscriptions created successfully

- object
  - `status` boolean
  - `data` string — Success message

## Other responses

- `400` — Invalid input
- `401` — Unauthorized access
- `403` — Forbidden access
- `404` — Agent not found
- `500` — Internal server error

---

[API](https://skmtc.net/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.net/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/revisions/c2d0eb64b01a/schema)
