---
title: "Update a business calendar"
method: PUT
path: "/calendars/{name}"
tags: ["dags"]
---

# Update a business calendar

`PUT /calendars/{name}`

## Request

- Base URL: `http://localhost/api/v1`
- URL: `http://localhost/api/v1/calendars/{name}`
- Auth: one of:
  - HTTP bearer
  - HTTP basic
  - none

Replaces a calendar file's content. Content with problems is not saved; the problems are returned instead. Requires the write_dags permission and the developer role or above.

## Path parameters

- `name` string, required: Name of a business calendar: a built-in one, or the file <name>.yaml in paths.calendars_dir

## Query parameters

- `remoteNode` string

## Request body

- UpdateCalendarRequest
  - `spec` string, required: The calendar file's content

## Response `200`

The calendar was saved when errors is empty

- CalendarSaveResult: The outcome of saving a calendar. Nothing is saved when errors is not empty.
  - `errors` string[], required: Problems that kept the calendar from being saved, each starting with its [line:column] when it has one
  - `warnings` string[], required

## Other responses

- `400`: The calendar is built in
- `403`: Calendar writes are not permitted
- `404`: No calendar file has the name
- `default`: Unexpected error

## Changes

> 208 revisions in range; 1 not diffed.

- **2026-11-01** (v1) `d6b5f3398212`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/dagucloud/apis/dagu/changes/calendars/:name/put.md)

---

[API](https://skmtc.dev/dagucloud/apis/dagu.md) - [All operations](https://skmtc.dev/dagucloud/apis/dagu/llms.txt) - [OpenAPI document](https://skmtc.dev/dagucloud/apis/dagu/revisions/4f7617b01d17?raw)
