Turn a feature flag on or off (internal)

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 /admin/feature-flags/{key}

Sets the flag and records who changed it; the node that served the request applies it at once and other nodes within about 45 seconds. Sending the current value changes nothing. Returns 404 for a key this build does not define, including an ORPHANED one. Super admin only.

Path parameters

  • key string Required

    The flag key as defined in the FeatureFlag enum, e.g. "clio-integration"

application/json

Body Required

  • enabled boolean Required

    Desired state of the flag. Sending the value it already has is a no-op and leaves the audit fields untouched.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • key string Required

        The flag key, e.g. "clio-integration"

      • enabled boolean Required

        Effective value. An UNSEEDED flag reads false because no row exists.

      • description string | null Required
      • status string Required

        SEEDED = defined in code and backed by a row; UNSEEDED = defined in code, no row yet (toggling creates it); ORPHANED = a leftover row this build no longer defines, so it cannot be toggled. Derived at read time, never stored.

        Values are SEEDED, UNSEEDED, or ORPHANED.

      • updatedAt string(date-time) | null Required
      • updatedByEmail string | null Required

        Admin who last toggled the flag. Null on rows a seed migration created and no one has changed since.

    • statusCode number Required
    • timestamp string(date-time) Required
  • 404

    No such feature flag in this build

PATCH /admin/feature-flags/{key}
curl \
 --request PATCH 'http://api.example.com/admin/feature-flags/{key}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "enabled": true
}'
Request examples
{
  "enabled": true
}
Response examples (200)
{
  "data": {
    "key": "clio-integration",
    "enabled": true,
    "description": "Turns on the Clio integration",
    "status": "SEEDED",
    "updatedAt": "2026-01-15T10:15:00.000Z",
    "updatedByEmail": "admin@example.com"
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}