---
title: "Copy shifts (asynchronous)"
method: POST
path: "/management/v2/shifts:copy"
tags: ["Shifts"]
---

# Copy shifts (asynchronous)

`POST /management/v2/shifts:copy`

## Request

- Base URL: `https://your-subdomain.deputy.deputy.com/api`
- URL: `https://your-subdomain.deputy.deputy.com/api/management/v2/shifts:copy`
- Auth: API key in header `OAuth`

Copies shifts to new target dates. Supports two patterns: 1) Copy by date range and areas, 2) Copy specific shift IDs. This is an asynchronous API that returns immediately with a job ID in the response data.jobId field. Use the job ID to poll the /management/v2/shifts/copy/job/{jobId} endpoint to check completion status and retrieve results. The operation processes copying in the background.

## Request body

- CopyRequestCopyRequestData
  - `startDate` string: Start date of the shifts to copy. Format: YYYY-MM-DD (e.g., "2023-03-11"). Required for pattern 1.
  - `endDate` string: End date of the shifts to copy (inclusive). Format: YYYY-MM-DD (e.g., "2023-03-18"). Required for pattern 1.
  - `areas` integer[]: Array of area IDs to filter shifts for copying. If empty, all areas are included. Used for pattern 1.
  - `targetDates` string[]: Target dates to copy shifts to. Format: YYYY-MM-DD. Each date will receive copies of the source shifts. Mutually exclusive with dayOffsets.
  - `viewType` 'DAILY' | 'DAILY_EMP' | 'WEEKLY' | 'WEEKLY_EMPLOYEE' | 'FORTNIGHTLY' | 'FORTNIGHTLY_EMP' | 'MONTHLY_EMPLOYEE' | 'FOURWEEKLY_EMP' | 'MONTHLY'
  - `shiftIds` integer[]: Array of specific shift IDs to copy. Used for pattern 2. If provided, startDate, endDate, and areas are ignored.
  - `dayOffsets` integer[]: Day offsets for copying shifts. Each value is the number of days to offset from source shift dates. Mutually exclusive with targetDates. When provided, viewType is not required.

## Response `200`

A successful response.

- ScheduleShiftCopyResponse: Response after initiating copy operation. Asynchronous API - returns immediately with job ID.
  - `success` boolean: Indicates whether the copy request was accepted.
  - `data` CopyResponseCopyResponseData
    - `jobId` string: Job ID for tracking the copy operation. Use this to poll /management/v2/shifts/copy/job/{jobId} for status updates.
  - `metadata` ScheduleShiftCopyResponseMetadata
    - `operation` ScheduleShiftOperation: Operation tracking information for asynchronous APIs.
      - `operationId` string: Unique identifier for the operation. Use this to poll /operations/v2/operations/{id} for status updates.
      - `locks` OperationLock[]: Virtual Locks held by this operation that prevent conflicting operations.
        - `kind` string
        - `ids` object

---

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