Update read/unread status for a single message

PUT /task/v1/comments/unread/count

Operation id: updateMessageStatus

Description

Updates the read/unread status of a single message. When msg_parent_id=0 (top-level), cascades the update to all child messages.

time_zone and local_code are always resolved from the authenticated user session. logged_unit_id is always resolved from the authenticated user session.

userId is always from session (prevents identity spoofing). Blank msg_status → defaults to R (read) inside the service. msg_id existence is verified before update; msg_parent_id (if non-zero) must match the stored parent. Requires MSG_ACCESS line-of-sight authorization.

Tags: MyWorkComments

Security

  • AuthTokenHeader (apiKey)
    • Session authentication token validated server-side against the user session store.

Responses

200 — Success — {status: OK, message: "Status updated successfully."}.

Also returned with status: ER for: E137 (msg_id not found), E335 (message already in requested status).

Content type: application/json

400 — E120 msg_id missing/blank | E136 msg_id non-numeric or out of range | E133 msg_parent_id non-numeric | E134 invalid msg_status | E135 msg_parent_id mismatch

Content type: application/json

401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)

Content type: application/json

500 — Unexpected server-side error

Content type: application/json

Request body

Required: Yes

application/x-www-form-urlencoded

Schema

PropertyTypeRequiredDescription
msg_idstringYesID of the message to update — mandatory integer (E120 if missing, E136 if non-numeric or out of range)
msg_parent_idstringNoParent message ID; 0 = cascade to all children (default 0). Must be a valid integer (E133); if non-zero, must match the stored parent (E135).
msg_statusstringNoNew status: N=unread, R=read. Blank defaults to R. (E134 if any other value)
{
  "type": "object",
  "required": [
    "msg_id"
  ],
  "properties": {
    "msg_id": {
      "type": "string",
      "description": "ID of the message to update — mandatory integer (E120 if missing, E136 if non-numeric or out of range)"
    },
    "msg_parent_id": {
      "type": "string",
      "description": "Parent message ID; 0 = cascade to all children (default 0). Must be a valid integer (E133); if non-zero, must match the stored parent (E135)."
    },
    "msg_status": {
      "type": "string",
      "description": "New status: N=unread, R=read. Blank defaults to R. (E134 if any other value)",
      "enum": [
        "N",
        "R"
      ]
    }
  }
}

Response models

200 — Success — {status: OK, message: "Status updated successfully."}.

Also returned with status: ER for: E137 (msg_id not found), E335 (message already in requested status).

Content type: application/json

Schema

JSON object (structure varies by endpoint).

{
  "type": "object",
  "description": "JSON object (structure varies by endpoint)."
}

400 — E120 msg_id missing/blank | E136 msg_id non-numeric or out of range | E133 msg_parent_id non-numeric | E134 invalid msg_status | E135 msg_parent_id mismatch

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "errorCode": "E204",
    "response": "Invalid or expired token"
  },
  "required": [
    "status",
    "errorCode",
    "response"
  ],
  "properties": {
    "status": {
      "type": "string",
      "description": "Always \"ER\" for error responses",
      "enum": [
        "ER"
      ]
    },
    "errorCode": {
      "type": "string",
      "description": "Application-level error code (e.g. E204, E112, E302)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "errorCode": "E204",
    "response": "Invalid or expired token"
  },
  "required": [
    "status",
    "errorCode",
    "response"
  ],
  "properties": {
    "status": {
      "type": "string",
      "description": "Always \"ER\" for error responses",
      "enum": [
        "ER"
      ]
    },
    "errorCode": {
      "type": "string",
      "description": "Application-level error code (e.g. E204, E112, E302)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

Example:

{
  "status": "ER",
  "errorCode": "E204",
  "response": "Invalid or expired token"
}

500 — Unexpected server-side error

Content type: application/json

Schema

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-readable error message
{
  "type": "object",
  "example": {
    "status": "ER",
    "errorCode": "E204",
    "response": "Invalid or expired token"
  },
  "required": [
    "status",
    "errorCode",
    "response"
  ],
  "properties": {
    "status": {
      "type": "string",
      "description": "Always \"ER\" for error responses",
      "enum": [
        "ER"
      ]
    },
    "errorCode": {
      "type": "string",
      "description": "Application-level error code (e.g. E204, E112, E302)"
    },
    "response": {
      "type": "string",
      "description": "Human-readable error message"
    }
  }
}

Example:

{
  "status": "ER",
  "errorCode": "E302",
  "response": "Internal server error"
}