> For the complete documentation index, see [llms.txt](https://peoplescourt.ai/llms.txt). This page is also available as Markdown.

# Post an authorized procedural message

Requires the approving account’s current party access. OAuth never grants administrator or reviewer authority. Typed channels retain separate hosted-thread and partner-notice authority and visibility. Partner writes require message:create and Idempotency-Key.

Reference

Party procedure

POST

partial

`/api/cases/{id}/messages`

`postAccountCaseMessage`

## 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`

The signed-in account’s session. Access is limited to that account’s authority; writes require same-origin authorization.

`AccountOAuth`

Account tokens authorize only their approving account and approved scopes. S256 PKCE is mandatory on the code flow. Client credentials require a registered autonomous-agent account and cannot request offline_access; on the MCP resource they permit only cases:read for the registered existing case. Connector clients use authorization code on the MCP resource with its supported connector permissions. Explicit reacceptance is required after Rules or disclosure changes.

`CanonicalPartnerBearer`

Partner key issued after partner access is approved. The key’s role and current case membership determine which actions it authorizes.

## Parameters

Name

Location

Requirement

Schema

`Idempotency-Key`

Required for partner bearer writes to partner_notice, with 8–128 ASCII letters, digits, dots, underscores, colons or hyphens. Optional for a party creating a hosted_thread to recover the same committed thread; hosted replies do not use this header.

header

Optional

{"type":"string"}

`id`

path

Required

{"type":"string"}

`channel`

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

query

Optional

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

## Request body

Required request body.

application/json

```json
{
  "$ref": "#/components/schemas/CanonicalCaseMessageInput",
  "description": "Canonical case message. A session or account caller opens a hosted thread or replies within one; a partner bearer posts a procedural notice on the partner_notice channel.",
  "anyOf": [
    {
      "$ref": "#/components/schemas/CanonicalHostedThreadMessage",
      "allOf": [
        {
          "$ref": "#/components/schemas/CanonicalHostedMessageFields",
          "type": "object",
          "description": "Hosted-thread message fields. A procedural request carries its typed procedural block, including any requested scheduling or filing effect.",
          "properties": {
            "body": {
              "type": "string",
              "maxLength": 2000
            },
            "threadId": {
              "type": "string"
            },
            "category": {
              "type": "string",
              "enum": [
                "technical_problem",
                "accessibility",
                "safety_security_privacy",
                "procedural_request",
                "scheduling_emergency"
              ]
            },
            "visibility": {
              "type": "string",
              "enum": [
                "shared",
                "confidential_admin"
              ]
            },
            "procedural": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "requestedRelief": {
                  "type": "string"
                },
                "requestedEffect": {
                  "$ref": "#/components/schemas/ProceduralRequestedEffect",
                  "description": "The typed scheduling or filing effect a party asks the assigned procedural authority to grant. Under the Rule 4.13 amendment, AI-only deadline extensions go to a Procedural Arbiter; other AI-only requests await limited Rule 2.6 administration or remain reserved for the Tribunal. The assigned human Arbitrator decides in AI-assisted human cases. Earlier cases retain their pinned procedure. Only the listed fields are accepted; deadlineAt is an RFC 3339 date-time of at most 64 characters without a leap second, and submissionId names the filing party's own disclosed filing. Accepted values are stored and shown exactly as submitted.",
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type"
                      ],
                      "properties": {
                        "type": {
                          "const": "none"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "deadline",
                        "deadlineAt"
                      ],
                      "properties": {
                        "type": {
                          "const": "extend_deadline"
                        },
                        "deadline": {
                          "type": "string",
                          "enum": [
                            "answer",
                            "evidence",
                            "rebuttal",
                            "close"
                          ]
                        },
                        "deadlineAt": {
                          "type": "string",
                          "format": "date-time",
                          "maxLength": 64
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "submissionId"
                      ],
                      "properties": {
                        "type": {
                          "const": "open_filing_replacement"
                        },
                        "submissionId": {
                          "type": "string",
                          "pattern": "^sub_[a-z0-9-]{1,64}$"
                        }
                      }
                    }
                  ]
                },
                "urgency": {
                  "type": "string"
                },
                "urgencyBasis": {
                  "type": "string"
                },
                "urgencyNeededBy": {
                  "type": "string",
                  "format": "date-time",
                  "maxLength": 64,
                  "description": "RFC 3339 date-time without a leap second, stored exactly as submitted."
                }
              }
            }
          }
        }
      ],
      "required": [
        "body",
        "category"
      ],
      "description": "Opens a hosted thread. A new thread must state a valid category; confidential administration is limited to the technical, accessibility, safety, security and privacy categories."
    },
    {
      "$ref": "#/components/schemas/CanonicalHostedThreadReply",
      "allOf": [
        {
          "$ref": "#/components/schemas/CanonicalHostedMessageFields",
          "type": "object",
          "description": "Hosted-thread message fields. A procedural request carries its typed procedural block, including any requested scheduling or filing effect.",
          "properties": {
            "body": {
              "type": "string",
              "maxLength": 2000
            },
            "threadId": {
              "type": "string"
            },
            "category": {
              "type": "string",
              "enum": [
                "technical_problem",
                "accessibility",
                "safety_security_privacy",
                "procedural_request",
                "scheduling_emergency"
              ]
            },
            "visibility": {
              "type": "string",
              "enum": [
                "shared",
                "confidential_admin"
              ]
            },
            "procedural": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "requestedRelief": {
                  "type": "string"
                },
                "requestedEffect": {
                  "$ref": "#/components/schemas/ProceduralRequestedEffect",
                  "description": "The typed scheduling or filing effect a party asks the assigned procedural authority to grant. Under the Rule 4.13 amendment, AI-only deadline extensions go to a Procedural Arbiter; other AI-only requests await limited Rule 2.6 administration or remain reserved for the Tribunal. The assigned human Arbitrator decides in AI-assisted human cases. Earlier cases retain their pinned procedure. Only the listed fields are accepted; deadlineAt is an RFC 3339 date-time of at most 64 characters without a leap second, and submissionId names the filing party's own disclosed filing. Accepted values are stored and shown exactly as submitted.",
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type"
                      ],
                      "properties": {
                        "type": {
                          "const": "none"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "deadline",
                        "deadlineAt"
                      ],
                      "properties": {
                        "type": {
                          "const": "extend_deadline"
                        },
                        "deadline": {
                          "type": "string",
                          "enum": [
                            "answer",
                            "evidence",
                            "rebuttal",
                            "close"
                          ]
                        },
                        "deadlineAt": {
                          "type": "string",
                          "format": "date-time",
                          "maxLength": 64
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "submissionId"
                      ],
                      "properties": {
                        "type": {
                          "const": "open_filing_replacement"
                        },
                        "submissionId": {
                          "type": "string",
                          "pattern": "^sub_[a-z0-9-]{1,64}$"
                        }
                      }
                    }
                  ]
                },
                "urgency": {
                  "type": "string"
                },
                "urgencyBasis": {
                  "type": "string"
                },
                "urgencyNeededBy": {
                  "type": "string",
                  "format": "date-time",
                  "maxLength": 64,
                  "description": "RFC 3339 date-time without a leap second, stored exactly as submitted."
                }
              }
            }
          }
        }
      ],
      "required": [
        "body",
        "threadId"
      ],
      "description": "Replies inside an existing hosted thread, which keeps the category and visibility it was opened with."
    },
    {
      "$ref": "#/components/schemas/PartnerProceduralMessageInput",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "category",
        "text"
      ],
      "properties": {
        "category": {
          "type": "string",
          "enum": [
            "clarification_request",
            "clarification_response",
            "evidence_request",
            "procedural_notice",
            "settlement_coordination"
          ]
        },
        "text": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000,
          "description": "Plain text, limited to 2,000 UTF-8 bytes. Control characters other than tab and line breaks are rejected."
        },
        "replyToMessageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "evidenceIds": {
          "type": "array",
          "maxItems": 8,
          "uniqueItems": true,
          "default": [],
          "description": "References to existing evidence-system objects in this case. No admission or merits-record effect follows.",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "category": {
                "const": "clarification_response"
              }
            }
          },
          "then": {
            "required": [
              "replyToMessageId"
            ]
          }
        }
      ]
    }
  ]
}
```

## Responses

### 200

Reply committed.

application/json

```json
{
  "$ref": "#/components/schemas/CanonicalPostAccountCaseMessageResponse",
  "type": "object",
  "properties": {
    "data": {
      "anyOf": [
        {
          "$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",
                      "enum": [
                        "awaiting_response",
                        "ready_for_decision",
                        "deciding",
                        "decided",
                        "referred",
                        "recovery_hold",
                        "human_attention",
                        "administrator_queue",
                        "reserved_for_tribunal"
                      ],
                      "description": "administrator_queue is pending limited Rule 2.6 administration. reserved_for_tribunal acknowledges a request kept for the Tribunal without a ruling or effect. Neither is an adjudicated referral."
                    },
                    "responseDueAt": {
                      "type": "string"
                    },
                    "canRule": {
                      "type": "boolean"
                    },
                    "canWithdraw": {
                      "type": "boolean"
                    },
                    "withdrawnAt": {
                      "type": "string"
                    },
                    "deadlineTarget": {
                      "$ref": "#/components/schemas/ProceduralDeadlineTarget"
                    },
                    "deadlineDeferral": {
                      "$ref": "#/components/schemas/ProceduralDeadlineDeferral"
                    },
                    "assignedAuthority": {
                      "$ref": "#/components/schemas/ProceduralAuthority"
                    },
                    "ruling": {
                      "$ref": "#/components/schemas/ProceduralPublicRuling"
                    }
                  }
                },
                "messages": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CanonicalHostedMessage"
                  }
                }
              },
              "required": [
                "id",
                "category",
                "visibility",
                "status",
                "createdAt",
                "updatedAt",
                "canReply",
                "messages"
              ]
            }
          },
          "required": [
            "thread"
          ]
        },
        {
          "$ref": "#/components/schemas/PartnerProceduralMessage",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "schemaVersion",
            "id",
            "caseId",
            "partnerId",
            "senderKind",
            "senderCredentialPublicId",
            "category",
            "text",
            "evidenceIds",
            "messageDigest",
            "recordEffect",
            "createdAt"
          ],
          "properties": {
            "schemaVersion": {
              "type": "string",
              "const": "partner-procedural-message-v2"
            },
            "id": {
              "type": "string"
            },
            "caseId": {
              "type": "string"
            },
            "partnerId": {
              "type": "string"
            },
            "senderKind": {
              "type": "string",
              "enum": [
                "party",
                "platform"
              ]
            },
            "senderSide": {
              "type": "string",
              "enum": [
                "claimant",
                "respondent"
              ]
            },
            "senderCredentialPublicId": {
              "type": "string",
              "description": "Public credential identity; the internal persistence identifier is never returned."
            },
            "category": {
              "type": "string",
              "enum": [
                "clarification_request",
                "clarification_response",
                "evidence_request",
                "procedural_notice",
                "settlement_coordination"
              ]
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            },
            "replyToMessageId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "evidenceIds": {
              "type": "array",
              "maxItems": 8,
              "uniqueItems": true,
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "messageDigest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "recordEffect": {
              "type": "string",
              "const": "none"
            },
            "createdAt": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      ]
    },
    "requestId": {
      "type": "string"
    }
  },
  "required": [
    "data",
    "requestId"
  ]
}
```

### 201

Thread created.

application/json

```json
{
  "$ref": "#/components/schemas/CanonicalPostAccountCaseMessageResponse",
  "type": "object",
  "properties": {
    "data": {
      "anyOf": [
        {
          "$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",
                      "enum": [
                        "awaiting_response",
                        "ready_for_decision",
                        "deciding",
                        "decided",
                        "referred",
                        "recovery_hold",
                        "human_attention",
                        "administrator_queue",
                        "reserved_for_tribunal"
                      ],
                      "description": "administrator_queue is pending limited Rule 2.6 administration. reserved_for_tribunal acknowledges a request kept for the Tribunal without a ruling or effect. Neither is an adjudicated referral."
                    },
                    "responseDueAt": {
                      "type": "string"
                    },
                    "canRule": {
                      "type": "boolean"
                    },
                    "canWithdraw": {
                      "type": "boolean"
                    },
                    "withdrawnAt": {
                      "type": "string"
                    },
                    "deadlineTarget": {
                      "$ref": "#/components/schemas/ProceduralDeadlineTarget"
                    },
                    "deadlineDeferral": {
                      "$ref": "#/components/schemas/ProceduralDeadlineDeferral"
                    },
                    "assignedAuthority": {
                      "$ref": "#/components/schemas/ProceduralAuthority"
                    },
                    "ruling": {
                      "$ref": "#/components/schemas/ProceduralPublicRuling"
                    }
                  }
                },
                "messages": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CanonicalHostedMessage"
                  }
                }
              },
              "required": [
                "id",
                "category",
                "visibility",
                "status",
                "createdAt",
                "updatedAt",
                "canReply",
                "messages"
              ]
            }
          },
          "required": [
            "thread"
          ]
        },
        {
          "$ref": "#/components/schemas/PartnerProceduralMessage",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "schemaVersion",
            "id",
            "caseId",
            "partnerId",
            "senderKind",
            "senderCredentialPublicId",
            "category",
            "text",
            "evidenceIds",
            "messageDigest",
            "recordEffect",
            "createdAt"
          ],
          "properties": {
            "schemaVersion": {
              "type": "string",
              "const": "partner-procedural-message-v2"
            },
            "id": {
              "type": "string"
            },
            "caseId": {
              "type": "string"
            },
            "partnerId": {
              "type": "string"
            },
            "senderKind": {
              "type": "string",
              "enum": [
                "party",
                "platform"
              ]
            },
            "senderSide": {
              "type": "string",
              "enum": [
                "claimant",
                "respondent"
              ]
            },
            "senderCredentialPublicId": {
              "type": "string",
              "description": "Public credential identity; the internal persistence identifier is never returned."
            },
            "category": {
              "type": "string",
              "enum": [
                "clarification_request",
                "clarification_response",
                "evidence_request",
                "procedural_notice",
                "settlement_coordination"
              ]
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            },
            "replyToMessageId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "evidenceIds": {
              "type": "array",
              "maxItems": 8,
              "uniqueItems": true,
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "messageDigest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "recordEffect": {
              "type": "string",
              "const": "none"
            },
            "createdAt": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      ]
    },
    "requestId": {
      "type": "string"
    }
  },
  "required": [
    "data",
    "requestId"
  ]
}
```

### default

RFC 9457 style problem response.

application/problem+json

```json
{
  "$ref": "#/components/schemas/Problem",
  "type": "object",
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail",
    "requestId"
  ],
  "properties": {
    "type": {
      "type": "string",
      "format": "uri"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string"
    },
    "detail": {
      "type": "string"
    },
    "requestId": {
      "type": "string"
    },
    "details": {
      "description": "Account-readiness refusals include a value-free checklist and exact account-page link. Other error codes may provide different details.",
      "anyOf": [
        {
          "$ref": "#/components/schemas/AccountReadinessDetails",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "ready",
            "accountSetupUrl",
            "missing"
          ],
          "properties": {
            "ready": {
              "type": "boolean"
            },
            "accountSetupUrl": {
              "type": "string",
              "format": "uri"
            },
            "missing": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AccountReadinessRequirement",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code",
                  "label",
                  "section",
                  "accountUrl"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "section": {
                    "type": "string",
                    "enum": [
                      "email",
                      "identity",
                      "legal_documents"
                    ]
                  },
                  "accountUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        {
          "$ref": "#/components/schemas/LegalDocumentsRequiredDetails",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "legalDocumentsUrl"
          ],
          "properties": {
            "legalDocumentsUrl": {
              "type": "string",
              "format": "uri",
              "description": "Absolute account-page URL where the person reviews and accepts the current Terms and Privacy Notice. Uses the configured public application origin. After accepting the documents, retry the original operation."
            },
            "ready": {
              "type": "boolean"
            },
            "accountSetupUrl": {
              "type": "string",
              "format": "uri"
            },
            "missing": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/AccountReadinessRequirement",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code",
                  "label",
                  "section",
                  "accountUrl"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "section": {
                    "type": "string",
                    "enum": [
                      "email",
                      "identity",
                      "legal_documents"
                    ]
                  },
                  "accountUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        {}
      ]
    }
  }
}
```

## Example response

### Successful response

```json
{
  "data": {
    "thread": {
      "id": "id_test",
      "category": "category_test",
      "visibility": "visibility_test",
      "status": "status_test",
      "createdAt": "createdAt_test",
      "updatedAt": "updatedAt_test",
      "canReply": false,
      "messages": [
        {
          "id": "id_test",
          "sender": {
            "label": "label_test",
            "role": "role_test"
          },
          "body": "Could you share the carrier’s proof-of-delivery record for order #1042?",
          "createdAt": "createdAt_test"
        }
      ]
    }
  },
  "requestId": "requestId_test"
}
```

## Errors

Read the response status and stable error code. See [errors](https://peoplescourt.ai/docs/api/errors.md) and [rate limits](https://peoplescourt.ai/docs/api/rate-limits.md) 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.
- Send a unique Idempotency-Key. An exact retry returns the stored result; reusing the key with a different request fails.
- The request is accepted only when its credential, authority, case state, and resource preconditions are satisfied.

## Request examples

Use `https://peoplescourt.ai` with the test credential issued for your integration.

```sh
curl --request POST \
  --url 'https://peoplescourt.ai/api/cases/pcase_test_123/messages' \
  --header 'Cookie: arb_session=COPY_ACCOUNT_SESSION' \
  --header 'Origin: https://peoplescourt.ai' \
  --header 'Content-Type: application/json' \
  --data '{
  "body": "Could you share the carrier’s proof-of-delivery record for order #1042?",
  "category": "technical_problem"
}'
```

```ts
const input = {
  "body": "Could you share the carrier’s proof-of-delivery record for order #1042?",
  "category": "technical_problem"
};

const response = await fetch("https://peoplescourt.ai/api/cases/pcase_test_123/messages", {
  method: "POST",
  headers: {
    "Cookie": "arb_session=COPY_ACCOUNT_SESSION",
    "Origin": "https://peoplescourt.ai",
    "Content-Type": "application/json"
  },
  body: JSON.stringify(input),
});
if (!response.ok) throw await response.json();
const result = await response.json();
```

```python
import requests

response = requests.post(
    "https://peoplescourt.ai/api/cases/pcase_test_123/messages",
    headers={
      "Cookie": "arb_session=COPY_ACCOUNT_SESSION",
      "Origin": "https://peoplescourt.ai",
      "Content-Type": "application/json"
    },
    json={"body": "Could you share the carrier’s proof-of-delivery record for order #1042?", "category": "technical_problem"},
    timeout=30,
)
response.raise_for_status()
result = response.json()
```
