---
title: "Create Deletion Schedule"
method: POST
path: "/api/v2/deletion_schedules"
tags: ["Deletion Schedules"]
---

# Create Deletion Schedule

`POST /api/v2/deletion_schedules`

Creates a new deletion schedule.

#### Allowed For

* Admins

## Request body

- object
  - `deletion_schedule` DeletionSchedule
    - `active` boolean — Whether the deletion schedule is active
    - `conditions` ConditionsObject — An object that describes the conditions under which the automation will execute. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
      - `all` ConditionObject[] — Logical AND. Tickets must fulfill all of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
      - `any` ConditionObject[] — Logical OR. Tickets may satisfy any of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
    - `created_at` string, date-time — The time the deletion schedule was created
    - `default` boolean — Whether the deletion schedule is the default
    - `description` string — The description of the deletion schedule
    - `id` integer — The id of the deletion schedule
    - `title` string — The title of the deletion schedule
    - `updated_at` string, date-time — The time the deletion schedule was last updated
    - `url` string — Url for obtaining the deletion schedule JSON

## Response `201`

Success Response

- object
  - `deletion_schedule` DeletionSchedule
    - `active` boolean — Whether the deletion schedule is active
    - `conditions` ConditionsObject — An object that describes the conditions under which the automation will execute. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
      - `all` ConditionObject[] — Logical AND. Tickets must fulfill all of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
      - `any` ConditionObject[] — Logical OR. Tickets may satisfy any of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
    - `created_at` string, date-time — The time the deletion schedule was created
    - `default` boolean — Whether the deletion schedule is the default
    - `description` string — The description of the deletion schedule
    - `id` integer — The id of the deletion schedule
    - `title` string — The title of the deletion schedule
    - `updated_at` string, date-time — The time the deletion schedule was last updated
    - `url` string — Url for obtaining the deletion schedule JSON

---

[API](https://skmtc.dev/botbrains-io/apis/support-api.md) · [All operations](https://skmtc.dev/botbrains-io/apis/support-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/botbrains-io/support-api/revisions/d53eac07ba68/schema)
