---
title: "Add Subtask to Request"
method: POST
path: "/api/datasubject/v2/requestqueues/{requestQueueRefId}/subtasks"
tags: ["Subtasks"]
---

# Add Subtask to Request

`POST /api/datasubject/v2/requestqueues/{requestQueueRefId}/subtasks`

## Request

- Base URL: `https://hostname`
- URL: `https://hostname/api/datasubject/v2/requestqueues/{requestQueueRefId}/subtasks`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `DSAR`, `DSAR_WRITE`

Use this API to add a subtask to a request.

## Path parameters

- `requestQueueRefId` string, required: Request queue reference Id

## Request body

- PrivacyAutomationDataSubjectRequestDSRAutomationSubTaskCreateV2Dto
  - `userEmail` string, email: Email of the user associated with the subtask
  - `description` string, required: Description of the subtask
  - `deadline` string, date-time: Deadline for the subtask
  - `reminder` string, date-time: Reminder date for the subtask
  - `required` boolean: Whether the subtask is required
  - `assignedTogroup` boolean: Whether the subtask is assigned to a group
  - `groupName` string: Name of the group if assigned to a group
  - `workflowDetailId` string, uuid: Workflow detail ID
  - `type` 'MANUAL' | 'SYSTEM_TASK': Type of the subtask (MANUAL or SYSTEM_TASK)
  - `integrationSystemId` string, uuid: Integration system ID
  - `integrationWorkflowId` string, uuid: Integration workflow ID
  - `commentRequired` boolean: Whether a comment is required when completing the subtask
  - `resolutionRequired` boolean: Whether a resolution is required when completing the subtask
  - `taskName` string, required: Name of the task
  - `manualRun` boolean

## Response `201`

Created

- PrivacyAutomationDataSubjectRequestDSRAutomationSubTaskV2Dto
  - `subTaskId` string, uuid: The subtask unique ID
  - `requestQueueRefId` string: The request reference ID
  - `taskName` string: Name of the task
  - `status` 'OPEN' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'READY_FOR_REVIEW' | 'PROCESSING' | 'NOT_RUN': Current status of the subtask
  - `type` 'USER_TASK' | 'SYSTEM_TASK': Type of the subtask
  - `deadline` string, date-time: Deadline for the subtask
  - `reminder` string, date-time: Reminder date for the subtask
  - `assignee` string: Person assigned to the subtask
  - `workflowDetailId` string, uuid: Workflow detail ID
  - `workflowStatus` integer: Workflow status code
  - `description` string: Description of the subtask
  - `required` boolean: Whether the subtask is required
  - `integrationSystemId` string, uuid: Integration system ID
  - `integrationWorkflowId` string, uuid: Integration workflow ID
  - `manualRun` boolean
  - `commentRequired` boolean
  - `resolutionRequired` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500`: Internal Server Error

---

[API](https://skmtc.dev/onetrust/apis/privacy-automation-data-subject-request-dsr-automation.md) - [All operations](https://skmtc.dev/onetrust/apis/privacy-automation-data-subject-request-dsr-automation/llms.txt) - [OpenAPI document](https://skmtc.dev/onetrust/apis/privacy-automation-data-subject-request-dsr-automation/revisions/612f0b39b904?raw)
