PATCHpartial

Close an authorized procedural message thread

Flag-gated account operation over the existing hosted authorization boundary. Requires the approving account’s current party access. OAuth never grants administrator or reviewer authority.

/api/cases/{id}/messagescloseAccountCaseMessage

Authentication and authority

Use one listed account-session, scoped OAuth, or partner credential alternative. Account tokens retain the approving account’s authority. Cookie-authenticated writes require same-origin authorization. Alternatives are OR; schemes in one alternative are AND.

CanonicalSession

AccountOAuth

Account tokens authorize only their approving account and case scope. S256 PKCE is mandatory on the code flow. Explicit reacceptance is required after Rules/disclosure changes.

Parameters

NameLocationRequirementSchema
idpathRequired{"type":"string"}
channel

Partner bearer calls must select partner_notice. Account/session clients use hosted_thread; omission preserves existing account clients.

queryOptional{"type":"string","enum":["hosted_thread","partner_notice"]}

Request body

Required request body.

application/json

{
  "type": "object",
  "properties": {
    "threadId": {
      "type": "string"
    }
  },
  "required": [
    "threadId"
  ]
}

Responses

200

Authorized result.

application/json

{
  "type": "object",
  "properties": {
    "ok": {
      "const": true
    },
    "data": {
      "$ref": "#/components/schemas/CanonicalHostedThreadResult",
      "type": "object",
      "properties": {
        "thread": {
          "$ref": "#/components/schemas/CanonicalHostedThread",
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "category": {
              "type": "string"
            },
            "visibility": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "createdAt": {
              "type": "string"
            },
            "updatedAt": {
              "type": "string"
            },
            "closedAt": {
              "type": "string"
            },
            "canReply": {
              "type": "boolean"
            },
            "proceduralRequest": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "requestedRelief": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "responseDueAt": {
                  "type": "string"
                },
                "canRule": {
                  "type": "boolean"
                }
              }
            },
            "messages": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/CanonicalHostedMessage",
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sender": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "claimant",
                          "respondent"
                        ]
                      },
                      "onBehalfOfParty": {
                        "type": "string",
                        "enum": [
                          "claimant",
                          "respondent"
                        ]
                      },
                      "representative": {
                        "type": "object",
                        "properties": {
                          "displayName": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "displayName"
                        ]
                      }
                    },
                    "required": [
                      "label",
                      "role"
                    ]
                  },
                  "body": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "sender",
                  "body",
                  "createdAt"
                ]
              }
            }
          },
          "required": [
            "id",
            "category",
            "visibility",
            "status",
            "createdAt",
            "updatedAt",
            "canReply",
            "messages"
          ]
        }
      },
      "required": [
        "thread"
      ]
    }
  }
}

Example response

Successful response

{}

Errors

Read the response status and stable error code. See errors and rate limits for recovery. Refresh the resource before resolving a state or digest conflict.

Idempotency and retries

  • For throttling, honor Retry-After when present. Back off on retryable server failures.
  • The request is accepted only when its credential, authority, case state, and resource preconditions are satisfied.