Close a comment thread

PUT /task/v1/comments/close

Operation id: closeComment

Description

Closes a comment thread identified by msg_id via a two-phase service call. Phase 1 collects ETL messages and dispatches socket notifications. Phase 2 commits the DB update. Both phases are mandatory.

Pre-flight validation (before the service call):

  • msg_id must identify an existing message (E137 if not found).
  • The message must not already be closed (C) or force-closed (F) (E139).
  • The calling user must be the original creator of the message (E166).
  • If cluster_id is supplied as a real value (not -1/blank), it must match the message's cluster record (E117).
  • If feed_key is supplied as a real value (not -1/blank), it must match the message's feed record (E163).

Sentinel values (-1) for cluster_id is treated as absent and do not affect service routing — the close operation always uses msg_id.

time_zone and local_code are always resolved from the authenticated user session. Requires MSG_ACCESS line-of-sight authorization.

Tags: MyWorkComments

Security

  • ApiKeyHeader (apiKey)
    • APIGEE API key header validated by VerifyAPIKey policy.
  • AuthTokenHeader (apiKey)
    • Session authentication token validated server-side against the user session store.

Responses

200 — Success — {status: OK, message: "Comment closed successfully."}.

Also returned with status: ER for: E137 (msg_id not found).

Content type: application/json

400 — E120 — msg_id is mandatory (missing or blank) |

E136 — msg_id must be a valid integer (non-numeric or exceeds int range) | E139 — comment is already closed or force-closed | E166 — user is not allowed to close this comment (not the creator) | E117 — cluster_id does not match the message's cluster | E163 — feed_key does not match the message's feed

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/thread to close — mandatory integer (E120 if missing, E136 if non-numeric or out of range)
cluster_idstringNoOptional validation context. When provided as a real value (not -1), must match the cluster of the message identified by msg_id (E117). Sentinel value -1 is ignored.
feed_keystringNoOptional validation context. When provided as a real positive integer, must match the feed of the message identified by msg_id (E163).
statusstringNoNew comment status code (default: C — closed)
msg_date_timestringNoURL-encoded message datetime override
{
  "type": "object",
  "required": [
    "msg_id"
  ],
  "properties": {
    "msg_id": {
      "type": "string",
      "description": "ID of the message/thread to close — mandatory integer (E120 if missing, E136 if non-numeric or out of range)"
    },
    "cluster_id": {
      "type": "string",
      "description": "Optional validation context. When provided as a real value (not `-1`),\nmust match the cluster of the message identified by `msg_id` (E117).\nSentinel value `-1` is ignored.\n",
      "default": "-1"
    },
    "feed_key": {
      "type": "string",
      "description": "Optional validation context. When provided as a real positive integer,\nmust match the feed of the message identified by `msg_id` (E163).\n",
      "default": "-1"
    },
    "status": {
      "type": "string",
      "description": "New comment status code (default: C — closed)"
    },
    "msg_date_time": {
      "type": "string",
      "description": "URL-encoded message datetime override"
    }
  }
}

Response models

200 — Success — {status: OK, message: "Comment closed successfully."}.

Also returned with status: ER for: E137 (msg_id not found).

Content type: application/json

Schema

JSON object (structure varies by endpoint).

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

400 — E120 — msg_id is mandatory (missing or blank) |

E136 — msg_id must be a valid integer (non-numeric or exceeds int range) | E139 — comment is already closed or force-closed | E166 — user is not allowed to close this comment (not the creator) | E117 — cluster_id does not match the message's cluster | E163 — feed_key does not match the message's feed

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"
}