Approve a suggestion

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 /case/{caseId}/suggest/{codeId}/{suggestionId}/approve

Applies the suggested configuration to the extraction code, approves and locks the code, and closes other open suggestions. Only the side opposite the suggester can approve.

Headers

  • organization string Required

    id of the selected (active) organization

Path parameters

  • caseId string Required

    Id of the case

  • suggestionId string Required

    Id of the suggestion

  • codeId Required

    Id of the extraction code

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
      • status string Required

        Values are open, approved, rejected, or closed.

      • suggestion object Required
      • previousConfig object | null Required
      • extractionCode string | null Required
      • case string | null Required
      • suggestedBy string | null Required
      • suggestedAt string(date-time) Required
      • approvedBy string | null Required
      • approvedAt string(date-time) | null Required
      • rejectedBy string | null Required
      • rejectedAt string(date-time) | null Required
      • mergedAt string(date-time) | null Required
      • messages array[object] Required
        Hide messages attributes Show messages attributes object
        • text string Required
        • date string(date-time) Required
        • user string | null Required
        • statusUpdate string | null

          Values are open, approved, rejected, or closed.

    • statusCode number Required
    • timestamp string(date-time) Required
PATCH /case/{caseId}/suggest/{codeId}/{suggestionId}/approve
curl \
 --request PATCH 'http://api.example.com/case/{caseId}/suggest/{codeId}/{suggestionId}/approve' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "organization: string"
Response examples (200)
{
  "data": {
    "createdAt": "2026-01-15T14:30:00.000Z",
    "updatedAt": "2026-01-15T14:30:00.000Z",
    "id": "507f1f77bcf86cd799439011",
    "status": "open",
    "suggestion": {
      "type": "share_all"
    },
    "previousConfig": {
      "type": "allow_client"
    },
    "extractionCode": "507f1f77bcf86cd799439012",
    "case": "507f1f77bcf86cd799439011",
    "suggestedBy": "507f1f77bcf86cd799439013",
    "suggestedAt": "2026-01-15T14:30:00.000Z",
    "approvedBy": "string",
    "approvedAt": "2026-05-04T09:42:00Z",
    "rejectedBy": "string",
    "rejectedAt": "2026-05-04T09:42:00Z",
    "mergedAt": "2026-05-04T09:42:00Z",
    "messages": [
      {
        "text": "Please include WhatsApp.",
        "date": "2026-01-15T14:35:00.000Z",
        "user": "507f1f77bcf86cd799439013",
        "statusUpdate": "open"
      }
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}