---
title: "Update a pipeline schedule"
method: PUT
path: "/api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}"
tags: ["pipeline_schedules"]
---

# Update a pipeline schedule

`PUT /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}`
- Auth: none declared

Updates a pipeline schedule for a project. After the update is done, it is rescheduled automatically.

## Path parameters

- `id` string, required
- `pipeline_schedule_id` integer, required

## Request body

- PutApiV4ProjectsIdPipelineSchedulesPipelineScheduleId: Update a pipeline schedule
  - `description` string: The description of pipeline schedule
  - `ref` string: The branch/tag name will be triggered
  - `cron` string: The cron
  - `cron_timezone` string: The timezone
  - `active` boolean: The activation of pipeline schedule
  - `inputs` object[]: Inputs for the pipeline schedule
    - `name` string, required: The name of the input
    - `destroy` boolean: Whether to delete the input
    - `value` string, required: The value of the input

## Response `200`

Update a pipeline schedule

- APIEntitiesCiPipelineScheduleDetails: API_Entities_Ci_PipelineScheduleDetails model
  - `id` integer, required
  - `description` string, required
  - `ref` string, required
  - `cron` string, required
  - `cron_timezone` string, required
  - `next_run_at` string, date-time, required
  - `active` boolean, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `owner` APIEntitiesUserBasic, required: API_Entities_UserBasic model
    - `id` integer, required
    - `username` string, required
    - `public_email` string, required
    - `name` string, required
    - `state` string, required
    - `locked` boolean, required
    - `avatar_url` string, required
    - `avatar_path` string
    - `custom_attributes` APIEntitiesCustomAttribute[]
      - `key` string, required
      - `value` string, required
    - `web_url` string, required
  - `inputs` APIEntitiesCiInput
    - `name` string, required
    - `value` string, required
  - `last_pipeline` APIEntitiesCiPipelineBasic, required: API_Entities_Ci_PipelineBasic model
    - `id` integer, required
    - `iid` integer, required
    - `project_id` integer, required
    - `sha` string, required
    - `ref` string, required
    - `status` string, required
    - `source` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `web_url` string, required
  - `variables` APIEntitiesCiVariable: API_Entities_Ci_Variable model
    - `variable_type` string, required
    - `key` string, required
    - `value` string, required
    - `hidden` boolean
    - `protected` boolean
    - `masked` boolean
    - `raw` boolean
    - `environment_scope` string
    - `description` string

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found

---

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