Delete a draft To-Do

DELETE /api/sync/v1/todos/{todoId}

Operation id: deleteTodo

Description

This API deletes a to-do created using CREATE API when in DRAFT state. The API takes in undo parameter which is optional and by default is false. If the deletion for the DRAFT to-do needs to be reverted, use the API with the to-do ID and undo value true, to make the DRAFT to-do active again.

Permissions Required:

  1. Creator of the draft to-do

Tags: To-Do APIs

Parameters

Path parameters

NameTypeRequiredDescription
todoIdinteger (int32)Yes

Query parameters

NameTypeRequiredDescription
undobooleanNowhether to make deleted To-Do active

Security

  • Bearer (http / bearer)
    • enter the client service token value.

Responses

200 — Draft To-Do deleted successfully

Content type: application/json

400 — Bad request

404 — To-Do not found

500 — Internal server error

Response models

200 — Draft To-Do deleted successfully

Content type: application/json

Schema

PropertyTypeRequiredDescription
messagestringNo
statusstringNo
statusCodeinteger (int32)No
debugErrorMessagestringNo
messageCodestringNo
messageParamsarrayNo
taskIdinteger (int32)No
undobooleanNo
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "SUCCESS",
        "FAIL",
        "BAD_REQUEST",
        "NO_CONTENT",
        "UNAUTHORIZED",
        "FORBIDDEN",
        "NOT_FOUND",
        "INTERNAL_SERVER_ERROR",
        "UNSUPPORTED_MEDIA_TYPE"
      ]
    },
    "statusCode": {
      "type": "integer",
      "format": "int32"
    },
    "debugErrorMessage": {
      "type": "string"
    },
    "messageCode": {
      "type": "string"
    },
    "messageParams": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "taskId": {
      "type": "integer",
      "format": "int32"
    },
    "undo": {
      "type": "boolean"
    }
  }
}