Set a file's category

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
PATCH /cases/files/{caseFileId}/category

Sets or clears the category of a case file and returns the file.

Headers

  • organization string Required

    id of the selected (active) organization

Path parameters

  • caseFileId string Required

    Id of the case file

application/json

Body Required

  • category string | null

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • createdAt string(date-time) Required
      • updatedAt string(date-time) Required
      • id string Required
      • name string Required
      • type string Required
      • size number Required

        Size in bytes

      • case string | null Required
      • file object Required

        The full record on routes that load it; null (or an empty list) on routes that do not.

        Hide file attributes Show file attributes object
        • createdAt string(date-time) Required
        • updatedAt string(date-time) Required
        • id string Required
        • name string Required
        • providerId string Required
        • convertedName string | null Required
        • convertedProviderId string Required
        • provider string Required
        • size number Required

          Size in bytes

        • transferState number | null Required
      • extractionCode string | null Required

        Id of the extraction code the file was uploaded through

      • category string | null Required
      • tags array[object] | null Required

        The full record on routes that load it; null (or an empty list) on routes that do not.

        Hide tags attributes Show tags attributes object
        • createdAt string(date-time) Required
        • updatedAt string(date-time) Required
        • id string Required
        • name string Required
        • nameLowercase string Required
        • backgroundColor string Required
        • textColor string Required
        • type string Required

          Values are system, organization, case, or user.

        • severity string Required

          Values are info, warning, or danger.

        • origin string Required

          Values are manual or auto-import.

        • creatorAccessType string | null

          Values are org or opposing_council.

        • isActive boolean Required
      • attachedTags array[object]
        Hide attachedTags attributes Show attachedTags attributes object
        • tagId string Required

          Tag id (Tag._id)

        • tag string Required

          Tag display name (Tag.name)

        • addedBy string Required

          Values are user, ai, auto, auto-import, system, or default.

        • addedById string | null
        • removedAt string(date-time) | null
        • removedBy string | null

          Values are user, ai, auto, auto-import, system, or default.

        • removedById string | null
      • ocSharedStatus string | null

        Opposing-council only: how this file has been shared with the OL. Omitted (null) for non-OC callers, and for legal-integration documents (a separate OC gate not yet wired into this field).

        Values are shared, pending, or not_gated.

    • statusCode number Required
    • timestamp string(date-time) Required
PATCH /cases/files/{caseFileId}/category
curl \
 --request PATCH 'http://api.example.com/cases/files/{caseFileId}/category' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "organization: string" \
 --data '{
  "category": "string"
}'
Request examples
# Headers
organization: string

# Payload
{
  "category": "string"
}
Response examples (200)
{
  "data": {
    "createdAt": "2026-01-15T14:30:00.000Z",
    "updatedAt": "2026-01-15T14:30:00.000Z",
    "id": "507f1f77bcf86cd799439011",
    "name": "contract.pdf",
    "type": "document",
    "size": 204800,
    "case": "507f1f77bcf86cd799439011",
    "file": {
      "createdAt": "2026-01-15T14:30:00.000Z",
      "updatedAt": "2026-01-15T14:30:00.000Z",
      "id": "507f1f77bcf86cd799439011",
      "name": "photo.heic",
      "providerId": "uploads/507f1f77bcf86cd799439011/photo.heic",
      "convertedName": "photo.jpg",
      "convertedProviderId": "uploads/507f1f77bcf86cd799439011/photo.jpg",
      "provider": "s3",
      "size": 204800,
      "transferState": 42.0
    },
    "extractionCode": "507f1f77bcf86cd799439011",
    "category": "contracts",
    "tags": [
      {
        "createdAt": "2026-01-15T14:30:00.000Z",
        "updatedAt": "2026-01-15T14:30:00.000Z",
        "id": "507f1f77bcf86cd799439011",
        "name": "Important",
        "nameLowercase": "important",
        "backgroundColor": "#FDE68A",
        "textColor": "#92400E",
        "type": "system",
        "severity": "info",
        "origin": "manual",
        "creatorAccessType": "org",
        "isActive": true
      }
    ],
    "attachedTags": [
      {
        "tagId": "507f1f77bcf86cd799439011",
        "tag": "Important",
        "addedBy": "user",
        "addedById": "507f1f77bcf86cd799439012",
        "removedAt": "2026-05-04T09:42:00Z",
        "removedBy": "user",
        "removedById": "string"
      }
    ],
    "ocSharedStatus": "shared"
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}