Deletes the comment for the given comment ID

DELETE /api/sync/v1/todos/comments/{commentId}

Operation id: deleteComment

Description

This API deletes a comment specified by the commentId path parameter. The commentId can be obtained from the response of the "/comments/api/v1/todos/{recordId}" GET API.

These fields are mandatory:

  1. commentId
  2. active

delete comment action can be reverted/undo within 15 seconds after deleting. if active field's value is false comment will be deleted. if active field's value is true comment will become active again.

Permission Required:

  1. WCSTASK_TASK_DELETE_COMMENT OR should be creator of comment

Tags: Comment APIs

Parameters

Path parameters

NameTypeRequiredDescription
commentIdinteger (int32)Yes

Query parameters

NameTypeRequiredDescription
activebooleanYes

Security

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

Responses

200 — Comment List

Content type: application/json

400 — Bad Request

401 — Unauthorized Access

403 — Forbidden

422 — Unprocessable Entity

500 — Internal Server Error

Response models

200 — Comment List

Content type: application/json

Schema

PropertyTypeRequiredDescription
messagestringNo
statusstringNo
statusCodeinteger (int32)No
debugErrorMessagestringNo
messageCodestringNomessage codes
messageParamsarrayNo
idinteger (int32)No
activebooleanNo
{
  "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",
        "UNPROCESSABLE_ENTITY"
      ]
    },
    "statusCode": {
      "type": "integer",
      "format": "int32"
    },
    "debugErrorMessage": {
      "type": "string"
    },
    "messageCode": {
      "type": "string",
      "description": "message codes",
      "items": {
        "type": "string",
        "example": [
          "ERROR-401 user doesn't have authorized permission"
        ]
      }
    },
    "messageParams": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "id": {
      "type": "integer",
      "format": "int32"
    },
    "active": {
      "type": "boolean"
    }
  }
}