{
  "openapi": "3.0.0",
  "info": {
    "title": "Rhythms (params in:body)",
    "description": "\n<p># RhythmsAI API</p>\n\n<p>The RhythmsAI API provides a comprehensive platform for team productivity, goal tracking, and workflow automation. Built with multi-tenant architecture, it enables organizations to manage objectives, track progress, and integrate with popular productivity tools.</p>\n\n<p>## API Structure</p>\n<ul><li>\n<p>**RESTful Design**: Clean, predictable REST endpoints following industry standards</p>\n</li><li>\n<p><strong>Multi-tenant</strong>: All data is automatically scoped to your organization’s tenant</p>\n</li><li>\n<p><strong>Authentication</strong>: Secure authentication with proper authorization controls</p>\n</li><li>\n<p><strong>Pagination</strong>: Efficient data retrieval with built-in pagination support</p>\n</li><li>\n<p><strong>Filtering</strong>: Advanced filtering capabilities using Ransack query DSL</p>\n</li></ul>\n\n<p>## Getting Started</p>\n\n<p>All API endpoints require authentication. Once authenticated, your requests will be automatically scoped to your organization’s data. The API supports JSON request/response format and follows standard HTTP status codes for success and error handling.</p>\n\n<p>For integration support and detailed examples, refer to the specific endpoint documentation below.</p>\n",
    "version": "1.0",
    "x-copyright": null
  },
  "paths": {
    "/{shareable_type}/{shareable_uuid}/access_requests": {
      "post": {
        "tags": [
          "access_requests"
        ],
        "operationId": "post_shareable_type_shareable_uuid_access_requests",
        "summary": "Request more access to a shareable resource",
        "parameters": [
          {
            "name": "shareable_type",
            "in": "path",
            "required": true,
            "description": "Type of shareable resource",
            "schema": {
              "type": "string",
              "enum": [
                "okrs-dashboards",
                "documents",
                "explorer-views",
                "playbooks"
              ]
            }
          },
          {
            "name": "shareable_uuid",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<resource_uuid> or resource UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requested_level": {
                    "type": "string",
                    "enum": [
                      "view",
                      "comment",
                      "edit",
                      "manage"
                    ],
                    "description": "Access level being requested"
                  },
                  "message": {
                    "type": "string",
                    "description": "Optional note from the requester shown to recipients"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "requested_level"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ok"
          }
        },
        "description": "Request a higher access level on a shareable (document, view, or playbook). A pending request is persisted (created, or upgraded in place if one already exists) and the resource's owner and managers are notified when a new request is created. The request is auto-resolved once a later grant satisfies it. A request the user already satisfies (owner or already at/above the requested level) is a no-op."
      }
    },
    "/{shareable_type}/{shareable_uuid}/access_requests/mine": {
      "get": {
        "tags": [
          "access_requests"
        ],
        "operationId": "get_shareable_type_shareable_uuid_access_requests_mine",
        "summary": "Get the caller's own pending access request",
        "parameters": [
          {
            "name": "shareable_type",
            "in": "path",
            "required": true,
            "description": "Type of shareable resource",
            "schema": {
              "type": "string",
              "enum": [
                "okrs-dashboards",
                "documents",
                "explorer-views",
                "playbooks"
              ]
            }
          },
          {
            "name": "shareable_uuid",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<resource_uuid> or resource UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          }
        },
        "description": "Returns the current user's own pending access request for a shareable (or none). Self-scoped: it only ever reports the caller's request, so it leaks nothing about the resource or other users' requests, and (like create) requires no existing access. The UI uses this to show a persistent \"Access requested\" state across page refreshes."
      }
    },
    "/{shareable_type}/{shareable_uuid}/access_requests/resend": {
      "post": {
        "tags": [
          "access_requests"
        ],
        "operationId": "post_shareable_type_shareable_uuid_access_requests_resend",
        "summary": "Re-notify the owner/managers about the caller's pending request",
        "parameters": [
          {
            "name": "shareable_type",
            "in": "path",
            "required": true,
            "description": "Type of shareable resource",
            "schema": {
              "type": "string",
              "enum": [
                "okrs-dashboards",
                "documents",
                "explorer-views",
                "playbooks"
              ]
            }
          },
          {
            "name": "shareable_uuid",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<resource_uuid> or resource UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          }
        },
        "description": "Re-sends the access-request notification for the current user's own pending request (in-app re-surface + email), throttled to once per hour. Lets a requestor nudge an ignored request instead of being stuck. Self-scoped and tenant-scoped like the other actions. Returns { status: \"resent\" } when re-notified, { status: \"throttled\" } within the window, or { status: \"no_pending_request\" } when the caller has none."
      }
    },
    "/chat/refresh_threads/{thread_uuid}/status": {
      "get": {
        "tags": [
          "chat_refresh_threads"
        ],
        "operationId": "get_chat_refresh_threads_thread_uuid_status",
        "summary": "Get the status of an on-demand refresh",
        "parameters": [
          {
            "name": "thread_uuid",
            "in": "path",
            "required": true,
            "description": "UUID of the refresh thread returned by POST /documents/:uuid/refresh",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Poll the status of an on-demand refresh started by\n`POST /documents/:uuid/refresh`. Pass the `thread_uuid` returned by\nthat call. Returns a coarse `state`\n(`running` | `completed` | `completed_unknown_outcome` | `failed`),\nthe skill-level `skill_status` when parseable\n(`completed` | `completed_no_changes` | `completed_locked` | `failed`),\na one-line `summary`, and `completed_at` when the run terminates.\n\n`completed_unknown_outcome` means the agent finished talking but no\nrecognized terminal status code was present in its reply — callers\nshould surface `summary` to the user verbatim rather than assume the\nrefresh succeeded.\n\nPossession of the unguessable `thread_uuid` is the access proof —\nwithin a tenant, any caller with the handle can poll its status.\nCallers should poll until `state != \"running\"` — refreshes typically\ncomplete within 10-60 seconds.\n"
      }
    },
    "/connector_requests": {
      "post": {
        "tags": [
          "connector_requests"
        ],
        "operationId": "post_connector_requests",
        "summary": "Record a connector integration request and notify Pylon",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_type": {
                    "type": "string",
                    "description": "Connector connection type key (e.g. Slack) or free-form name"
                  },
                  "connector_display_name": {
                    "type": "string",
                    "description": "Human-readable connector name (defaults to connection_type when blank)"
                  },
                  "request_source": {
                    "type": "string",
                    "enum": [
                      "catalog",
                      "by_name"
                    ],
                    "description": "Where the request originated (low-cardinality Datadog tag)"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "connection_type"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Persists the requested connector on `current_user.tenant.setting.requested_connections` (idempotent, normalized by case + collapsed whitespace) and pages Pylon by creating an in-app chat issue attributed to the requester. Used by both the admin Connectors page (catalog tile + free-form) and the My Connectors page (free-form). Requires PYLON_ISSUES_API_TOKEN + PYLON_APP_ID for the Pylon side; persistence still happens when those are unset. Authenticated tenant members only; the workspace is always `current_user.tenant` (no tenant id in the request body)."
      }
    },
    "/data_sources/{id}": {
      "get": {
        "tags": [
          "data_sources"
        ],
        "operationId": "get_data_sources_id",
        "summary": "Get a data source",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Composite primary key in format '<tenant_uuid>_<data_source_uuid>' or data source UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data source found",
            "headers": {},
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Data source details"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          }
        },
        "description": "Retrieves a data source by its composite primary key or by UUID within the current tenant.\n\nThe user must have permission to view the linked goal or initiative.\n"
      }
    },
    "/documents": {
      "get": {
        "tags": [
          "documents"
        ],
        "operationId": "get_documents",
        "summary": "List documents",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number for pagination (default: 1)",
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Number of records per page (default: 20, max: 100)",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Alias for per_page - number of records per page",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit_max",
            "in": "query",
            "description": "Maximum number of records per page (overrides limit if not set)",
            "schema": {
              "type": "number",
              "default": null
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Set to 'true' to include total count in pagy metadata (data.pagy.count). Use for count/total queries instead of paginating through all pages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "explicitly_shared",
            "in": "query",
            "description": "Filter to show only explicitly shared documents",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Fuzzy full-text search over document title/content/creator/labels (Elasticsearch). Results are ordered by relevance unless an explicit sort (`q[s]`) is provided, in which case that sort takes precedence.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Ransack query parameters for filtering. In query strings, use bracket notation: q[name_cont]=john&q[status_eq]=active&q[s]=name+asc. Keys are attribute names with predicates: _cont (contains), _eq (equals), _in (array membership), _gteq (>=), _lteq (<=), _present (not null), _null (is null). The \"s\" key sorts results (e.g., q[s]=created_at+desc). Example query string: ?q[name_cont]=john&q[s]=name+asc filters names containing \"john\" sorted by name ascending.",
            "required": false,
            "schema": {
              "type": "object",
              "additionalProperties": true
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Retrieves documents for the current tenant.\n\n\nThis endpoint supports filtering and pagination through query parameters. Available ransackable attributes: uuid, name, view_uuid, name, creator_uuid, layout_uuid, playbook_uuid, status, content_type, created_at, updated_at."
      },
      "post": {
        "tags": [
          "documents"
        ],
        "operationId": "post_documents",
        "summary": "Create a new document",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Document name"
                  },
                  "content_type": {
                    "type": "string",
                    "description": "Type of document to create: 'document' (default) or 'layout'"
                  },
                  "layout_uuid": {
                    "type": "string",
                    "description": "UUID of an existing layout to base this document on"
                  },
                  "playbook_uuid": {
                    "type": "string",
                    "description": "UUID of the playbook this document was created for"
                  },
                  "playbook_run_uuid": {
                    "type": "string",
                    "description": "UUID of the playbook run this document was created during"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Creates a new document or layout. Optionally base it on an existing layout."
      }
    },
    "/documents/{uuid}": {
      "get": {
        "tags": [
          "documents"
        ],
        "operationId": "get_documents_uuid",
        "summary": "Get a specific document",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<document_uuid>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Retrieves a document with content fetched from Tiptap collaboration server. Falls back to database content if Tiptap is unavailable."
      },
      "put": {
        "tags": [
          "documents"
        ],
        "operationId": "put_documents_uuid",
        "summary": "Update document properties",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<document_uuid>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Document name"
                  },
                  "instructions": {
                    "type": "string",
                    "description": "Instructions content for the document. Changing this triggers content regeneration."
                  },
                  "status": {
                    "type": "string",
                    "description": "Document status: 'completed', 'draft', 'published', or 'archived'."
                  },
                  "content_type": {
                    "type": "string",
                    "description": "Document type: 'document' or 'layout'"
                  },
                  "layout_uuid": {
                    "type": "string",
                    "description": "Simple UUID of the layout to associate with this document"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Update document properties including status, name, instructions, and layout association.\n\nUse this endpoint to:\n- Update the document name\n- Update instructions\n- Change the document status (completed, draft, published, archived)\n- Associate the document with a layout (e.g., after saving a new layout from a custom document)\n\nAt least one parameter (name, instructions, status, or layout_uuid) must be provided.\n"
      }
    },
    "/documents/{uuid}/activities": {
      "get": {
        "tags": [
          "documents"
        ],
        "operationId": "get_documents_uuid_activities",
        "summary": "List a document's smart activity log",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<document_uuid>",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max entries per page (default 100, newest first)",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-based) for older entries",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "since",
            "in": "query",
            "description": "ISO-8601 timestamp; only entries at or after this time are returned",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since_last_seen",
            "in": "query",
            "description": "Only return entries at or after the caller's last-seen changelog timestamp for this document. No prior seen record means no lower bound (returns all). `since` wins if both are passed.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Returns the grouped change/refresh activity entries for a document, newest first. Paginated via `limit`/`page` (default 100 newest); pass `since` (ISO-8601) to scope to recent activity (e.g. 'what changed in the last few days'), or `since_last_seen` to scope to activity since the caller last viewed this document's changelog (mutually exclusive with `since`; `since` wins if both are passed)."
      }
    },
    "/documents/{uuid}/refresh": {
      "post": {
        "tags": [
          "documents"
        ],
        "operationId": "post_documents_uuid_refresh",
        "summary": "Trigger an on-demand refresh of a document",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<document_uuid>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Triggers an on-demand refresh of the target document. Opens an ephemeral\nChat::Thread, posts a refresh prompt, and kicks off the universal chat\nagent which invokes the `document_refresh` skill. Returns immediately\nwith a `thread_uuid` tracking handle; callers poll the thread or re-read\nthe document to see the refresh outcome.\n"
      }
    },
    "/entity_accesses": {
      "post": {
        "tags": [
          "entity_accesses"
        ],
        "operationId": "post_entity_accesses",
        "summary": "Record an access to an entity",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entity_type": {
                    "type": "string",
                    "description": "Polymorphic type of the accessed entity, e.g. \"Document\""
                  },
                  "entity_uuid": {
                    "type": "string",
                    "description": "<tenant_uuid>_<entity_uuid> or entity UUID"
                  },
                  "surface": {
                    "type": "string",
                    "description": "Which surface was viewed (e.g. \"content\", \"comment\", \"changelog\"); defaults to \"content\". Must be one of the resolved entity's accessable_surfaces."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "entity_type",
                  "entity_uuid"
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content - the read was recorded (or deduplicated)",
            "headers": {}
          },
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Records a first-party person read of an Accessable entity (fired by the webui on mount). Gated on the same read permission as the entity's show and deduplicated per user+entity+30min window. Returns 204 No Content."
      }
    },
    "/entities/{entity_type}/{entity_uuid}/access_summary": {
      "get": {
        "tags": [
          "entity_accesses"
        ],
        "operationId": "get_entities_entity_type_entity_uuid_access_summary",
        "summary": "Get an entity's access summary",
        "parameters": [
          {
            "name": "entity_type",
            "in": "path",
            "required": true,
            "description": "Polymorphic type of the accessed entity, e.g. \"Document\"",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity_uuid",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<entity_uuid> or entity UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Aggregate access counts and the caller's view-state for the Info pane",
            "headers": {},
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number",
                      "description": "Total number of recorded reads"
                    },
                    "people_count": {
                      "type": "number",
                      "description": "Distinct number of people that have accessed the entity"
                    },
                    "agent_count": {
                      "type": "number",
                      "description": "Distinct number of agents that have accessed the entity"
                    },
                    "viewer": {
                      "type": "object",
                      "properties": {
                        "content_seen_at": {
                          "type": "string",
                          "description": "ISO-8601 timestamp the caller last viewed the entity's content, or null"
                        },
                        "comment_seen_at": {
                          "type": "string",
                          "description": "ISO-8601 timestamp the caller last viewed the entity's comments, or null"
                        },
                        "changelog_seen_at": {
                          "type": "string",
                          "description": "ISO-8601 timestamp the caller last viewed the entity's changelog, or null"
                        },
                        "newest_comment_at": {
                          "type": "string",
                          "description": "ISO-8601 timestamp of the entity's newest comment not authored by the caller, or null"
                        },
                        "newest_foreign_activity_at": {
                          "type": "string",
                          "description": "ISO-8601 timestamp of the entity's newest activity not authored by the caller (null-author playbook/system activities included), or null"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "content_seen_at",
                        "comment_seen_at",
                        "changelog_seen_at",
                        "newest_comment_at",
                        "newest_foreign_activity_at"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "total",
                    "people_count",
                    "agent_count",
                    "viewer"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Returns aggregate access counts for the Info pane (total number of recorded reads plus the distinct number of people and agents that have accessed the entity) and the calling user's per-surface view-state. Response shape: { total, people_count, agent_count, viewer: { content_seen_at, comment_seen_at, changelog_seen_at, newest_comment_at, newest_foreign_activity_at } }."
      }
    },
    "/explorer_views": {
      "post": {
        "tags": [
          "explorer_views"
        ],
        "operationId": "post_explorer_views",
        "summary": "Create a new explorer view",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "explorer_view": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Name of the explorer view"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "ObjectiveView",
                          "InitiativeView",
                          "ReportsView"
                        ],
                        "default": "ObjectiveView",
                        "description": "Type of explorer view"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "draft",
                          "published"
                        ],
                        "default": "published",
                        "description": "Status of the explorer view"
                      },
                      "description": {
                        "type": "string",
                        "description": "Description of the explorer view"
                      },
                      "entity_type": {
                        "type": "string",
                        "enum": [
                          "Tenant",
                          "User",
                          "Team",
                          "Okrs::Chat"
                        ],
                        "description": "Type of entity this view belongs to"
                      },
                      "entity_uuid": {
                        "type": "string",
                        "description": "UUID of the entity this view belongs to"
                      },
                      "filters": {
                        "type": "object",
                        "properties": {
                          "with_time_periods_hierarchy": {
                            "type": "object",
                            "properties": {
                              "time_period_uuid_in": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Array of time period UUIDs or dynamic values (${current_primary_cycle}, ${current_secondary_cycle})"
                              },
                              "include_all_nested_time_periods": {
                                "type": "boolean",
                                "description": "Include all nested time periods"
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "time_period_uuid_in",
                              "include_all_nested_time_periods"
                            ]
                          },
                          "with_teams_hierarchy": {
                            "type": "object",
                            "properties": {
                              "teams_uuid_in": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Array of team UUIDs"
                              },
                              "include_immediate_subteams": {
                                "type": "boolean",
                                "description": "Include immediate subteams"
                              },
                              "include_all_subteams": {
                                "type": "boolean",
                                "description": "Include all subteams"
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "teams_uuid_in",
                              "include_immediate_subteams",
                              "include_all_subteams"
                            ]
                          },
                          "with_owners_hierarchy": {
                            "type": "object",
                            "properties": {
                              "owners_uuid_in": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Array of owner UUIDs"
                              },
                              "include_direct_reports": {
                                "type": "boolean",
                                "description": "Include direct reports"
                              },
                              "include_all_reports": {
                                "type": "boolean",
                                "description": "Include all reports"
                              },
                              "include_delegates": {
                                "type": "boolean",
                                "default": false,
                                "description": "Include delegated goals (goals where specified users are delegates)"
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "owners_uuid_in",
                              "include_direct_reports",
                              "include_all_reports"
                            ]
                          },
                          "object_type_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by goal type: Okrs::Objective, Okrs::KeyResult, or Okrs::Initiative (nil/empty = all types). Use ONLY for explicit type requests (e.g., 'KRs' → ['Okrs::KeyResult'], 'objectives' → ['Okrs::Objective']). Do NOT use for generic 'goals' or 'OKRs' queries—return all types instead. When using this filter (non-nil/non-empty), set flat_list=true."
                          },
                          "flat_list": {
                            "type": "boolean",
                            "description": "Show results as flat list (true) or tree hierarchy (false/omit). Use true with: object_type_in filter, status-based lists, cross-hierarchy filtering (owner/team). Use false for: 'OKRs'/'my OKRs' queries, viewing parent-child relationships. Rule: If using object_type_in, use flat_list=true."
                          },
                          "with_last_checkin_date": {
                            "type": "object",
                            "properties": {
                              "operator": {
                                "type": "string",
                                "description": "Comparison operator (eq, gt, lt)"
                              },
                              "value": {
                                "type": "string",
                                "description": "Date value in YYYY-MM-DD format"
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "operator",
                              "value"
                            ]
                          },
                          "current_status_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by current status values"
                          },
                          "checkin_status_in": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "not_due",
                                "upcoming",
                                "complete",
                                "late",
                                "due",
                                "overdue"
                              ]
                            },
                            "description": "Filter by checkin status values"
                          },
                          "with_source": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "Okrs::Chat",
                                  "Chat::Thread",
                                  "Okrs::ImportJob",
                                  "Okrs::CascadeJob",
                                  "Artifacts::GeneratedObjective",
                                  "Artifacts::BulkImport"
                                ],
                                "description": "Source type"
                              },
                              "uuid": {
                                "type": "string",
                                "description": "Source UUID"
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "type",
                              "uuid"
                            ]
                          },
                          "uuid_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by specific goal UUIDs"
                          },
                          "with_any_labels": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by label names (must match at least one)"
                          },
                          "owners_profile_department_name_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner department names"
                          },
                          "owners_profile_division_name_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner division names"
                          },
                          "owners_profile_job_title_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner job titles"
                          },
                          "owners_profile_cost_center_name_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner cost center names"
                          },
                          "owners_profile_employee_type_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner employee types"
                          },
                          "owners_profile_custom_field_1_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner custom field 1"
                          },
                          "owners_profile_custom_field_2_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner custom field 2"
                          },
                          "owners_profile_custom_field_3_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner custom field 3"
                          },
                          "owners_profile_custom_field_4_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner custom field 4"
                          },
                          "owners_profile_custom_field_5_in": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Filter by owner custom field 5"
                          }
                        },
                        "additionalProperties": false
                      },
                      "preferences": {
                        "type": "object",
                        "properties": {
                          "reports": {
                            "type": "object",
                            "properties": {
                              "okrs_with_checkins": {
                                "type": "object",
                                "properties": {
                                  "slice_by": {
                                    "type": "string",
                                    "enum": [
                                      "team",
                                      "manager",
                                      "user",
                                      "custom_field_1",
                                      "custom_field_2",
                                      "custom_field_3",
                                      "custom_field_4",
                                      "custom_field_5"
                                    ],
                                    "description": "Report slice_by value"
                                  },
                                  "granularity": {
                                    "type": "string",
                                    "enum": [
                                      "weekly",
                                      "monthly",
                                      "quarterly",
                                      "yearly"
                                    ],
                                    "description": "Report granularity"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "checkin_cycle_compliance": {
                                "type": "object",
                                "properties": {
                                  "slice_by": {
                                    "type": "string",
                                    "enum": [
                                      "team",
                                      "manager",
                                      "user",
                                      "custom_field_1",
                                      "custom_field_2",
                                      "custom_field_3",
                                      "custom_field_4",
                                      "custom_field_5"
                                    ],
                                    "description": "Report slice_by value"
                                  },
                                  "granularity": {
                                    "type": "string",
                                    "enum": [
                                      "weekly",
                                      "monthly",
                                      "quarterly",
                                      "yearly"
                                    ],
                                    "description": "Report granularity"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "okrs_with_alignment": {
                                "type": "object",
                                "properties": {
                                  "slice_by": {
                                    "type": "string",
                                    "enum": [
                                      "team",
                                      "manager",
                                      "user",
                                      "custom_field_1",
                                      "custom_field_2",
                                      "custom_field_3",
                                      "custom_field_4",
                                      "custom_field_5"
                                    ],
                                    "description": "Report slice_by value"
                                  },
                                  "granularity": {
                                    "type": "string",
                                    "enum": [
                                      "weekly",
                                      "monthly",
                                      "quarterly",
                                      "yearly"
                                    ],
                                    "description": "Report granularity"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "users_with_okrs": {
                                "type": "object",
                                "properties": {
                                  "slice_by": {
                                    "type": "string",
                                    "enum": [
                                      "team",
                                      "manager",
                                      "user",
                                      "custom_field_1",
                                      "custom_field_2",
                                      "custom_field_3",
                                      "custom_field_4",
                                      "custom_field_5"
                                    ],
                                    "description": "Report slice_by value"
                                  },
                                  "granularity": {
                                    "type": "string",
                                    "enum": [
                                      "weekly",
                                      "monthly",
                                      "quarterly",
                                      "yearly"
                                    ],
                                    "description": "Report granularity"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "okrs_with_integrations": {
                                "type": "object",
                                "properties": {
                                  "slice_by": {
                                    "type": "string",
                                    "enum": [
                                      "team",
                                      "manager",
                                      "user",
                                      "custom_field_1",
                                      "custom_field_2",
                                      "custom_field_3",
                                      "custom_field_4",
                                      "custom_field_5"
                                    ],
                                    "description": "Report slice_by value"
                                  },
                                  "granularity": {
                                    "type": "string",
                                    "enum": [
                                      "weekly",
                                      "monthly",
                                      "quarterly",
                                      "yearly"
                                    ],
                                    "description": "Report granularity"
                                  }
                                },
                                "additionalProperties": false
                              },
                              "performance_report": {
                                "type": "object",
                                "properties": {
                                  "slice_by": {
                                    "type": "string",
                                    "enum": [
                                      "team",
                                      "manager",
                                      "user",
                                      "custom_field_1",
                                      "custom_field_2",
                                      "custom_field_3",
                                      "custom_field_4",
                                      "custom_field_5"
                                    ],
                                    "description": "Report slice_by value"
                                  },
                                  "granularity": {
                                    "type": "string",
                                    "enum": [
                                      "weekly",
                                      "monthly",
                                      "quarterly",
                                      "yearly"
                                    ],
                                    "description": "Report granularity"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "name"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "explorer_view"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created explorer view details",
            "headers": {},
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "Type of the explorer view"
                        },
                        "record": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Explorer view object"
                        },
                        "checks": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Boolean flags for each permission check"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "record",
                        "checks"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Creates a new explorer view (ObjectiveView, InitiativeView, or ReportsView) with the provided attributes."
      }
    },
    "/explorer_views/{id}/labels": {
      "put": {
        "tags": [
          "explorer_views"
        ],
        "operationId": "put_explorer_views_id_labels",
        "summary": "Replace the labels on a view",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<explorer_view_uuid>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label_uuids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The complete set of label UUIDs the view should carry"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "label_uuids"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Sets the view's labels to exactly `label_uuids`, attaching and detaching as\nneeded in one transaction. Send an empty array to remove all labels.\nRequires edit permission.\n"
      }
    },
    "/internal/eval_harness/source_manifests": {
      "post": {
        "tags": [
          "source_manifests"
        ],
        "operationId": "post_internal_eval_harness_source_manifests",
        "summary": "Capture eval-harness source evidence",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tenant_uuid": {
                    "type": "string"
                  },
                  "catalog_content_hash": {
                    "type": "string"
                  },
                  "catalog_schema_version": {
                    "type": "number"
                  },
                  "catalog": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "manifest": {
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "additionalProperties": false,
                "required": [
                  "tenant_uuid",
                  "catalog_content_hash",
                  "catalog_schema_version",
                  "manifest"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Idempotently stores one sanitized production source manifest and its deduplicated effective catalog."
      }
    },
    "/internal/notifications/send": {
      "post": {
        "tags": [
          "notifications"
        ],
        "operationId": "post_internal_notifications_send",
        "summary": "Send a notification to a specific user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notification_kind": {
                    "type": "string",
                    "description": "Optional notification kind. For 'playbook_budget_exceeded', playbook_run_uuid is required and recipient, title, and message are derived from the run."
                  },
                  "recipient_user_uuid": {
                    "type": "string",
                    "description": "UUID of the user who should receive the notification. Required unless notification_kind is 'playbook_budget_exceeded'"
                  },
                  "thread_uuid": {
                    "type": "string",
                    "description": "UUID of the conversation thread to deep link to"
                  },
                  "playbook_run_uuid": {
                    "type": "string",
                    "description": "UUID of the playbook run. Required when notification_kind is 'playbook_budget_exceeded'"
                  },
                  "title": {
                    "type": "string",
                    "description": "Short title for the notification (2-3 words). Required unless notification_kind is 'playbook_budget_exceeded'"
                  },
                  "message": {
                    "type": "string",
                    "description": "Detailed message content. Required unless notification_kind is 'playbook_budget_exceeded'"
                  },
                  "channel": {
                    "type": "string",
                    "default": "auto",
                    "description": "Notification channel: 'slack', 'email', or 'auto'"
                  },
                  "dedupe_key": {
                    "type": "string",
                    "description": "Optional idempotency key to suppress duplicate notifications for the same recipient"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Sends a notification to a specific user within the current tenant using internal authentication.\n\nThis endpoint is intended for backend-triggered notifications where the originating user JWT\nmay no longer be valid by the time the notification is sent. Default notifications require\nrecipient_user_uuid, title, and message. For a playbook_budget_exceeded notification,\nprovide playbook_run_uuid; the recipient and content are derived from the run.\n"
      }
    },
    "/internal/replay/cases": {
      "get": {
        "tags": [
          "cases"
        ],
        "operationId": "get_internal_replay_cases",
        "summary": "Fetch one frozen replay case",
        "parameters": [
          {
            "name": "tenant_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "chat_message",
                "playbook_run"
              ]
            }
          },
          {
            "name": "target_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Returns the immutable tenant-scoped case snapshot stored for one durable replay unit."
      }
    },
    "/internal/replay/results": {
      "post": {
        "tags": [
          "results"
        ],
        "operationId": "post_internal_replay_results",
        "summary": "Persist replay results",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tenant_uuid": {
                    "type": "string"
                  },
                  "run_id": {
                    "type": "string"
                  },
                  "target_message_uuid": {
                    "type": "string"
                  },
                  "target": {
                    "type": "object",
                    "properties": {
                      "target_type": {
                        "type": "string"
                      },
                      "target_uuid": {
                        "type": "string"
                      },
                      "source_message_uuid": {
                        "type": "string"
                      },
                      "thread_uuid": {
                        "type": "string"
                      },
                      "playbook_uuid": {
                        "type": "string"
                      },
                      "playbook_run_uuid": {
                        "type": "string"
                      },
                      "trigger_type": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "target_type",
                      "target_uuid",
                      "source_message_uuid"
                    ]
                  },
                  "results": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                },
                "additionalProperties": false,
                "required": [
                  "tenant_uuid",
                  "run_id",
                  "target_message_uuid",
                  "target",
                  "results"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Idempotently stores report-only candidate, evaluator, fidelity, latency, cost, and error data for one frozen target/model unit."
      }
    },
    "/internal/replay/runs/{run_id}/results/status": {
      "get": {
        "tags": [
          "results"
        ],
        "operationId": "get_internal_replay_runs_run_id_results_status",
        "summary": "Fetch one frozen replay unit status",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "chat_message",
                "playbook_run"
              ]
            }
          },
          {
            "name": "target_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Lets a retried Temporal activity skip candidate and evaluator calls after its result was already committed."
      }
    },
    "/internal/replay/runs/{run_id}/status": {
      "post": {
        "tags": [
          "results"
        ],
        "operationId": "post_internal_replay_runs_run_id_status",
        "summary": "Finalize a durable replay run",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tenant_uuid": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "partial",
                      "failed"
                    ]
                  },
                  "completed": {
                    "type": "number"
                  },
                  "failed": {
                    "type": "number"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "tenant_uuid",
                  "status",
                  "completed",
                  "failed"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Reconciles retry-exhausted units as failed and freezes the final R-star aggregate after the Temporal workflow completes."
      }
    },
    "/labels": {
      "get": {
        "tags": [
          "labels"
        ],
        "operationId": "get_labels",
        "summary": "List labels",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number for pagination (default: 1)",
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Number of records per page (default: 20, max: 100)",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Alias for per_page - number of records per page",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit_max",
            "in": "query",
            "description": "Maximum number of records per page (overrides limit if not set)",
            "schema": {
              "type": "number",
              "default": null
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Set to 'true' to include total count in pagy metadata (data.pagy.count). Use for count/total queries instead of paginating through all pages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Ransack query parameters for filtering. In query strings, use bracket notation: q[name_cont]=john&q[status_eq]=active&q[s]=name+asc. Keys are attribute names with predicates: _cont (contains), _eq (equals), _in (array membership), _gteq (>=), _lteq (<=), _present (not null), _null (is null). The \"s\" key sorts results (e.g., q[s]=created_at+desc). Example query string: ?q[name_cont]=john&q[s]=name+asc filters names containing \"john\" sorted by name ascending.",
            "required": false,
            "schema": {
              "type": "object",
              "additionalProperties": true
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Retrieves all the labels and label groups available\n\nThis endpoint supports filtering and pagination through query parameters. Available ransackable attributes: uuid, name, parent_uuid, is_group.\n\nAvailable ransackable associations and their attributes:\n- parent: parent_uuid, parent_name, parent_parent_uuid, parent_is_group"
      },
      "post": {
        "tags": [
          "labels"
        ],
        "operationId": "post_labels",
        "summary": "Create a new label",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "Label name (unique within tenant)"
                      },
                      "description": {
                        "type": "string",
                        "default": null,
                        "description": "Label description"
                      },
                      "parent_uuid": {
                        "type": "string",
                        "default": null,
                        "description": "UUID of parent label (parent must be a group)"
                      },
                      "is_group": {
                        "type": "boolean",
                        "default": false,
                        "description": "Whether this label is a group (groups cannot have parents)"
                      },
                      "color": {
                        "type": "string",
                        "default": null,
                        "description": "Hex color code (e.g. #eb5757)"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "name"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "label"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Creates a new label with the provided attributes. Labels can be regular labels or groups (used for categorization). Admins only. For a label group, set is_group=true and do not set parent_uuid. To add a label to a group, create a new label with parent_uuid set to the group UUID."
      }
    },
    "/labels/{id}": {
      "put": {
        "tags": [
          "labels"
        ],
        "operationId": "put_labels_id",
        "summary": "Update a label",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "<tenant_uuid>_<label_uuid>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "default": null,
                        "description": "Label name (unique within tenant)"
                      },
                      "description": {
                        "type": "string",
                        "default": null,
                        "description": "Label description"
                      },
                      "parent_uuid": {
                        "type": "string",
                        "default": null,
                        "description": "UUID of parent label group, or blank to move the label to the root"
                      },
                      "color": {
                        "type": "string",
                        "default": null,
                        "description": "Hex color code (e.g. #eb5757), or blank to clear"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "label"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Updates an existing label or label group with the specified attributes. Admins only. Non-group labels can be moved between groups or back to the root by updating parent_uuid."
      },
      "delete": {
        "tags": [
          "labels"
        ],
        "operationId": "delete_labels_id",
        "summary": "Delete a label",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Label UUID.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Deletes a label or label group. Deleting a group also deletes its child labels. Admins only."
      }
    },
    "/{shareable_type}/{shareable_uuid}/mention_access_check": {
      "get": {
        "tags": [
          "mention_access_checks"
        ],
        "operationId": "get_shareable_type_shareable_uuid_mention_access_check",
        "summary": "Check which mentioned entities lack access",
        "parameters": [
          {
            "name": "shareable_type",
            "in": "path",
            "required": true,
            "description": "Allowed shareable type segment (e.g. 'documents')",
            "schema": {
              "type": "string",
              "enum": [
                "okrs-dashboards",
                "documents",
                "explorer-views",
                "connections",
                "playbooks",
                "solutions",
                "skills"
              ]
            }
          },
          {
            "name": "shareable_uuid",
            "in": "path",
            "required": true,
            "description": "Shareable identifier (composite primary key or UUID)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "user_uuids",
            "in": "query",
            "description": "UUIDs of mentioned users to check",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "team_uuids",
            "in": "query",
            "description": "UUIDs of mentioned teams to check",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          }
        },
        "description": "Reports which mentioned users and teams lack view access to a shareable and\nwhether the caller may grant them access. Powers the proactive\n\"grant access at mention\" flow across every shareable type.\n"
      }
    },
    "/okrs/objectives/show": {
      "get": {
        "tags": [
          "objectives"
        ],
        "operationId": "get_okrs_objectives_show",
        "summary": "Get a specific OKR",
        "parameters": [
          {
            "name": "uuid",
            "in": "query",
            "required": true,
            "description": "OKR UUID or human readable short ID (e.g., OBJ-001, KR-001, INIT-001)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Retrieves detailed information about a specific OKR (Objective, Key Result, or Initiative) by UUID"
      }
    },
    "/okrs/time_periods": {
      "get": {
        "tags": [
          "time_periods"
        ],
        "operationId": "get_okrs_time_periods",
        "summary": "List all time periods",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number for pagination (default: 1)",
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Number of records per page (default: 20, max: 100)",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Alias for per_page - number of records per page",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit_max",
            "in": "query",
            "description": "Maximum number of records per page (overrides limit if not set)",
            "schema": {
              "type": "number",
              "default": null
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Set to 'true' to include total count in pagy metadata (data.pagy.count). Use for count/total queries instead of paginating through all pages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Ransack query parameters for filtering. In query strings, use bracket notation: q[name_cont]=john&q[status_eq]=active&q[s]=name+asc. Keys are attribute names with predicates: _cont (contains), _eq (equals), _in (array membership), _gteq (>=), _lteq (<=), _present (not null), _null (is null). The \"s\" key sorts results (e.g., q[s]=created_at+desc). Example query string: ?q[name_cont]=john&q[s]=name+asc filters names containing \"john\" sorted by name ascending.",
            "required": false,
            "schema": {
              "type": "object",
              "additionalProperties": true
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Retrieves all time periods for the current tenant.\n\nTime periods are automatically ordered with active periods appearing first,\nfollowed by other periods in chronological order. Active time periods are\ndetermined by the current tenant's OKR cycle settings.\n\n\nThis endpoint supports filtering and pagination through query parameters. Available ransackable attributes: uuid, name."
      }
    },
    "/okrs/time_periods/{id}": {
      "put": {
        "tags": [
          "time_periods"
        ],
        "operationId": "put_okrs_time_periods_id",
        "summary": "Update a time period",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Time period UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "time_period": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "default": null,
                        "description": "Name of the time period"
                      },
                      "start_date": {
                        "type": "string",
                        "default": null,
                        "description": "Start date of the time period (YYYY-MM-DD)"
                      },
                      "end_date": {
                        "type": "string",
                        "default": null,
                        "description": "End date of the time period (YYYY-MM-DD)"
                      },
                      "parent_uuid": {
                        "type": "string",
                        "default": null,
                        "description": "UUID of parent time period for hierarchical periods"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "time_period"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Updates an existing time period with the specified attributes.\n\nTime periods help you organize your OKRs into different blocks of time.\nOptionally, you can update the parent-child relationship between time periods\nto form a hierarchy.\n"
      },
      "delete": {
        "tags": [
          "time_periods"
        ],
        "operationId": "delete_okrs_time_periods_id",
        "summary": "Delete a time period",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Time period UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Deletes a time period.\n\nA time period cannot be deleted if it is the last remaining time period,\nor if it has associated objectives, key results, or initiatives.\n"
      }
    },
    "/operating_memory": {
      "delete": {
        "tags": [
          "operating_memory"
        ],
        "operationId": "delete_operating_memory",
        "summary": "Clear all operating memory",
        "responses": {
          "200": {
            "description": "Operating Memory cleared",
            "headers": {},
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "type": "string",
                          "description": "Completed operation"
                        },
                        "cleared": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "Number of deleted records by table"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "operation",
                        "cleared"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Permanently clears all Operating Memory for the current workspace. Only workspace administrators may perform this action."
      }
    },
    "/operating_memory/reingest": {
      "post": {
        "tags": [
          "operating_memory"
        ],
        "operationId": "post_operating_memory_reingest",
        "summary": "Reingest P1 Operating Memory entities",
        "responses": {
          "202": {
            "description": "Operating Memory reingest queued",
            "headers": {},
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "type": "string",
                          "description": "Queued operation"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "operation"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Rebuilds Operating Memory projections for the workspace's users, teams, time periods, and goals. Only workspace administrators may perform this action."
      }
    },
    "/slack/add/tenants": {
      "get": {
        "tags": [
          "slack_installations"
        ],
        "operationId": "get_slack_add_tenants",
        "summary": "List Rhythms tenants available for a website Slack installation",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer installation token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Lists the installer's Rhythms tenant memberships using the short-lived token issued after Slack OAuth."
      }
    },
    "/slack/add/tenants/complete": {
      "post": {
        "tags": [
          "slack_installations"
        ],
        "operationId": "post_slack_add_tenants_complete",
        "summary": "Choose a Rhythms tenant for a website Slack installation",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer installation token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tenant_uuid": {
                    "type": "string",
                    "description": "Selected Rhythms tenant UUID"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "tenant_uuid"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Revalidates tenant admin access, creates the Slack connection, and returns the next login-free handoff."
      }
    },
    "/slack/add/channels": {
      "get": {
        "tags": [
          "slack_installations"
        ],
        "operationId": "get_slack_add_channels",
        "summary": "List public Slack channels for a website installation",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer installation token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Lists channels the bot can join using the short-lived installation token issued after Slack OAuth."
      }
    },
    "/slack/add/channels/complete": {
      "post": {
        "tags": [
          "slack_installations"
        ],
        "operationId": "post_slack_add_channels_complete",
        "summary": "Complete channel selection for a website installation",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Bearer installation token",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "default": [],
                    "description": "Public Slack channel IDs selected by the installer"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Joins the selected public channels, queues the installer's onboarding DM, and consumes the installation token."
      }
    },
    "/sidebar_preference": {
      "get": {
        "tags": [
          "sidebar_preferences"
        ],
        "operationId": "get_sidebar_preference",
        "summary": "Get sidebar preferences",
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Returns the authenticated user's persisted sidebar ordering and visibility preferences."
      },
      "patch": {
        "tags": [
          "sidebar_preferences"
        ],
        "operationId": "patch_sidebar_preference",
        "summary": "Update sidebar preferences",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sidebar_preference": {
                    "type": "object",
                    "properties": {
                      "section_order": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Ordered sidebar section keys"
                      },
                      "favorite_order": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Ordered favorite item keys"
                      },
                      "workspace_order": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Ordered workspace item keys"
                      },
                      "favorite_visible_count": {
                        "type": "string",
                        "description": "Visible favorites count from 0 to 100, or off"
                      },
                      "workspace_visible_count": {
                        "type": "string",
                        "description": "Visible workspace count from 0 to 100, or off"
                      },
                      "recent_visible_count": {
                        "type": "number",
                        "description": "Visible recent-item count from 0 to 100"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "sidebar_preference"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Merges the supplied sidebar ordering and visibility fields into the authenticated user's persisted preferences."
      }
    },
    "/teams": {
      "get": {
        "tags": [
          "teams"
        ],
        "operationId": "get_teams",
        "summary": "List teams and include current owners",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number for pagination (default: 1)",
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Number of records per page (default: 20, max: 100)",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Alias for per_page - number of records per page",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit_max",
            "in": "query",
            "description": "Maximum number of records per page (overrides limit if not set)",
            "schema": {
              "type": "number",
              "default": null
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Set to 'true' to include total count in pagy metadata (data.pagy.count). Use for count/total queries instead of paginating through all pages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Ransack query parameters for filtering. In query strings, use bracket notation: q[name_cont]=john&q[status_eq]=active&q[s]=name+asc. Keys are attribute names with predicates: _cont (contains), _eq (equals), _in (array membership), _gteq (>=), _lteq (<=), _present (not null), _null (is null). The \"s\" key sorts results (e.g., q[s]=created_at+desc). Example query string: ?q[name_cont]=john&q[s]=name+asc filters names containing \"john\" sorted by name ascending.",
            "required": false,
            "schema": {
              "type": "object",
              "additionalProperties": true
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Retrieves all teams. Use this to identify the correct team first; the serialized team data includes current owners. Combine this with the members endpoint when you need the full team roster.\n\nThis endpoint supports filtering and pagination through query parameters. Available ransackable attributes: uuid, display_name, parent_uuid, status, display_name, is_org, parent_uuid, depth.\n\nAvailable ransackable associations and their attributes:\n- team_memberships: team_memberships_uuid, team_memberships_user_uuid"
      },
      "post": {
        "tags": [
          "teams"
        ],
        "operationId": "post_teams",
        "summary": "Create a new team",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team": {
                    "type": "object",
                    "properties": {
                      "display_name": {
                        "type": "string",
                        "description": "Team display name"
                      },
                      "description": {
                        "type": "string",
                        "default": null,
                        "description": "Team description"
                      },
                      "parent_uuid": {
                        "type": "string",
                        "default": null,
                        "description": "Parent team UUID"
                      },
                      "owner_uuids": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "default": [],
                        "description": "Array of user UUIDs to be team owners in the format [\"uuid-1\", \"uuid-2\"]"
                      },
                      "member_uuids": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "default": [],
                        "description": "Array of user UUIDs to be team members in the format [\"uuid-1\", \"uuid-2\"]"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "display_name"
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Creates a new team with the specified attributes, owners, and members"
      }
    },
    "/teams/{id}": {
      "put": {
        "tags": [
          "teams"
        ],
        "operationId": "put_teams_id",
        "summary": "Update a team",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Team UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "team": {
                    "type": "object",
                    "properties": {
                      "display_name": {
                        "type": "string",
                        "default": null,
                        "description": "Team display name"
                      },
                      "description": {
                        "type": "string",
                        "default": null,
                        "description": "Team description"
                      },
                      "parent_uuid": {
                        "type": "string",
                        "default": null,
                        "description": "Parent team UUID"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "active",
                          "archived"
                        ],
                        "default": null,
                        "description": "Team status (active or archived)"
                      },
                      "owner_uuids": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "default": [],
                        "description": "Complete list of user UUIDs to be team owners. REPLACES all existing owners - include ALL owners you want to keep."
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false,
                "required": [
                  "team"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Updates team attributes and manages team owners.\n\nOWNER MANAGEMENT:\n- Pass owner_uuids to set the complete list of team owners\n- Users in the array become owners, users not in the array are removed as owners\n- To add an owner: include all existing owners plus the new one\n- To remove an owner: include all owners except the one to remove\n"
      }
    },
    "/teams/{id}/add_members": {
      "put": {
        "tags": [
          "teams"
        ],
        "operationId": "put_teams_id_add_members",
        "summary": "Add members to a team",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Team UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "member_uuids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Array of user UUIDs to add as members"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "member_uuids"
                ]
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Adds users as members to the team. Existing members are preserved. Use this for adding members without needing the full member list."
      }
    },
    "/teams/{id}/remove_member/{member_uuid}": {
      "delete": {
        "tags": [
          "teams"
        ],
        "operationId": "delete_teams_id_remove_member_member_uuid",
        "summary": "Remove one person from a team",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Team UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_uuid",
            "in": "path",
            "required": true,
            "description": "UUID of member to remove",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Removes a single person from the team.\n\nUse this for one-off removals without sending the full member list.\nFor bulk removals, call this endpoint once per person.\nThis endpoint can remove both regular members and owners.\n"
      }
    },
    "/teams/{id}/owners": {
      "get": {
        "tags": [
          "teams"
        ],
        "operationId": "get_teams_id_owners",
        "summary": "Get team owners only",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Team UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Items per page",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          }
        },
        "description": "Returns team owners with their UUIDs, names, and emails.\n\nThis endpoint only returns owners.\nCombine it with the members endpoint when you need the full team roster\nor when the user asks to remove everyone including owners.\n"
      }
    },
    "/teams/{id}/members": {
      "get": {
        "tags": [
          "teams"
        ],
        "operationId": "get_teams_id_members",
        "summary": "Get regular team members only",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Team UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Items per page",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok"
          }
        },
        "description": "Returns regular team members with their UUIDs, names, and emails.\n\nOwners are intentionally excluded from this response.\nCombine this endpoint with the team or owners endpoint when the user asks\nwho is on the team or when you need the full team roster.\n"
      }
    },
    "/users": {
      "get": {
        "tags": [
          "users"
        ],
        "operationId": "get_users",
        "summary": "List users",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number for pagination (default: 1)",
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Number of records per page (default: 20, max: 100)",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Alias for per_page - number of records per page",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "limit_max",
            "in": "query",
            "description": "Maximum number of records per page (overrides limit if not set)",
            "schema": {
              "type": "number",
              "default": null
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Set to 'true' to include total count in pagy metadata (data.pagy.count). Use for count/total queries instead of paginating through all pages.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Ransack query parameters for filtering. In query strings, use bracket notation: q[name_cont]=john&q[status_eq]=active&q[s]=name+asc. Keys are attribute names with predicates: _cont (contains), _eq (equals), _in (array membership), _gteq (>=), _lteq (<=), _present (not null), _null (is null). The \"s\" key sorts results (e.g., q[s]=created_at+desc). Example query string: ?q[name_cont]=john&q[s]=name+asc filters names containing \"john\" sorted by name ascending.",
            "required": false,
            "schema": {
              "type": "object",
              "additionalProperties": true
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request - Invalid parameters or malformed request"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - User lacks permission to access this resource"
          },
          "404": {
            "description": "Not Found - Resource does not exist"
          },
          "422": {
            "description": "Unprocessable Entity - Invalid request parameters or validation errors"
          },
          "429": {
            "description": "Too Many Requests - Rate limit exceeded"
          },
          "500": {
            "description": "Internal Server Error - Unexpected server error"
          }
        },
        "description": "Retrieves all the users\n\nThis endpoint supports filtering and pagination through query parameters. Available ransackable attributes: uuid, display_name, status, manager_uuid, license_type, display_name, status, manager_uuid, license_type.\n\nAvailable ransackable associations and their attributes:\n- direct_teams: direct_teams_uuid, direct_teams_display_name, direct_teams_parent_uuid, direct_teams_status, direct_teams_display_name, direct_teams_is_org, direct_teams_parent_uuid, direct_teams_depth\n- team_memberships: team_memberships_uuid, team_memberships_user_uuid\n- profile: profile_uuid, profile_first_name, profile_last_name, profile_job_title, profile_employee_type, profile_department_name, profile_division_name, profile_cost_center_name, profile_about, profile_custom_field_1, profile_custom_field_2, profile_custom_field_3, profile_custom_field_4, profile_custom_field_5\n- manager: manager_uuid, manager_display_name, manager_status, manager_manager_uuid, manager_license_type, manager_display_name, manager_status, manager_manager_uuid, manager_license_type"
      }
    }
  },
  "tags": [],
  "security": [],
  "servers": [
    {
      "url": "https://api.rhythms.ai"
    }
  ]
}