POSTpartial

Accept the pinned terms and file an Answer atomically

Preview controlled by PEOPLES_COURT_API_CANONICAL_ROUTES. Accepts an authorized session or partner bearer; Answer also accepts the existing wallet/invitation proof. A record-summary correction is a distinct party act, so an active case membership must allow restatement:respond, which record:confirm alone never grants. Existing aliases and their application operations remain authoritative. Idempotency-Key reuses the alias journal.

/api/cases/{id}/answerfileAnswerPreview

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.

CanonicalPartnerBearer

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"}
Idempotency-KeyheaderOptional{"type":"string"}

Request body

Required request body.

application/json

{
  "$ref": "#/components/schemas/CanonicalAnswerInput",
  "description": "Canonical Answer body. Exactly one credential class applies per request, and each states its own required fields.",
  "anyOf": [
    {
      "$ref": "#/components/schemas/CanonicalSessionAnswerInput",
      "allOf": [
        {
          "$ref": "#/components/schemas/CanonicalAnswerFields",
          "type": "object",
          "description": "Answer fields shared by every credential class. The three input schemas that compose this one state which of them each credential class must send.",
          "properties": {
            "agree": {
              "type": "boolean",
              "description": "Required for a session caller; the hosted operation refuses an Answer without it."
            },
            "principalKind": {
              "type": "string",
              "description": "Canonical vocabulary for the responding principal. The adapter maps it to the stored party type; do not also send type.",
              "enum": [
                "individual",
                "organization",
                "autonomous_agent"
              ]
            },
            "type": {
              "type": "string",
              "enum": [
                "human",
                "entity",
                "agent"
              ]
            },
            "name": {
              "type": "string"
            },
            "position": {
              "type": "string",
              "maxLength": 20000,
              "description": "Required for a bearer Answer."
            },
            "evidence": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "relief": {
              "type": "string",
              "maxLength": 2000
            },
            "declaratoryRelief": {
              "type": "string",
              "maxLength": 4000
            },
            "orderRelief": {
              "type": "string",
              "maxLength": 4000
            },
            "hasPrincipal": {
              "type": "boolean"
            },
            "principalCompressedClockConsent": {
              "type": "boolean"
            },
            "protocolActor": {
              "type": "string",
              "description": "Required with protocolPrincipal and protocolSource for a membership-authorized bearer Answer."
            },
            "protocolPrincipal": {
              "type": "string"
            },
            "protocolSource": {
              "type": "string"
            },
            "inviteToken": {
              "type": "string",
              "description": "Wallet-invite Answer only; a membership-authorized Answer must omit it."
            },
            "walletAddress": {
              "type": "string"
            },
            "signature": {
              "type": "string"
            },
            "attest": {
              "type": "boolean"
            },
            "declarantName": {
              "type": "string"
            },
            "declarantCapacity": {
              "type": "string"
            },
            "executionLocation": {
              "type": "string"
            },
            "openingDraftDigest": {
              "type": "string"
            },
            "acceptanceStatementHash": {
              "type": "string"
            }
          }
        }
      ],
      "required": [
        "agree",
        "position",
        "attest",
        "declarantName",
        "declarantCapacity",
        "executionLocation"
      ],
      "description": "Account session Answer. The operation refuses an Answer without agreement to arbitrate and without the complete human declaration. A respondent who is not the case's verified contact also presents the invitation through inviteToken, and a case opened with pinned hosted terms presents the exact openingDraftDigest and acceptanceStatementHash from that invitation; both stay optional here because they depend on how the respondent was designated, not on the Answer itself. Membership proof, invitation use, consent and the Answer remain one atomic commit."
    },
    {
      "$ref": "#/components/schemas/CanonicalPartnerAnswerInput",
      "allOf": [
        {
          "$ref": "#/components/schemas/CanonicalAnswerFields",
          "type": "object",
          "description": "Answer fields shared by every credential class. The three input schemas that compose this one state which of them each credential class must send.",
          "properties": {
            "agree": {
              "type": "boolean",
              "description": "Required for a session caller; the hosted operation refuses an Answer without it."
            },
            "principalKind": {
              "type": "string",
              "description": "Canonical vocabulary for the responding principal. The adapter maps it to the stored party type; do not also send type.",
              "enum": [
                "individual",
                "organization",
                "autonomous_agent"
              ]
            },
            "type": {
              "type": "string",
              "enum": [
                "human",
                "entity",
                "agent"
              ]
            },
            "name": {
              "type": "string"
            },
            "position": {
              "type": "string",
              "maxLength": 20000,
              "description": "Required for a bearer Answer."
            },
            "evidence": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "relief": {
              "type": "string",
              "maxLength": 2000
            },
            "declaratoryRelief": {
              "type": "string",
              "maxLength": 4000
            },
            "orderRelief": {
              "type": "string",
              "maxLength": 4000
            },
            "hasPrincipal": {
              "type": "boolean"
            },
            "principalCompressedClockConsent": {
              "type": "boolean"
            },
            "protocolActor": {
              "type": "string",
              "description": "Required with protocolPrincipal and protocolSource for a membership-authorized bearer Answer."
            },
            "protocolPrincipal": {
              "type": "string"
            },
            "protocolSource": {
              "type": "string"
            },
            "inviteToken": {
              "type": "string",
              "description": "Wallet-invite Answer only; a membership-authorized Answer must omit it."
            },
            "walletAddress": {
              "type": "string"
            },
            "signature": {
              "type": "string"
            },
            "attest": {
              "type": "boolean"
            },
            "declarantName": {
              "type": "string"
            },
            "declarantCapacity": {
              "type": "string"
            },
            "executionLocation": {
              "type": "string"
            },
            "openingDraftDigest": {
              "type": "string"
            },
            "acceptanceStatementHash": {
              "type": "string"
            }
          }
        }
      ],
      "required": [
        "position",
        "protocolActor",
        "protocolPrincipal",
        "protocolSource"
      ],
      "description": "Membership-authorized bearer Answer. The protocol provenance names the acting agent, its principal and the source that authorizes it; invite and wallet proof fields must be absent."
    },
    {
      "$ref": "#/components/schemas/CanonicalWalletAnswerInput",
      "allOf": [
        {
          "$ref": "#/components/schemas/CanonicalAnswerFields",
          "type": "object",
          "description": "Answer fields shared by every credential class. The three input schemas that compose this one state which of them each credential class must send.",
          "properties": {
            "agree": {
              "type": "boolean",
              "description": "Required for a session caller; the hosted operation refuses an Answer without it."
            },
            "principalKind": {
              "type": "string",
              "description": "Canonical vocabulary for the responding principal. The adapter maps it to the stored party type; do not also send type.",
              "enum": [
                "individual",
                "organization",
                "autonomous_agent"
              ]
            },
            "type": {
              "type": "string",
              "enum": [
                "human",
                "entity",
                "agent"
              ]
            },
            "name": {
              "type": "string"
            },
            "position": {
              "type": "string",
              "maxLength": 20000,
              "description": "Required for a bearer Answer."
            },
            "evidence": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "relief": {
              "type": "string",
              "maxLength": 2000
            },
            "declaratoryRelief": {
              "type": "string",
              "maxLength": 4000
            },
            "orderRelief": {
              "type": "string",
              "maxLength": 4000
            },
            "hasPrincipal": {
              "type": "boolean"
            },
            "principalCompressedClockConsent": {
              "type": "boolean"
            },
            "protocolActor": {
              "type": "string",
              "description": "Required with protocolPrincipal and protocolSource for a membership-authorized bearer Answer."
            },
            "protocolPrincipal": {
              "type": "string"
            },
            "protocolSource": {
              "type": "string"
            },
            "inviteToken": {
              "type": "string",
              "description": "Wallet-invite Answer only; a membership-authorized Answer must omit it."
            },
            "walletAddress": {
              "type": "string"
            },
            "signature": {
              "type": "string"
            },
            "attest": {
              "type": "boolean"
            },
            "declarantName": {
              "type": "string"
            },
            "declarantCapacity": {
              "type": "string"
            },
            "executionLocation": {
              "type": "string"
            },
            "openingDraftDigest": {
              "type": "string"
            },
            "acceptanceStatementHash": {
              "type": "string"
            }
          }
        }
      ],
      "required": [
        "position",
        "inviteToken",
        "walletAddress",
        "signature"
      ],
      "description": "Wallet-invitation Answer. The signature is verified against the invitation; membership protocol fields must be absent."
    }
  ]
}

Responses

200

Authorized operation result.

application/json

{
  "$ref": "#/components/schemas/CanonicalFileAnswerPreviewResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/CanonicalAnswerResult",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "string"
        },
        "caseId": {
          "type": "string"
        },
        "accepted": {
          "type": "boolean"
        },
        "capabilityDelivery": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "phase": {
          "type": "string"
        },
        "deadlines": {
          "type": "object",
          "properties": {
            "answer": {
              "type": "string"
            },
            "evidence": {
              "type": "string"
            },
            "rebuttal": {
              "type": "string"
            }
          }
        },
        "walletVerified": {
          "type": "boolean"
        },
        "authorization": {
          "type": "string"
        },
        "showOnce": {
          "type": "object",
          "properties": {
            "respondentPartyToken": {
              "type": "string"
            }
          }
        },
        "respondentToken": {
          "type": "string",
          "description": "Show-once hosted respondent capability; never log it."
        },
        "trackNote": {
          "type": "string"
        },
        "ran": {
          "const": false
        },
        "answerReference": {
          "type": "object",
          "properties": {
            "caseId": {
              "type": "string"
            },
            "submissionId": {
              "type": "string"
            },
            "membershipId": {
              "type": "string"
            },
            "revision": {
              "type": "integer"
            },
            "followUpEventId": {
              "type": "string"
            }
          }
        }
      },
      "anyOf": [
        {
          "required": [
            "status"
          ]
        },
        {
          "required": [
            "schemaVersion",
            "caseId",
            "accepted",
            "capabilityDelivery"
          ]
        }
      ]
    },
    "requestId": {
      "type": "string"
    }
  },
  "required": [
    "data",
    "requestId"
  ],
  "x-code-source": "lib/api/canonical-routes.ts"
}
201

Answer or invitation created through the shared partner operation.

application/json

{
  "$ref": "#/components/schemas/CanonicalFileAnswerPreviewResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/CanonicalAnswerResult",
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "string"
        },
        "caseId": {
          "type": "string"
        },
        "accepted": {
          "type": "boolean"
        },
        "capabilityDelivery": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "phase": {
          "type": "string"
        },
        "deadlines": {
          "type": "object",
          "properties": {
            "answer": {
              "type": "string"
            },
            "evidence": {
              "type": "string"
            },
            "rebuttal": {
              "type": "string"
            }
          }
        },
        "walletVerified": {
          "type": "boolean"
        },
        "authorization": {
          "type": "string"
        },
        "showOnce": {
          "type": "object",
          "properties": {
            "respondentPartyToken": {
              "type": "string"
            }
          }
        },
        "respondentToken": {
          "type": "string",
          "description": "Show-once hosted respondent capability; never log it."
        },
        "trackNote": {
          "type": "string"
        },
        "ran": {
          "const": false
        },
        "answerReference": {
          "type": "object",
          "properties": {
            "caseId": {
              "type": "string"
            },
            "submissionId": {
              "type": "string"
            },
            "membershipId": {
              "type": "string"
            },
            "revision": {
              "type": "integer"
            },
            "followUpEventId": {
              "type": "string"
            }
          }
        }
      },
      "anyOf": [
        {
          "required": [
            "status"
          ]
        },
        {
          "required": [
            "schemaVersion",
            "caseId",
            "accepted",
            "capabilityDelivery"
          ]
        }
      ]
    },
    "requestId": {
      "type": "string"
    }
  },
  "required": [
    "data",
    "requestId"
  ],
  "x-code-source": "lib/api/canonical-routes.ts"
}
404

Preview disabled or resource unavailable.

default

Stable problem code and requestId; no protected state disclosed.

application/problem+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"
    }
  }
}

Example response

Successful response

{
  "data": {
    "status": "status_test"
  },
  "requestId": "requestId_test"
}

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.
  • 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.