---
title: "Set schedule notification target"
method: PUT
path: "/v1/schedules/{schedule_id}/notifications/{channel}"
tags: ["Schedules"]
---

# Set schedule notification target

`PUT /v1/schedules/{schedule_id}/notifications/{channel}`

## Request

- Base URL: `https://api.sandbase.ai`
- URL: `https://api.sandbase.ai/v1/schedules/{schedule_id}/notifications/{channel}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Save a Feishu or Lark bot webhook. Archived definitions return 409.

## Request body

- NotificationTargetRequest
  - `webhook_url` string, required: https://open.feishu.cn/open-apis/bot/v2/hook/<token> or https://open.larksuite.com/open-apis/bot/v2/hook/<token>. Write-only.

## Response `200`

Targets

- NotificationTargetList
  - `data` NotificationTarget[], required
    - `channel` 'feishu', required
    - `version` integer, required
    - `updated_at` string, date-time, required

## Other responses

- `400`: invalid_request (malformed JSON, unknown fields, failed validation, or an unsupported option)
- `401`: unauthorized: missing, malformed, or conflicting API key headers
- `402`: spending_limit_exceeded: API key spending limit or organization balance exhausted
- `403`: insufficient_scope (scoped key) or org_disabled
- `404`: not_found: the resource does not exist in this organization
- `409`: conflict: stale row_version, lifecycle state, or Idempotency-Key reused with a different body
- `503`: authorization_unavailable, admission_unavailable, executor_unavailable, storage_unavailable, or internal_error

---

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