---
title: "Delete a task"
method: DELETE
path: "/tasks-open-api/{taskId}"
tags: ["Tasks"]
---

# Delete a task

`DELETE /tasks-open-api/{taskId}`

## Path parameters

- `taskId` string, required

## Response `200`

Successful operation

- object
  - `_id` string — The unique identifier of the task.
  - `shortTaskId` unknown[] — A short task ID for quick reference.
    - unknown
  - `assigneeGroup` string[] — The team the assignees is part of. This is a tag
  - `type` string — Task types help you with better identification and reporting.
  - `checklistFinished` string[] — A list of finished action items that help define the task.
  - `checklist` string[] — A list of action items that help define the task.
  - `checklistAggregated` unknown[] — A list of action items.
    - unknown
  - `tags` string[] — List of tags the task is related to
  - `status` string — The status of the task, being one of the following enumerators: pending,confirmed, in progress,completed,canceled.
  - `comment` object — Notes added to the task by the assignee and supervisor. Contains the text, user ID and date the comment was published.
    - `_id` string — The unique identifier of the comment.
    - `text` string — The comment text.
    - `by` string — The unique identifier of the user who made the comment.
    - `date` string — The date and time the comment was posted.
  - `accountId` string — The ID of the account the task is attached to
  - `createdBy` string — The ID of the user who created the task.
  - `title` string — The name you call the task
  - `description` string — Add any additional information needed to define the task.
  - `priority` 'medium' | 'high' | 'low' — Assign the level of importance to the task in enumerators - High,Medium,Low
  - `assigneeId` string — The unique Guesty identifier of the person assigned to the task.
  - `supervisorId` string — The unique Guesty identifier of the person assigned to supervise the task.
  - `timezone` string
  - `afterEffects` object — Actions to be triggered upon the completion of the task.
    - `action` string — The action to be performed.
    - `_id` string — The unique identifier of the action.
    - `payload` object — The information or data to be included within the action.
      - `target` 'user' | 'contact' | 'guest' | 'supervisor' — The intended recipient.
      - `targetId` string — The unique identifier of the target.
      - `message` object — The message object.
        - `subject` string — States topic of the message.
        - `body` string — Contains the message string.
        - `attachments` object — Contains and describes an attached file.
          - `_id` string — Unique identifier of the attachment object.
          - `url` string — URL location of the attached file.
          - `title` string — Name of the file attachment.
          - `mimetype` string — State the kind of file attached.
          - `size` string — The storage size of the attachment.
          - `client` string
  - `attachments` object — The place to attach external files needed for the task.
    - `title` string — Title name of the attached file.
    - `url` string — URL location of the attached file.
    - `mimetype` string — State the kind of file attached.
    - `size` number — The storage size of the attachment.
    - `client` string — Add any additional information needed to define the task.
  - `timing` object
    - `type` 'none' | 'specific' | 'flexible' | 'legacy'
    - `startTime` string — The date and time the task must begin (fixed task). Each task scheduling should be set for fixed or flexible time. If “startTime” has value, leave “canStartFrom” and “mustFinishBefore” blank, and vice versa
    - `canStartAfter` string — The date and the time after which the task can begin (flexible task). Each task scheduling should be set for fixed or flexible time. If “startTime” has value, leave “canStartFrom” and “mustFinishBefore” blank, and vice versa
    - `mustFinishBefore` string — The date and time before which the task must be completed (flexible task). Each task scheduling should be set for fixed or flexible time. If “startTime” has value, leave “canStartFrom” and “mustFinishBefore” blank, and vice versa
  - `apply` object
    - `type` 'listing' | 'reservation' | 'owner-reservation'
    - `listingId` string — The object ID of the Guesty listing the task is attached to. Only when reservationId don't exist
    - `reservationId` string — The object ID of the Guesty reservation the task is attached to. Only when listingId don't exist
    - `ownerReservationId` string — The owner reservation ID of the listing the task is attached to. Only when owner reservation
  - `plannedDuration` number — The amount of time budgeted for the task (hours).
  - `pendingExpenses` object[] — The list of expenses that will be created upon task completion
    - `_id` string — Expense id
    - `name` string — Expense name
    - `description` string — Expense description
    - `shareSplit` number — Expense split coefficient
    - `shareType` 'percent' — Share split type will be always `percent`
    - `accounting` object — Not available for Pending expenses
      - `charges` number[]
    - `category` object — Expense category
    - `chargeable` object
      - `amount` number
    - `payTo` object
      - `id` string — Vendor id
    - `attachments` object
      - `url` string — Url for cdc where attachment is uploaded
      - `originalExtension` string — Attachment extension
      - `originalFilename` string — Attachment file name
      - `uploadedAt` string — Date of attachment uploading
      - `uploadedBy` string — User id who upload attachment
  - `postedExpenses` object[] — The list of recognized expenses
    - `_id` string — Expense id
    - `name` string — Expense name
    - `description` string — Expense description
    - `shareSplit` number — Expense split coefficient
    - `shareType` 'percent' — Share split type will be always `percent`
    - `accounting` object — Expense accounting data
      - `charges` number[]
      - `failureCode` number — Charge creation Error code
      - `requestId` string — Request id for debugging
    - `category` object — Expense category
    - `chargeable` object
      - `amount` number
    - `payTo` object
      - `id` string — Vendor id
    - `attachments` object
      - `url` string — Url for cdc where attachment is uploaded
      - `originalExtension` string — Attachment extension
      - `originalFilename` string — Attachment file name
      - `uploadedAt` string — Date of attachment uploading
      - `uploadedBy` string — User id who upload attachment

## Other responses

- `400` — Bad request
- `403` — Forbidden

---

[API](https://skmtc.net/guesty/apis/guesty-open-api.md) · [All operations](https://skmtc.net/guesty/apis/guesty-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/guesty/guesty-open-api/versions/7c62644070f2/schema)
