# Add a webhook or schedule that messages an agent `POST /v1/agents/{agent}/triggers` **In this build:** Real. **Scope:** `platform.write` **CLI:** `harebox trigger new` ## Request: `CreateTriggerRequest` | Field | Type | Notes | |---|---|---| | `kind` (required) | `string` | One of: `webhook`, `schedule` | | `name` | `string` | | | `prompt` | `string` | | | `every_seconds` | `integer` | | ## Response: 201 `Trigger` | Field | Type | Notes | |---|---|---| | `id` (required) | `string` | | | `agent` (required) | `string` | | | `kind` (required) | `string` | One of: `webhook`, `schedule` | | `name` | `string` | | | `prompt` | `string` | Sent each time it fires; a webhook appends the request body. | | `every_seconds` | `integer or null` | | | `next_run_at` | `string or null` | | | `url` | `string or null` | A webhook's URL. Send its secret in X-HareBox-Token or ?token=. | | `secret` | `string` | A webhook's secret, shown once. | | `fires` | `integer` | | | `last_fired_at` | `string or null` | | | `last_error` | `string` | | | `created_at` | `string` | | Errors follow [one format](../errors.html).