{
  "components": {
    "schemas": {
      "AcceptInviteIn": {
        "additionalProperties": false,
        "description": "The token from the invitation link.\n\nIn the body rather than the path, so it does not end up in an access log, a\nbrowser history entry, or a `Referer` header on the way to whatever the page\nloads next.",
        "properties": {
          "token": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "title": "AcceptInviteIn",
        "type": "object"
      },
      "AccountChoiceOut": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "picture_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Picture Url"
          }
        },
        "required": [
          "id",
          "name",
          "picture_url"
        ],
        "title": "AccountChoiceOut",
        "type": "object"
      },
      "AccountExportOut": {
        "description": "Everything kept about the signed-in person outside the workspaces' content, as JSON: the account, sign-in methods and sessions, the profile, memberships, the consent log, notification settings, referrals and the mail log. Password hashes and tokens are left out.",
        "properties": {
          "account": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account"
          },
          "consents": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Consents",
            "type": "array"
          },
          "emails": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Emails",
            "type": "array"
          },
          "exported_at": {
            "title": "Exported At",
            "type": "string"
          },
          "format": {
            "enum": [
              "publedia-account-export"
            ],
            "title": "Format",
            "type": "string"
          },
          "notification_preferences": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Notification Preferences",
            "type": "array"
          },
          "profile": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Profile"
          },
          "referral_codes": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Referral Codes",
            "type": "array"
          },
          "referral_rewards": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Referral Rewards",
            "type": "array"
          },
          "referrals": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Referrals",
            "type": "array"
          },
          "sessions": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Sessions",
            "type": "array"
          },
          "sign_in_methods": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Sign In Methods",
            "type": "array"
          },
          "version": {
            "title": "Version",
            "type": "integer"
          },
          "workspaces": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Workspaces",
            "type": "array"
          }
        },
        "required": [
          "format",
          "version",
          "exported_at",
          "account",
          "sign_in_methods",
          "sessions",
          "profile",
          "workspaces",
          "consents",
          "notification_preferences",
          "referral_codes",
          "referral_rewards",
          "referrals",
          "emails"
        ],
        "title": "AccountExportOut",
        "type": "object"
      },
      "AccountKeyCreateIn": {
        "additionalProperties": false,
        "properties": {
          "default_workspace_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where reads go when a call names no workspace. A key that reaches one needs none. With `workspaces` left out, it is the caller's open workspace if the key reaches it, else the one they joined first.",
            "title": "Default Workspace Id"
          },
          "expires_in_days": {
            "anyOf": [
              {
                "enum": [
                  30
                ],
                "type": "number"
              },
              {
                "enum": [
                  90
                ],
                "type": "number"
              },
              {
                "enum": [
                  365
                ],
                "type": "number"
              }
            ],
            "description": "How many days the key works: 30, 90 or 365.",
            "title": "Expires In Days"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "scopes": {
            "description": "The scopes in each workspace when `workspaces` is left out; not accepted with it. Left out: read, post_draft, media_upload.",
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "minItems": 1,
            "title": "Scopes",
            "type": "array"
          },
          "workspaces": {
            "description": "The workspaces the key reaches. Left out, every workspace the caller administers that has assistants turned on now.",
            "items": {
              "$ref": "#/components/schemas/AccountKeyWorkspaceIn"
            },
            "maxItems": 50,
            "minItems": 1,
            "title": "Workspaces",
            "type": "array"
          }
        },
        "required": [
          "name",
          "expires_in_days"
        ],
        "title": "AccountKeyCreateIn",
        "type": "object"
      },
      "AccountKeyOut": {
        "description": "A personal key as it can safely be listed, with the workspaces it reaches.",
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "default_workspace_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Workspace Id"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last4"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "last_used_client": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used Client"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Secret Expires At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "workspaces": {
            "items": {
              "$ref": "#/components/schemas/AccountKeyWorkspaceOut"
            },
            "title": "Workspaces",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "last4",
          "default_workspace_id",
          "expires_at",
          "revoked_at",
          "last_used_at",
          "last_used_client",
          "previous_secret_expires_at",
          "created_at",
          "active",
          "workspaces"
        ],
        "title": "AccountKeyOut",
        "type": "object"
      },
      "AccountKeyWorkspaceIn": {
        "additionalProperties": false,
        "properties": {
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "minItems": 1,
            "title": "Scopes",
            "type": "array"
          },
          "workspace_id": {
            "format": "uuid",
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "scopes"
        ],
        "title": "AccountKeyWorkspaceIn",
        "type": "object"
      },
      "AccountKeyWorkspaceOut": {
        "properties": {
          "key_id": {
            "format": "uuid",
            "title": "Key Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "title": "Scopes",
            "type": "array"
          },
          "workspace_id": {
            "format": "uuid",
            "title": "Workspace Id",
            "type": "string"
          },
          "workspace_name": {
            "title": "Workspace Name",
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "workspace_name",
          "key_id",
          "scopes",
          "revoked_at",
          "last_used_at"
        ],
        "title": "AccountKeyWorkspaceOut",
        "type": "object"
      },
      "AccountStatsState": {
        "enum": [
          "collected",
          "collecting",
          "not_shared",
          "reconnect_required",
          "paused"
        ],
        "title": "AccountStatsState",
        "type": "string"
      },
      "AiActivityOut": {
        "properties": {
          "actor_kind": {
            "$ref": "#/components/schemas/AiActorKind"
          },
          "actor_profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Profile Id"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "model_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Id"
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/AiCallOutcome"
          },
          "tool_name": {
            "title": "Tool Name",
            "type": "string"
          },
          "total_tokens": {
            "title": "Total Tokens",
            "type": "integer"
          }
        },
        "required": [
          "occurred_at",
          "tool_name",
          "outcome",
          "actor_kind",
          "actor_profile_id",
          "model_id",
          "total_tokens",
          "error_message"
        ],
        "title": "AiActivityOut",
        "type": "object"
      },
      "AiActorKind": {
        "description": "Who made an AI tool call: a member, a workspace API key, or a schedule.\n\n`AUTOMATION` covers work an automation run did on its own: an integration read\nfired by a scheduled graph has no acting human and no key, and attributing it\nto whoever drew the graph months ago would put a name on a call that person\nwas not present for.",
        "enum": [
          "session",
          "api_key",
          "automation"
        ],
        "title": "AiActorKind",
        "type": "string"
      },
      "AiCallOutcome": {
        "description": "How an AI tool call ended, recorded on every audit event.",
        "enum": [
          "succeeded",
          "failed",
          "denied",
          "budget_exceeded"
        ],
        "title": "AiCallOutcome",
        "type": "string"
      },
      "AiChatIn": {
        "additionalProperties": false,
        "description": "One turn from the dock.\n\n`route` rather than a scope, because the scope is derived from the route by\na single source-owned mapping. A client that could name its own scope could\nask for the composer's tools from the settings page, which is the one thing\nthe allowlist exists to prevent.",
        "properties": {
          "conversation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id"
          },
          "message": {
            "maxLength": 4000,
            "minLength": 1,
            "title": "Message",
            "type": "string"
          },
          "route": {
            "default": "",
            "maxLength": 512,
            "title": "Route",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "AiChatIn",
        "type": "object"
      },
      "AiConversationCreateIn": {
        "additionalProperties": false,
        "description": "Reserve a conversation id ahead of the first message.\n\n`route` rather than a scope, for the same reason `AiChatIn.route` is: the\nscope is derived from a single source-owned mapping, not named by the\nclient.",
        "properties": {
          "route": {
            "default": "",
            "maxLength": 512,
            "title": "Route",
            "type": "string"
          }
        },
        "title": "AiConversationCreateIn",
        "type": "object"
      },
      "AiConversationMessageOut": {
        "description": "One stored turn, for reopening a thread.\n\n`tool_calls` is omitted deliberately: it is the model provider's wire format, and\nthe history view shows what was said, not how it was fetched.",
        "properties": {
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/AiMessageRole"
          },
          "tool_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Name"
          }
        },
        "required": [
          "role",
          "content",
          "tool_name",
          "created_at"
        ],
        "title": "AiConversationMessageOut",
        "type": "object"
      },
      "AiConversationOut": {
        "description": "One past conversation, as the dock's history list shows it.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "message_count": {
            "title": "Message Count",
            "type": "integer"
          },
          "scope": {
            "title": "Scope",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "scope",
          "updated_at",
          "message_count"
        ],
        "title": "AiConversationOut",
        "type": "object"
      },
      "AiFieldGenerateIn": {
        "additionalProperties": false,
        "properties": {
          "context": {
            "default": "",
            "maxLength": 4000,
            "title": "Context",
            "type": "string"
          },
          "count": {
            "anyOf": [
              {
                "maximum": 30.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Count"
          },
          "kind": {
            "$ref": "#/components/schemas/AiFieldKind"
          },
          "tone": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AiTone"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind"
        ],
        "title": "AiFieldGenerateIn",
        "type": "object"
      },
      "AiFieldGenerateOut": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/AiFieldKind"
          },
          "values": {
            "items": {
              "type": "string"
            },
            "title": "Values",
            "type": "array"
          }
        },
        "required": [
          "kind",
          "values"
        ],
        "title": "AiFieldGenerateOut",
        "type": "object"
      },
      "AiFieldKind": {
        "description": "A field a person can ask the model to fill in.\n\nEach member names a destination in the product, not a prompt style, because\nthe destination is what determines the length, the count, and the validator.",
        "enum": [
          "automation_name",
          "brand_description",
          "caption",
          "themes",
          "hashtags",
          "call_to_action",
          "rewrite_instructions",
          "blocked_topics",
          "video_hook",
          "video_body"
        ],
        "title": "AiFieldKind",
        "type": "string"
      },
      "AiMemberUsageOut": {
        "description": "One actor's share of the month.\n\n`actor_profile_id` carries no name because profiles mirror `identity.users`\nand hold none. The client knows who it is signed in as and\nlabels its own row; the rest stay ids rather than the product growing a\nsecond copy of identity data.",
        "properties": {
          "actor_kind": {
            "$ref": "#/components/schemas/AiActorKind"
          },
          "actor_profile_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Profile Id"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "tool_calls": {
            "title": "Tool Calls",
            "type": "integer"
          },
          "total_tokens": {
            "title": "Total Tokens",
            "type": "integer"
          },
          "turns": {
            "title": "Turns",
            "type": "integer"
          }
        },
        "required": [
          "actor_profile_id",
          "actor_kind",
          "turns",
          "tool_calls",
          "input_tokens",
          "output_tokens",
          "total_tokens"
        ],
        "title": "AiMemberUsageOut",
        "type": "object"
      },
      "AiMessageRole": {
        "description": "Who produced one stored conversation message.\n\nThere is deliberately no `SYSTEM` member. The system prompt is source-owned\nand versioned with the code, so storing a copy per conversation would pin\nold conversations to an old prompt with no way to tell which one they got.",
        "enum": [
          "user",
          "assistant",
          "tool"
        ],
        "title": "AiMessageRole",
        "type": "string"
      },
      "AiProposalKind": {
        "description": "Which change an assistant proposal would make if a human approved it.\n\nOne member per write tool. Kept as an enum rather than reusing the tool name\nso the apply path switches on a closed set the type checker knows, and so a\ntool can be renamed without invalidating proposals already stored.",
        "enum": [
          "create_draft",
          "update_draft",
          "schedule_post"
        ],
        "title": "AiProposalKind",
        "type": "string"
      },
      "AiProposalOut": {
        "description": "A change the assistant suggested, and the exact difference it would make.\n\n`changes` maps a field to its before and after, built by the service against\nthe record as it stands right now. The client renders it and never works out\nwhat a change means for itself, so what a person approves is what the server\nwould apply.",
        "properties": {
          "can_undo": {
            "title": "Can Undo",
            "type": "boolean"
          },
          "changes": {
            "additionalProperties": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Changes",
            "type": "object"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AiProposalKind"
          },
          "saw_untrusted_content": {
            "description": "The turn that produced this had read content Publedia did not write, such as a post caption or a channel name. Surface it: a suggestion downstream of text an outsider could have authored deserves more scrutiny than one that is not.",
            "title": "Saw Untrusted Content",
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/AiProposalStatus"
          },
          "target_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Id"
          },
          "tool_call_id": {
            "title": "Tool Call Id",
            "type": "string"
          },
          "untrusted_sources": {
            "description": "What kinds of outside content, by label: 'post caption', 'Slack message'. Naming them is what keeps the warning worth reading.",
            "items": {
              "type": "string"
            },
            "title": "Untrusted Sources",
            "type": "array"
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "tool_call_id",
          "target_id",
          "changes",
          "can_undo",
          "expires_at",
          "saw_untrusted_content"
        ],
        "title": "AiProposalOut",
        "type": "object"
      },
      "AiProposalStatus": {
        "description": "Where a proposal got to.\n\n`PENDING` is the only state a proposal can be applied from, which is what\nmakes approval single-use: declining or applying closes it, and a retry of\nthe same tool call returns the existing row rather than making a second one.",
        "enum": [
          "pending",
          "applied",
          "declined",
          "undone"
        ],
        "title": "AiProposalStatus",
        "type": "string"
      },
      "AiSettingsOut": {
        "properties": {
          "assistant_enabled": {
            "title": "Assistant Enabled",
            "type": "boolean"
          },
          "external_mcp_enabled": {
            "title": "External Mcp Enabled",
            "type": "boolean"
          },
          "monthly_token_budget": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Token Budget"
          },
          "spend": {
            "$ref": "#/components/schemas/AiSpendOut"
          }
        },
        "required": [
          "assistant_enabled",
          "external_mcp_enabled",
          "monthly_token_budget",
          "spend"
        ],
        "title": "AiSettingsOut",
        "type": "object"
      },
      "AiSettingsUpdateIn": {
        "additionalProperties": false,
        "description": "A partial update: an omitted field is left as it is.\n\n`monthly_token_budget` is explicitly nullable, and `None` here means \"return to\nthe plan default\" rather than \"leave it alone\", which is why the model checks\n`model_fields_set` instead of reading the value. Without that distinction a\nclient could never reset a budget it had previously set.",
        "properties": {
          "assistant_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assistant Enabled"
          },
          "external_mcp_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Mcp Enabled"
          },
          "monthly_token_budget": {
            "anyOf": [
              {
                "maximum": 1000000000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Token Budget"
          }
        },
        "title": "AiSettingsUpdateIn",
        "type": "object"
      },
      "AiSpendOut": {
        "description": "This month's token consumption, alongside the ceiling it is measured against.",
        "properties": {
          "budget": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget"
          },
          "exhausted": {
            "title": "Exhausted",
            "type": "boolean"
          },
          "input_tokens": {
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "title": "Output Tokens",
            "type": "integer"
          },
          "total_tokens": {
            "title": "Total Tokens",
            "type": "integer"
          },
          "warning": {
            "title": "Warning",
            "type": "boolean"
          }
        },
        "required": [
          "input_tokens",
          "output_tokens",
          "total_tokens",
          "budget",
          "warning",
          "exhausted"
        ],
        "title": "AiSpendOut",
        "type": "object"
      },
      "AiTone": {
        "enum": [
          "casual",
          "professional",
          "playful",
          "authoritative"
        ],
        "title": "AiTone",
        "type": "string"
      },
      "AiToolUsageOut": {
        "properties": {
          "calls": {
            "title": "Calls",
            "type": "integer"
          },
          "denied": {
            "title": "Denied",
            "type": "integer"
          },
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "tool_name": {
            "title": "Tool Name",
            "type": "string"
          }
        },
        "required": [
          "tool_name",
          "calls",
          "denied",
          "failed"
        ],
        "title": "AiToolUsageOut",
        "type": "object"
      },
      "AiUsageOut": {
        "description": "This month's AI activity, plus what just happened.\n\nThe counts cover the current calendar month, which is the window the budget\nis measured in. `recent` deliberately does not: on the first of the month a\nworkspace that was busy yesterday would otherwise show an empty activity\nlist, which reads as an outage rather than as a reset.",
        "properties": {
          "denied_calls": {
            "title": "Denied Calls",
            "type": "integer"
          },
          "failed_calls": {
            "title": "Failed Calls",
            "type": "integer"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/AiMemberUsageOut"
            },
            "title": "Members",
            "type": "array"
          },
          "recent": {
            "items": {
              "$ref": "#/components/schemas/AiActivityOut"
            },
            "title": "Recent",
            "type": "array"
          },
          "spend": {
            "$ref": "#/components/schemas/AiSpendOut"
          },
          "tool_calls": {
            "title": "Tool Calls",
            "type": "integer"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/AiToolUsageOut"
            },
            "title": "Tools",
            "type": "array"
          },
          "turns": {
            "title": "Turns",
            "type": "integer"
          }
        },
        "required": [
          "spend",
          "turns",
          "tool_calls",
          "denied_calls",
          "failed_calls",
          "members",
          "tools",
          "recent"
        ],
        "title": "AiUsageOut",
        "type": "object"
      },
      "AlbumCreate": {
        "description": "What a client may ask for when it makes an album.\n\n`kind` is deliberately not here. `BRAND` and `DESIGNS` are the server's to\nassign, for the reason 0032 gave when `is_brand` was a boolean: a client that\ncould name the kind could mint a second brand album. `is_default` is the one\npart of the kind a member gets to choose, and it means \"file things here when\nI don't say where\", which is theirs to decide.",
        "properties": {
          "is_default": {
            "default": false,
            "title": "Is Default",
            "type": "boolean"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "AlbumCreate",
        "type": "object"
      },
      "AlbumKind": {
        "description": "What an album is for, and therefore what files itself there.\n\nOne column, replacing the `is_default`/`is_brand` pair 0032 shipped. That\npair was a recorded compromise, taken with the note that a third kind should\ncollapse both, and the third kind is here: designs. Two booleans could also\nboth be true at once, which is a state nothing in the product means and every\nreader had to rule out for themselves.\n\nFour of the five are managed by the server and there is at most one of each\nper workspace (`uq_albums_workspace_id_kind`). Each is created on first use\nrather than seeded, so a workspace only grows the albums it has a reason for,\nand each is found by kind rather than by name, so renaming one is safe.\n\nThey exist because they answer different questions. `BRAND` is the material\na workspace publishes *with*: logos and marks the editor offers as artwork.\n`DESIGNS` is what the editor produced: finished files, each the export of a\ndesign that is still editable elsewhere. `AUDIO` is what the editor consumes:\ntracks mixed under a clip, and the only kind holding files that are never\npublished at all. `DEFAULT` is none of those, and is defined by absence: it\nis where a file goes when nobody said where, which is an ordinary upload made\nwith no album in scope, or a clip the repurpose worker cut out of one.\n\nBeing managed is what decides whether a member can rename or delete the\nalbum, and that rule is now the kind itself rather than a list: anything that\nis not `CUSTOM` is the server's. `BRAND` used to be the only protected one\nand the check was named after it; see `MediaService._refuse_if_managed`.",
        "enum": [
          "custom",
          "default",
          "brand",
          "designs",
          "audio"
        ],
        "title": "AlbumKind",
        "type": "string"
      },
      "AlbumOut": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AlbumKind"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "kind"
        ],
        "title": "AlbumOut",
        "type": "object"
      },
      "AlbumSourceIn": {
        "properties": {
          "album_id": {
            "format": "uuid",
            "title": "Album Id",
            "type": "string"
          },
          "items_per_run": {
            "default": 1,
            "minimum": 1.0,
            "title": "Items Per Run",
            "type": "integer"
          }
        },
        "required": [
          "album_id"
        ],
        "title": "AlbumSourceIn",
        "type": "object"
      },
      "AlbumSourceOut": {
        "properties": {
          "album_id": {
            "title": "Album Id",
            "type": "string"
          },
          "items_per_run": {
            "title": "Items Per Run",
            "type": "integer"
          }
        },
        "required": [
          "album_id",
          "items_per_run"
        ],
        "title": "AlbumSourceOut",
        "type": "object"
      },
      "AnalyticsScope": {
        "description": "Which metric columns a client should draw, and for which platforms.\n\nComputed from `PLATFORM_METRICS` over the platforms actually in scope rather\nthan from whether the loaded rows happen to be null, so a column that no\nconnected channel could ever fill stays hidden even on a page of posts that\nhappen to have the number.",
        "properties": {
          "available_metrics": {
            "items": {
              "$ref": "#/components/schemas/MetricKey"
            },
            "title": "Available Metrics",
            "type": "array"
          },
          "platforms_in_scope": {
            "items": {
              "$ref": "#/components/schemas/Platform"
            },
            "title": "Platforms In Scope",
            "type": "array"
          }
        },
        "required": [
          "available_metrics",
          "platforms_in_scope"
        ],
        "title": "AnalyticsScope",
        "type": "object"
      },
      "AnalyticsSort": {
        "description": "What the post table can be ordered by.\n\nNamed after what a reader sorts by rather than after a column, which is why\n`ENGAGEMENT_RATE` is a member: it is computed at read time from two stored\ncolumns and is not a column itself.",
        "enum": [
          "published_at",
          "engagement",
          "engagement_rate",
          "impressions",
          "views",
          "likes",
          "comments",
          "shares",
          "saves",
          "clicks"
        ],
        "title": "AnalyticsSort",
        "type": "string"
      },
      "AnalyticsSummary": {
        "description": "Totals and a per-channel split for one window of published posts.\n\n`published_post_count` against `collected_post_count` is the frame every\nnumber below sits in: the first is what the filter matched, the second is\nhow much of it anything has measured. Every total then carries its own\nreporting count, because coverage differs per metric as well as per post.",
        "properties": {
          "collected_post_count": {
            "title": "Collected Post Count",
            "type": "integer"
          },
          "engagement": {
            "$ref": "#/components/schemas/EngagementTotal"
          },
          "per_channel": {
            "items": {
              "$ref": "#/components/schemas/ChannelAnalyticsSummary"
            },
            "title": "Per Channel",
            "type": "array"
          },
          "published_post_count": {
            "title": "Published Post Count",
            "type": "integer"
          },
          "range_end": {
            "format": "date",
            "title": "Range End",
            "type": "string"
          },
          "range_start": {
            "format": "date",
            "title": "Range Start",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/AnalyticsScope"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          },
          "totals": {
            "items": {
              "$ref": "#/components/schemas/MetricTotal"
            },
            "title": "Totals",
            "type": "array"
          }
        },
        "required": [
          "range_start",
          "range_end",
          "timezone",
          "published_post_count",
          "collected_post_count",
          "totals",
          "engagement",
          "per_channel",
          "scope"
        ],
        "title": "AnalyticsSummary",
        "type": "object"
      },
      "AnalyticsTimeseries": {
        "description": "The trend behind the summary, bucketed by the day each post published.\n\n## What this answers, and what it does not\n\nIt answers \"how did the posts I published that day do\". It does **not**\nanswer \"how much engagement happened that day\". The two diverge as soon as a\npost keeps earning after the day it went out, which is every post.\n\n## Why attribution by publish day rather than a daily delta\n\n`PostMetrics` rows are cumulative lifetime readings, upserted on\n`(post_id, captured_on)`. A delta series built from them,\n`reading[d] - reading[d - 1]`, has two faults this product cannot paper\nover: it goes negative whenever a platform revises a figure downward, which\nthey routinely do, and it attributes two days of movement to one day\nwhenever a collection day is missed, which the staleness ladder makes normal\nfor a post older than a week.\n\nAttribution is also what the page's range already means. `from` and `to`\nbound `published_at` in `/analytics/posts` and `/analytics/summary`, the\npost table under the chart lists posts by publish date, and a chart whose\nbuckets meant something else from the table beneath it would be two reports\non one screen.\n\nThe consequence to state plainly: summing every bucket of a series\nreproduces that metric's `MetricTotal.total` for the same filters, and\nsumming `published_post_count` reproduces `published_post_count`. That\nagreement is the property the series is built to have.",
        "properties": {
          "interval": {
            "$ref": "#/components/schemas/TimeseriesInterval"
          },
          "range_end": {
            "format": "date",
            "title": "Range End",
            "type": "string"
          },
          "range_start": {
            "format": "date",
            "title": "Range Start",
            "type": "string"
          },
          "scope": {
            "$ref": "#/components/schemas/AnalyticsScope"
          },
          "series": {
            "items": {
              "$ref": "#/components/schemas/MetricSeries"
            },
            "title": "Series",
            "type": "array"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          }
        },
        "required": [
          "range_start",
          "range_end",
          "timezone",
          "interval",
          "series",
          "scope"
        ],
        "title": "AnalyticsTimeseries",
        "type": "object"
      },
      "ApiKeyCreateIn": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the key stops working, at most 365 days away. Omit it to use `expires_in_days`; a key with no expiry can no longer be made.",
            "title": "Expires At"
          },
          "expires_in_days": {
            "anyOf": [
              {
                "enum": [
                  30
                ],
                "type": "number"
              },
              {
                "enum": [
                  90
                ],
                "type": "number"
              },
              {
                "enum": [
                  365
                ],
                "type": "number"
              }
            ],
            "description": "How many days the key works: 30, 90 or 365.",
            "title": "Expires In Days"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "minItems": 1,
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "name",
          "scopes"
        ],
        "title": "ApiKeyCreateIn",
        "type": "object"
      },
      "ApiKeyOut": {
        "description": "A key as it can safely be listed. There is no secret here by design.",
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The secret's last four characters; null for a key made before they were kept.",
            "title": "Last4"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "last_used_client": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used Client"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "personal_connection": {
            "description": "Present when a member's personal connection reaches this workspace through this row. Revoking it removes only this workspace.",
            "enum": [
              true
            ],
            "title": "Personal Connection",
            "type": "boolean"
          },
          "prefix": {
            "title": "Prefix",
            "type": "string"
          },
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "While in the future, the secret before the last rotation still works.",
            "title": "Previous Secret Expires At"
          },
          "previous_secret_last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Secret Last Used At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "revoked_because": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked Because"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "last4",
          "scopes",
          "expires_at",
          "revoked_at",
          "revoked_because",
          "last_used_at",
          "last_used_client",
          "previous_secret_expires_at",
          "previous_secret_last_used_at",
          "created_by",
          "created_at",
          "active"
        ],
        "title": "ApiKeyOut",
        "type": "object"
      },
      "ApiKeyRenameIn": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "ApiKeyRenameIn",
        "type": "object"
      },
      "ApiKeyReplaceIn": {
        "additionalProperties": false,
        "properties": {
          "expires_in_days": {
            "anyOf": [
              {
                "enum": [
                  30
                ],
                "type": "number"
              },
              {
                "enum": [
                  90
                ],
                "type": "number"
              },
              {
                "enum": [
                  365
                ],
                "type": "number"
              }
            ],
            "description": "How many days the key works: 30, 90 or 365.",
            "title": "Expires In Days"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "revoke_old_when_used": {
            "default": true,
            "description": "Revoke the old key the first time the new one is used.",
            "title": "Revoke Old When Used",
            "type": "boolean"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "minItems": 1,
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "name",
          "scopes"
        ],
        "title": "ApiKeyReplaceIn",
        "type": "object"
      },
      "ApiKeyRotateIn": {
        "additionalProperties": false,
        "properties": {
          "overlap_seconds": {
            "description": "How long the old secret keeps working: 0 stops it now, at most 7 days. 24 hours is usual.",
            "maximum": 604800,
            "minimum": 0,
            "title": "Overlap Seconds",
            "type": "integer"
          }
        },
        "required": [
          "overlap_seconds"
        ],
        "title": "ApiKeyRotateIn",
        "type": "object"
      },
      "Appearance": {
        "description": "Which colour scheme the app renders in for one person.\n\n`SYSTEM` is not a synonym for \"unset\". Someone can deliberately follow the\noperating system after having picked dark once, and that is a different\nstate from never having opened the setting, which is what a null column\nmeans.",
        "enum": [
          "system",
          "light",
          "dark"
        ],
        "title": "Appearance",
        "type": "string"
      },
      "AssistantsDisconnectedOut": {
        "properties": {
          "apps": {
            "title": "Apps",
            "type": "integer"
          },
          "keys": {
            "title": "Keys",
            "type": "integer"
          }
        },
        "required": [
          "apps",
          "keys"
        ],
        "title": "AssistantsDisconnectedOut",
        "type": "object"
      },
      "AuditActorKind": {
        "description": "Who made an audited change. An API key is listed with the member it acts for.",
        "enum": [
          "member",
          "api_key",
          "automation",
          "support",
          "system"
        ],
        "title": "AuditActorKind",
        "type": "string"
      },
      "AuditActorOut": {
        "properties": {
          "connected_app": {
            "description": "The API key is a connected app's OAuth grant, named by the app itself.",
            "title": "Connected App",
            "type": "boolean"
          },
          "id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "kind": {
            "$ref": "#/components/schemas/AuditActorKind"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "owner_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Id"
          },
          "owner_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner Name"
          }
        },
        "required": [
          "kind",
          "id",
          "owner_id",
          "name",
          "owner_name",
          "connected_app"
        ],
        "title": "AuditActorOut",
        "type": "object"
      },
      "AuditCategory": {
        "description": "How the action catalogue is grouped, for filtering.",
        "enum": [
          "members",
          "access",
          "integrations",
          "channels",
          "workspace",
          "ai",
          "billing",
          "data"
        ],
        "title": "AuditCategory",
        "type": "string"
      },
      "AuditContextOut": {
        "properties": {
          "ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          },
          "via": {
            "$ref": "#/components/schemas/AuditVia"
          }
        },
        "required": [
          "via",
          "ip",
          "user_agent",
          "request_id"
        ],
        "title": "AuditContextOut",
        "type": "object"
      },
      "AuditEventOut": {
        "description": "One audited change, with who made it, what it touched and where it came from.",
        "properties": {
          "action": {
            "description": "`noun.past_verb` from the action catalogue.",
            "title": "Action",
            "type": "string"
          },
          "actor": {
            "$ref": "#/components/schemas/AuditActorOut"
          },
          "after": {
            "description": "The state after, secrets stripped; null on a delete.",
            "title": "After"
          },
          "before": {
            "description": "The state before, secrets stripped; null on a create.",
            "title": "Before"
          },
          "context": {
            "$ref": "#/components/schemas/AuditContextOut"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "occurred_at": {
            "format": "date-time",
            "title": "Occurred At",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/AuditSourceKind"
          },
          "target": {
            "$ref": "#/components/schemas/AuditTargetOut"
          },
          "targets": {
            "items": {
              "$ref": "#/components/schemas/AuditTargetOut"
            },
            "title": "Targets",
            "type": "array"
          }
        },
        "required": [
          "id",
          "source",
          "occurred_at",
          "action",
          "actor",
          "target",
          "targets",
          "context",
          "metadata"
        ],
        "title": "AuditEventOut",
        "type": "object"
      },
      "AuditEventPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AuditEventOut"
            },
            "title": "Items",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as `cursor` for the next page; null on the last one.",
            "title": "Next Cursor"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "title": "AuditEventPage",
        "type": "object"
      },
      "AuditSourceKind": {
        "description": "Where an entry comes from: the audit log, a post's history, or an assistant tool call.",
        "enum": [
          "audit",
          "post",
          "ai"
        ],
        "title": "AuditSourceKind",
        "type": "string"
      },
      "AuditTargetOut": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "type": {
            "$ref": "#/components/schemas/AuditTargetType"
          }
        },
        "required": [
          "type",
          "id",
          "name"
        ],
        "title": "AuditTargetOut",
        "type": "object"
      },
      "AuditTargetType": {
        "enum": [
          "workspace",
          "member",
          "invite",
          "api_key",
          "webhook_endpoint",
          "channel",
          "post",
          "integration"
        ],
        "title": "AuditTargetType",
        "type": "string"
      },
      "AuditVia": {
        "description": "The surface a change came through.",
        "enum": [
          "web",
          "api",
          "mcp",
          "worker"
        ],
        "title": "AuditVia",
        "type": "string"
      },
      "AutoAnswerSuggestionOut": {
        "properties": {
          "channel_ids": {
            "items": {
              "type": "string"
            },
            "title": "Channel Ids",
            "type": "array"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string"
          },
          "reply_text": {
            "title": "Reply Text",
            "type": "string"
          },
          "signature": {
            "title": "Signature",
            "type": "string"
          },
          "times_answered": {
            "title": "Times Answered",
            "type": "integer"
          }
        },
        "required": [
          "signature",
          "keyword",
          "reply_text",
          "times_answered",
          "channel_ids"
        ],
        "title": "AutoAnswerSuggestionOut",
        "type": "object"
      },
      "AutoReplyState": {
        "description": "Whether an automation has taken responsibility for answering a comment.\n\nThis exists to make replying-twice impossible rather than unlikely. A\ndispatcher claims a comment by moving it from `NONE` to `DISPATCHED` in a\nconditional update, so two workers racing on the same webhook produce one\nclaim and one reply. Every later state is written by the run that holds the\nclaim.\n\n`SKIPPED` is a real outcome and not a failure: a flow whose condition did not\nmatch, or whose rate limiter refused, decided not to answer. Recording that\nis what lets the inbox say why a comment was left alone instead of leaving\nthe user to guess whether the automation is broken.\n\n`UNCONFIRMED` means the send began but its result was never confirmed: the\nreply may be on the platform. It is never sent again automatically; check the\nthread on the platform.",
        "enum": [
          "none",
          "dispatched",
          "replied",
          "skipped",
          "failed",
          "unconfirmed"
        ],
        "title": "AutoReplyState",
        "type": "string"
      },
      "AutomationCountsOut": {
        "properties": {
          "kinds": {
            "additionalProperties": {
              "$ref": "#/components/schemas/AutomationStatusCountsOut"
            },
            "propertyNames": {
              "$ref": "#/components/schemas/AutomationKind"
            },
            "title": "Kinds",
            "type": "object"
          }
        },
        "required": [
          "kinds"
        ],
        "title": "AutomationCountsOut",
        "type": "object"
      },
      "AutomationCreateIn": {
        "description": "Create an automation from either simple inputs or a hand-built graph.\n\nTwo mutually exclusive shapes are accepted:\n\n- simple: `recurrence` plus at least one `channel_ids` entry (optionally\n  `items` or an `album_source`), from which the service synthesizes the\n  canonical `schedule -> content source -> publish` graph; or\n- advanced: a `graph` (`{nodes, edges}`) the user built in the flow builder,\n  which becomes the source of truth (its schedule node carries the recurrence,\n  its publish node the channels).\n\nA `model_validator` enforces that exactly one shape is provided, so a request\ncan never mix a graph with simple inputs.",
        "properties": {
          "album_source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AlbumSourceIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "channel_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Ids"
          },
          "graph": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AutomationGraphIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AutomationItemIn"
            },
            "title": "Items",
            "type": "array"
          },
          "mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AutomationMode"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "preset_id": {
            "anyOf": [
              {
                "maxLength": 64,
                "pattern": "^[a-z0-9-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preset Id"
          },
          "recurrence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurrenceIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AutomationStatus",
            "default": "active"
          }
        },
        "required": [
          "name"
        ],
        "title": "AutomationCreateIn",
        "type": "object"
      },
      "AutomationDetailOut": {
        "properties": {
          "album_source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AlbumSourceOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "graph": {
            "additionalProperties": true,
            "title": "Graph",
            "type": "object"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_evergreen": {
            "title": "Is Evergreen",
            "type": "boolean"
          },
          "item_count": {
            "title": "Item Count",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/AutomationItemOut"
            },
            "title": "Items",
            "type": "array"
          },
          "kind": {
            "$ref": "#/components/schemas/AutomationKind"
          },
          "last_run_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At"
          },
          "mode": {
            "$ref": "#/components/schemas/AutomationMode"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "next_run_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Run At"
          },
          "next_up_item_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Up Item Id"
          },
          "pause_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AutomationPauseReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "preset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preset Id"
          },
          "recurrence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurrenceOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "replies_last_30_days": {
            "title": "Replies Last 30 Days",
            "type": "integer"
          },
          "repost_rules": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RepostRulesOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AutomationStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "name",
          "preset_id",
          "status",
          "pause_reason",
          "mode",
          "recurrence",
          "album_source",
          "is_evergreen",
          "repost_rules",
          "kind",
          "item_count",
          "replies_last_30_days",
          "graph",
          "next_run_at",
          "last_run_at",
          "created_by",
          "created_at",
          "updated_at",
          "items",
          "next_up_item_id"
        ],
        "title": "AutomationDetailOut",
        "type": "object"
      },
      "AutomationGraphIn": {
        "properties": {
          "edges": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Edges",
            "type": "array"
          },
          "nodes": {
            "default": [],
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Nodes",
            "type": "array"
          },
          "schemaVersion": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schemaversion"
          }
        },
        "title": "AutomationGraphIn",
        "type": "object"
      },
      "AutomationItemCreateIn": {
        "description": "One item appended to an automation's queue.\n\n`source_post_id` is provenance, not a link: the caption and media are copied\ninto the item, so editing or deleting the post later leaves the item's\ncontent alone. Callers that want the copying done for them use\n`POST /automations/{id}/items/from-post` instead of filling this in by hand.",
        "properties": {
          "bucket": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bucket"
          },
          "caption": {
            "anyOf": [
              {
                "maxLength": 2200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "caption_variants": {
            "items": {
              "maxLength": 2200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 5,
            "title": "Caption Variants",
            "type": "array"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "media": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media"
          },
          "source_post_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Post Id"
          }
        },
        "title": "AutomationItemCreateIn",
        "type": "object"
      },
      "AutomationItemFromPostIn": {
        "additionalProperties": false,
        "description": "Copy an existing post into a queue item, provenance included.",
        "properties": {
          "bucket": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bucket"
          },
          "post_id": {
            "format": "uuid",
            "title": "Post Id",
            "type": "string"
          }
        },
        "required": [
          "post_id"
        ],
        "title": "AutomationItemFromPostIn",
        "type": "object"
      },
      "AutomationItemIn": {
        "properties": {
          "bucket": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bucket"
          },
          "caption": {
            "anyOf": [
              {
                "maxLength": 2200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "caption_variants": {
            "items": {
              "maxLength": 2200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 5,
            "title": "Caption Variants",
            "type": "array"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "media": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media"
          }
        },
        "title": "AutomationItemIn",
        "type": "object"
      },
      "AutomationItemOut": {
        "properties": {
          "automation_id": {
            "title": "Automation Id",
            "type": "string"
          },
          "bucket": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bucket"
          },
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "caption_variants": {
            "items": {
              "type": "string"
            },
            "title": "Caption Variants",
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Id"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "media": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media"
          },
          "position": {
            "title": "Position",
            "type": "integer"
          },
          "post_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Id"
          },
          "publish_count": {
            "title": "Publish Count",
            "type": "integer"
          },
          "published_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published At"
          },
          "retired_because": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ItemRetiredReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_post_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Post Id"
          },
          "status": {
            "$ref": "#/components/schemas/AutomationItemStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "automation_id",
          "workspace_id",
          "position",
          "status",
          "caption",
          "expires_at",
          "caption_variants",
          "retired_because",
          "media",
          "bucket",
          "external_id",
          "publish_count",
          "source_post_id",
          "post_id",
          "published_at",
          "created_at",
          "updated_at"
        ],
        "title": "AutomationItemOut",
        "type": "object"
      },
      "AutomationItemStatus": {
        "enum": [
          "queued",
          "published",
          "skipped"
        ],
        "title": "AutomationItemStatus",
        "type": "string"
      },
      "AutomationItemUpdateIn": {
        "additionalProperties": false,
        "description": "A partial edit of one queue item.\n\nEvery field is optional and only the ones present in the request body are\nwritten, so a caption edit cannot silently retire an item. `status` is how an\nitem is retired (`skipped`) and restored (`queued`); it never touches\n`publish_count`, which is the rotation key.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "maxLength": 2200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "caption_variants": {
            "items": {
              "maxLength": 2200,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 5,
            "title": "Caption Variants",
            "type": "array"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "media": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AutomationItemStatus"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "AutomationItemUpdateIn",
        "type": "object"
      },
      "AutomationKind": {
        "description": "Which surface an automation belongs to, derived from its stored graph.\n\nNot a column and not a second `AutomationMode`. `EVERGREEN` means the graph\nmatches the canonical category shape `buildEvergreenGraph`\nbuilds, `FLOW` means it does not, and an\nautomation moves between the two by being edited on the canvas. This exists\nso each automation appears on exactly one screen.\n\n`COMMENT` and `MESSAGE` are decided by the trigger alone: an automation\nstarted by a comment or a direct message is a reply surface whatever else\nthe graph holds. `INBOX` is the one exception: a comment automation that\nends at an `inbox_action` rather than a reply is an inbox rule, listed on\nits own tab because it answers nobody.",
        "enum": [
          "evergreen",
          "flow",
          "comment",
          "message",
          "inbox"
        ],
        "title": "AutomationKind",
        "type": "string"
      },
      "AutomationMode": {
        "enum": [
          "simple",
          "advanced"
        ],
        "title": "AutomationMode",
        "type": "string"
      },
      "AutomationOut": {
        "properties": {
          "album_source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AlbumSourceOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "graph": {
            "additionalProperties": true,
            "title": "Graph",
            "type": "object"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_evergreen": {
            "title": "Is Evergreen",
            "type": "boolean"
          },
          "item_count": {
            "title": "Item Count",
            "type": "integer"
          },
          "kind": {
            "$ref": "#/components/schemas/AutomationKind"
          },
          "last_run_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Run At"
          },
          "mode": {
            "$ref": "#/components/schemas/AutomationMode"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "next_run_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Run At"
          },
          "pause_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AutomationPauseReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "preset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preset Id"
          },
          "recurrence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurrenceOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "replies_last_30_days": {
            "title": "Replies Last 30 Days",
            "type": "integer"
          },
          "repost_rules": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RepostRulesOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AutomationStatus"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "name",
          "preset_id",
          "status",
          "pause_reason",
          "mode",
          "recurrence",
          "album_source",
          "is_evergreen",
          "repost_rules",
          "kind",
          "item_count",
          "replies_last_30_days",
          "graph",
          "next_run_at",
          "last_run_at",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "title": "AutomationOut",
        "type": "object"
      },
      "AutomationPauseReason": {
        "description": "Why a paused automation is paused. Adding an item resumes only `queue_empty`.",
        "enum": [
          "manual",
          "queue_empty",
          "unreadable_schedule"
        ],
        "title": "AutomationPauseReason",
        "type": "string"
      },
      "AutomationPreviewIn": {
        "description": "Optional unsaved graph to execute in the preview sandbox.\n\nPreview runs use real feed and AI collaborators. They can make an outbound\nfeed request and spend AI tokens even though all database writes are rolled\nback and no post is created, scheduled, or published.",
        "properties": {
          "graph": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AutomationGraphIn"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unsaved graph to preview. Omit it to use the stored graph. Feed and AI steps make real outbound requests and can spend AI tokens."
          }
        },
        "title": "AutomationPreviewIn",
        "type": "object"
      },
      "AutomationPreviewOut": {
        "description": "One sandbox run report.\n\nNo post or scheduling state is persisted. Feed and AI steps still make real\noutbound requests and can spend AI tokens.",
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/PreviewRunOutcome"
          },
          "posts": {
            "items": {
              "$ref": "#/components/schemas/PreviewPostOut"
            },
            "title": "Posts",
            "type": "array"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "result": {
            "$ref": "#/components/schemas/PreviewRunResultOut"
          }
        },
        "required": [
          "outcome",
          "reason",
          "result",
          "posts"
        ],
        "title": "AutomationPreviewOut",
        "type": "object"
      },
      "AutomationReorderItemsIn": {
        "additionalProperties": false,
        "description": "The automation's items, in the order they should rotate from now on.",
        "properties": {
          "ordered_item_ids": {
            "default": [],
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Ordered Item Ids",
            "type": "array"
          }
        },
        "title": "AutomationReorderItemsIn",
        "type": "object"
      },
      "AutomationReplaceItemsIn": {
        "properties": {
          "items": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AutomationItemIn"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "title": "AutomationReplaceItemsIn",
        "type": "object"
      },
      "AutomationStatus": {
        "enum": [
          "active",
          "paused",
          "archived"
        ],
        "title": "AutomationStatus",
        "type": "string"
      },
      "AutomationStatusCountsOut": {
        "properties": {
          "active": {
            "title": "Active",
            "type": "integer"
          },
          "archived": {
            "title": "Archived",
            "type": "integer"
          },
          "paused": {
            "title": "Paused",
            "type": "integer"
          }
        },
        "required": [
          "active",
          "paused",
          "archived"
        ],
        "title": "AutomationStatusCountsOut",
        "type": "object"
      },
      "AutomationUpdateIn": {
        "properties": {
          "channel_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Ids"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "recurrence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurrenceIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "repost_rules": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RepostRulesIn"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "AutomationUpdateIn",
        "type": "object"
      },
      "BillingPlan": {
        "enum": [
          "basic",
          "pro",
          "ultra",
          "business",
          "agency"
        ],
        "title": "BillingPlan",
        "type": "string"
      },
      "BlueskyContentWarning": {
        "description": "The self-labels `com.atproto.label.defs#selfLabels` takes, by their own values.",
        "enum": [
          "sexual",
          "nudity",
          "porn",
          "graphic-media"
        ],
        "title": "BlueskyContentWarning",
        "type": "string"
      },
      "BlueskyPostSettings": {
        "additionalProperties": false,
        "properties": {
          "allow_quotes": {
            "default": true,
            "title": "Allow Quotes",
            "type": "boolean"
          },
          "content_warning": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BlueskyContentWarning"
              },
              {
                "type": "null"
              }
            ]
          },
          "languages": {
            "items": {
              "type": "string"
            },
            "maxItems": 3,
            "title": "Languages",
            "type": "array"
          },
          "platform": {
            "const": "bluesky",
            "title": "Platform",
            "type": "string"
          },
          "reply_audience": {
            "$ref": "#/components/schemas/BlueskyReplyAudience",
            "default": "everyone"
          },
          "reply_rules": {
            "items": {
              "$ref": "#/components/schemas/BlueskyReplyRule"
            },
            "title": "Reply Rules",
            "type": "array"
          }
        },
        "required": [
          "platform"
        ],
        "title": "BlueskyPostSettings",
        "type": "object"
      },
      "BlueskyReplyAudience": {
        "enum": [
          "everyone",
          "nobody",
          "limited"
        ],
        "title": "BlueskyReplyAudience",
        "type": "string"
      },
      "BlueskyReplyRule": {
        "enum": [
          "mentioned",
          "following",
          "followers"
        ],
        "title": "BlueskyReplyRule",
        "type": "string"
      },
      "BrandLogoOut": {
        "description": "The workspace logo, as the client needs to draw and re-select it.",
        "properties": {
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "media_asset_id": {
            "title": "Media Asset Id",
            "type": "string"
          },
          "read_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read Url"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          }
        },
        "required": [
          "media_asset_id",
          "read_url",
          "width",
          "height"
        ],
        "title": "BrandLogoOut",
        "type": "object"
      },
      "BrandLogoSelectIn": {
        "additionalProperties": false,
        "description": "An asset already in this workspace's gallery, to become the logo.",
        "properties": {
          "media_asset_id": {
            "format": "uuid",
            "title": "Media Asset Id",
            "type": "string"
          }
        },
        "required": [
          "media_asset_id"
        ],
        "title": "BrandLogoSelectIn",
        "type": "object"
      },
      "BrandLogoUploadIn": {
        "additionalProperties": false,
        "description": "A file already in the store, to be filed into the Brand album as the logo.\n\nThe same handshake `POST /media/confirm` takes, because it is the same\nupload: the client gets an intent from `POST /media/upload-intent`, puts the\nbytes, and names the result here. Confirming and pointing happen together so\na failure between them cannot leave a confirmed asset nobody asked for.",
        "properties": {
          "height": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "mime_type": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Mime Type",
            "type": "string"
          },
          "object_key": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Object Key",
            "type": "string"
          },
          "size_bytes": {
            "exclusiveMinimum": 0.0,
            "title": "Size Bytes",
            "type": "integer"
          },
          "width": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          }
        },
        "required": [
          "object_key",
          "mime_type",
          "size_bytes"
        ],
        "title": "BrandLogoUploadIn",
        "type": "object"
      },
      "BrandOut": {
        "description": "The brand this workspace posts as. Every field but the name may be null.",
        "properties": {
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "logo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BrandLogoOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "palette": {
            "items": {
              "type": "string"
            },
            "title": "Palette",
            "type": "array"
          },
          "primary_color": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Color"
          },
          "tone": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AiTone"
              },
              {
                "type": "null"
              }
            ]
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "required": [
          "name",
          "kind",
          "category",
          "description",
          "website",
          "logo",
          "primary_color",
          "palette",
          "tone"
        ],
        "title": "BrandOut",
        "type": "object"
      },
      "BrandUpdateIn": {
        "additionalProperties": false,
        "description": "A partial update: an omitted field keeps its value, an explicit null clears it.\n\nEvery optional field reads its own presence out of `model_fields_set`,\nbecause in a partial update a bare null already means \"not changing this\" and\nso cannot also mean \"remove it\". `name` is the exception: it cannot be\ncleared, since a workspace with no name is not a state worth reaching.",
        "properties": {
          "category": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "kind": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "palette": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 8,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Palette"
          },
          "primary_color": {
            "anyOf": [
              {
                "maxLength": 7,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Color"
          },
          "tone": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AiTone"
              },
              {
                "type": "null"
              }
            ]
          },
          "website": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "title": "BrandUpdateIn",
        "type": "object"
      },
      "ChannelAnalyticsSummary": {
        "description": "One channel's share of the range.\n\nThe rate is safe to state at this level and not at the workspace level: one\nchannel is one platform, so the posts reporting engagement and the posts\nreporting impressions are the same set of posts on the same metric coverage.",
        "properties": {
          "channel_display_name": {
            "title": "Channel Display Name",
            "type": "string"
          },
          "channel_handle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Handle"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "engagement": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engagement"
          },
          "engagement_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engagement Rate"
          },
          "impressions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Impressions"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "published_post_count": {
            "title": "Published Post Count",
            "type": "integer"
          },
          "reporting_post_count": {
            "title": "Reporting Post Count",
            "type": "integer"
          }
        },
        "required": [
          "channel_id",
          "channel_handle",
          "channel_display_name",
          "platform",
          "published_post_count",
          "reporting_post_count",
          "impressions",
          "engagement",
          "engagement_rate"
        ],
        "title": "ChannelAnalyticsSummary",
        "type": "object"
      },
      "ChannelAppReturnRequest": {
        "properties": {
          "state": {
            "description": "The state the provider callback carried.",
            "maxLength": 2048,
            "minLength": 1,
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "state"
        ],
        "title": "ChannelAppReturnRequest",
        "type": "object"
      },
      "ChannelAppReturnResponse": {
        "properties": {
          "app_connect": {
            "title": "App Connect",
            "type": "boolean"
          }
        },
        "required": [
          "app_connect"
        ],
        "title": "ChannelAppReturnResponse",
        "type": "object"
      },
      "ChannelAuthHealth": {
        "enum": [
          "healthy",
          "reconnect_required",
          "expired",
          "revoked",
          "disconnected"
        ],
        "title": "ChannelAuthHealth",
        "type": "string"
      },
      "ChannelGroupCreateIn": {
        "properties": {
          "channel_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Channel Ids",
            "type": "array"
          },
          "color": {
            "maxLength": 32,
            "minLength": 1,
            "title": "Color",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 280,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "maxLength": 80,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "color"
        ],
        "title": "ChannelGroupCreateIn",
        "type": "object"
      },
      "ChannelGroupOut": {
        "properties": {
          "channel_count": {
            "title": "Channel Count",
            "type": "integer"
          },
          "channels": {
            "items": {
              "$ref": "#/components/schemas/ChannelOut"
            },
            "title": "Channels",
            "type": "array"
          },
          "color": {
            "title": "Color",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "description",
          "channel_count",
          "channels",
          "created_at"
        ],
        "title": "ChannelGroupOut",
        "type": "object"
      },
      "ChannelGroupSetChannelsIn": {
        "properties": {
          "channel_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Channel Ids",
            "type": "array"
          }
        },
        "title": "ChannelGroupSetChannelsIn",
        "type": "object"
      },
      "ChannelGroupUpdateIn": {
        "properties": {
          "color": {
            "anyOf": [
              {
                "maxLength": 32,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 280,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 80,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "ChannelGroupUpdateIn",
        "type": "object"
      },
      "ChannelHealthOut": {
        "properties": {
          "auth_health": {
            "$ref": "#/components/schemas/ChannelAuthHealth"
          },
          "id": {
            "title": "Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "auth_health"
        ],
        "title": "ChannelHealthOut",
        "type": "object"
      },
      "ChannelMessaging": {
        "description": "Whether one channel can send and receive direct messages, and if not, why.\n\nThree members because the two refusals ask for different things. A\nconnection the gateway cannot message through is final, while one that\ncould but was connected before the messaging scope was requested is fixed\nby reconnecting it.",
        "enum": [
          "unsupported",
          "needs_reconnect",
          "enabled"
        ],
        "title": "ChannelMessaging",
        "type": "string"
      },
      "ChannelOut": {
        "properties": {
          "auth_expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auth Expires At"
          },
          "auth_health": {
            "$ref": "#/components/schemas/ChannelAuthHealth"
          },
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "can_comment_on_posts": {
            "title": "Can Comment On Posts",
            "type": "boolean"
          },
          "can_hide_comments": {
            "title": "Can Hide Comments",
            "type": "boolean"
          },
          "can_message": {
            "title": "Can Message",
            "type": "boolean"
          },
          "can_private_reply": {
            "title": "Can Private Reply",
            "type": "boolean"
          },
          "can_reply_to_comments": {
            "title": "Can Reply To Comments",
            "type": "boolean"
          },
          "connected_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connected At"
          },
          "display_name": {
            "title": "Display Name",
            "type": "string"
          },
          "external_account_id": {
            "title": "External Account Id",
            "type": "string"
          },
          "gateway_kind": {
            "$ref": "#/components/schemas/GatewayKind"
          },
          "group_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "handle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Handle"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "messaging": {
            "$ref": "#/components/schemas/ChannelMessaging"
          },
          "placements": {
            "items": {
              "$ref": "#/components/schemas/ChannelPlacementOut"
            },
            "title": "Placements",
            "type": "array"
          },
          "placements_known": {
            "title": "Placements Known",
            "type": "boolean"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "reports_likes": {
            "title": "Reports Likes",
            "type": "boolean"
          },
          "youtube_feed_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Youtube Feed Url"
          }
        },
        "required": [
          "id",
          "platform",
          "gateway_kind",
          "external_account_id",
          "handle",
          "display_name",
          "auth_health",
          "group_id",
          "connected_at",
          "auth_expires_at",
          "placements",
          "placements_known",
          "can_message",
          "messaging",
          "can_reply_to_comments",
          "can_private_reply",
          "can_hide_comments",
          "youtube_feed_url",
          "can_comment_on_posts",
          "reports_likes"
        ],
        "title": "ChannelOut",
        "type": "object"
      },
      "ChannelPlacementOut": {
        "description": "One destination inside a connected account, such as a Facebook Page.\n\n`id` is the platform's own id, which is what a post carries: for Facebook it\nis the `page_id` the gateway requires on every post. The composer offers\nthese by name and sends the id back as the destination's `placement`.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "ChannelPlacementOut",
        "type": "object"
      },
      "ChannelStatsOut": {
        "description": "A connected account's own figures, collected once a day. A null figure was not reported, never zero.",
        "properties": {
          "captured_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Captured At"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "engagement": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engagement"
          },
          "followers": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Followers"
          },
          "followers_change": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Followers Change"
          },
          "followers_change_since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Followers Change Since"
          },
          "following": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Following"
          },
          "impressions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Impressions"
          },
          "posts_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Posts Count"
          },
          "reach": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reach"
          },
          "state": {
            "$ref": "#/components/schemas/AccountStatsState"
          },
          "total_likes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Likes"
          },
          "views": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Views"
          },
          "window_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The days reach, impressions, views and engagement cover; null where they are lifetime totals.",
            "title": "Window Days"
          }
        },
        "required": [
          "channel_id",
          "state",
          "captured_at",
          "followers",
          "followers_change",
          "followers_change_since",
          "following",
          "posts_count",
          "reach",
          "impressions",
          "views",
          "engagement",
          "total_likes",
          "window_days"
        ],
        "title": "ChannelStatsOut",
        "type": "object"
      },
      "CollectionState": {
        "description": "Why a row's metrics look the way they do.\n\nFour states rather than two, because \"no number here\" has four causes and\nonly some of them are something the reader can act on. Derived at read time\nand never stored: channel health and gateway health each already have one\nwriter, and a stored copy would need a job to keep it true.",
        "enum": [
          "collected",
          "not_collected",
          "channel_disconnected",
          "collection_degraded",
          "not_reported_by_platform",
          "reconnect_required",
          "window_closed"
        ],
        "title": "CollectionState",
        "type": "string"
      },
      "CommentIntent": {
        "enum": [
          "question",
          "complaint",
          "praise",
          "other"
        ],
        "title": "CommentIntent",
        "type": "string"
      },
      "CommentReplyIn": {
        "description": "Outbound reply to an inbox comment.",
        "properties": {
          "body": {
            "minLength": 1,
            "title": "Body",
            "type": "string"
          },
          "destination": {
            "$ref": "#/components/schemas/ReplyDestination",
            "default": "public_comment"
          }
        },
        "required": [
          "body"
        ],
        "title": "CommentReplyIn",
        "type": "object"
      },
      "CommentStatusUpdateIn": {
        "description": "Triage status change for an inbox comment.",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/InboxCommentStatus"
          }
        },
        "required": [
          "status"
        ],
        "title": "CommentStatusUpdateIn",
        "type": "object"
      },
      "ConnectRequest": {
        "properties": {
          "app_return_uri": {
            "description": "Return to the app after the provider sends its callback to the site.",
            "enum": [
              "publedia://channels/connected"
            ],
            "title": "App Return Uri",
            "type": "string"
          },
          "login_hint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Login Hint"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "redirect_uri": {
            "description": "The site's own channel connect callback; any other address is refused.",
            "minLength": 1,
            "title": "Redirect Uri",
            "type": "string"
          }
        },
        "required": [
          "platform",
          "redirect_uri"
        ],
        "title": "ConnectRequest",
        "type": "object"
      },
      "ConnectResponse": {
        "properties": {
          "connection_session_id": {
            "title": "Connection Session Id",
            "type": "string"
          },
          "redirect_url": {
            "title": "Redirect Url",
            "type": "string"
          }
        },
        "required": [
          "connection_session_id",
          "redirect_url"
        ],
        "title": "ConnectResponse",
        "type": "object"
      },
      "ConnectedAppOut": {
        "description": "An app a person connected by signing in. It holds no key.",
        "properties": {
          "client_name": {
            "title": "Client Name",
            "type": "string"
          },
          "connected_at": {
            "format": "date-time",
            "title": "Connected At",
            "type": "string"
          },
          "connected_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connected By"
          },
          "connected_by_profile_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connected By Profile Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "last_used_client": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used Client"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "title": "Scopes",
            "type": "array"
          },
          "verified": {
            "title": "Verified",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "client_name",
          "verified",
          "scopes",
          "connected_by_profile_id",
          "connected_by",
          "connected_at",
          "last_used_at",
          "last_used_client",
          "revoked_at"
        ],
        "title": "ConnectedAppOut",
        "type": "object"
      },
      "ConnectedAppsView": {
        "description": "Whose connections to list: the caller's own, or everyone's in the workspace (admins).",
        "enum": [
          "mine",
          "everyone"
        ],
        "title": "ConnectedAppsView",
        "type": "string"
      },
      "ConnectionOut": {
        "properties": {
          "at": {
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "client": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client"
          },
          "connected_app": {
            "title": "Connected App",
            "type": "boolean"
          }
        },
        "required": [
          "client",
          "at",
          "connected_app"
        ],
        "title": "ConnectionOut",
        "type": "object"
      },
      "ConnectionStatusOut": {
        "description": "The latest connection and the latest refusal since, for the status line.",
        "properties": {
          "connected": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ConnectionOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "refused": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RefusalOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "connected",
          "refused"
        ],
        "title": "ConnectionStatusOut",
        "type": "object"
      },
      "ConsentDocument": {
        "description": "What a recorded consent event is about.\n\n`TERMS` and `PRIVACY` are contract acceptance, not GDPR consent: the service\nruns on Art. 6(1)(b) performance of a contract, and these rows exist to prove\n*which version* of the wording the person agreed to. `MARKETING_EMAIL` and\n`ANALYTICS_COOKIES` are genuine Art. 6(1)(a) consent, are refusable at no\ncost, and can be withdrawn, which is a new row with `granted` false.\n\nConflating the two is the usual way a consent flow fails: bundling the\noptional ones into the mandatory checkbox makes the consent neither specific\nnor freely given, which invalidates it.",
        "enum": [
          "terms",
          "privacy",
          "marketing_email",
          "analytics_cookies"
        ],
        "title": "ConsentDocument",
        "type": "string"
      },
      "ConsentGrantIn": {
        "description": "One acceptance or withdrawal the person just performed.",
        "properties": {
          "document": {
            "$ref": "#/components/schemas/ConsentDocument"
          },
          "document_version": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Document Version",
            "type": "string"
          },
          "granted": {
            "title": "Granted",
            "type": "boolean"
          }
        },
        "required": [
          "document",
          "document_version",
          "granted"
        ],
        "title": "ConsentGrantIn",
        "type": "object"
      },
      "ConsentMethod": {
        "description": "The surface the person acted on, kept as part of the evidence.\n\nWhich control was clicked is half of what makes a record credible: \"accepted\nat sign-up\" and \"toggled in settings a year later\" are different claims about\nthe same document, and the timestamp alone cannot tell them apart.",
        "enum": [
          "signup_checkbox",
          "reacceptance_prompt",
          "settings_toggle",
          "cookie_banner"
        ],
        "title": "ConsentMethod",
        "type": "string"
      },
      "ConsentStateOut": {
        "description": "The person's current position on one document.",
        "properties": {
          "document": {
            "$ref": "#/components/schemas/ConsentDocument"
          },
          "document_version": {
            "title": "Document Version",
            "type": "string"
          },
          "granted": {
            "title": "Granted",
            "type": "boolean"
          },
          "method": {
            "$ref": "#/components/schemas/ConsentMethod"
          },
          "recorded_at": {
            "format": "date-time",
            "title": "Recorded At",
            "type": "string"
          }
        },
        "required": [
          "document",
          "document_version",
          "granted",
          "method",
          "recorded_at"
        ],
        "title": "ConsentStateOut",
        "type": "object"
      },
      "ConsentStatusOut": {
        "description": "Latest answer per document, and per category for analytics_cookies, omitting documents never answered.",
        "properties": {
          "consents": {
            "items": {
              "$ref": "#/components/schemas/ConsentStateOut"
            },
            "title": "Consents",
            "type": "array"
          },
          "first_acceptance": {
            "description": "True when the terms were never accepted and the account was created minutes ago (with Google from the sign-in page): the prompt is the sign-up box one screen later, recorded with `signup_checkbox`. An older account is asked as a re-acceptance.",
            "title": "First Acceptance",
            "type": "boolean"
          },
          "needs_acceptance": {
            "description": "True when the latest answer for the terms is missing, refused or for a version other than the current one: the app asks before going further. The privacy policy never blocks.",
            "title": "Needs Acceptance",
            "type": "boolean"
          },
          "privacy_updated": {
            "description": "True when the terms are current but the privacy policy version last shown at an acceptance is not: the app shows a notice that it changed, which asks for nothing.",
            "title": "Privacy Updated",
            "type": "boolean"
          },
          "privacy_version": {
            "description": "The privacy policy version an acceptance must name.",
            "title": "Privacy Version",
            "type": "string"
          },
          "terms_version": {
            "description": "The terms version an acceptance must name.",
            "title": "Terms Version",
            "type": "string"
          }
        },
        "required": [
          "consents",
          "needs_acceptance",
          "privacy_updated",
          "first_acceptance",
          "terms_version",
          "privacy_version"
        ],
        "title": "ConsentStatusOut",
        "type": "object"
      },
      "ContentStart": {
        "description": "What the workspace usually has in hand before a post exists.\n\nSeparate from `PrimaryOutcome` because the two are independent: two\nworkspaces can both want to publish consistently and start from a photo\nlibrary and a podcast episode respectively, and collapsing them into one\nquestion would force a choice between the goal and the material.\n\n`LONG_VIDEO` names a workflow Publedia does not have yet. It is offered\nanyway because the answer is what decides whether building it is worth it,\nand the checklist says plainly that the route does not exist rather than\npretending it does.",
        "enum": [
          "idea_or_text",
          "photos_or_designs",
          "finished_post",
          "long_video",
          "client_assets"
        ],
        "title": "ContentStart",
        "type": "string"
      },
      "ConversationLastMessage": {
        "description": "The newest message in a conversation, either way.",
        "properties": {
          "body": {
            "title": "Body",
            "type": "string"
          },
          "direction": {
            "$ref": "#/components/schemas/MessageDirection"
          },
          "sent_at": {
            "format": "date-time",
            "title": "Sent At",
            "type": "string"
          }
        },
        "required": [
          "body",
          "direction",
          "sent_at"
        ],
        "title": "ConversationLastMessage",
        "type": "object"
      },
      "ConversationReplyIn": {
        "description": "A member's reply into a conversation.",
        "properties": {
          "body": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Body",
            "type": "string"
          }
        },
        "required": [
          "body"
        ],
        "title": "ConversationReplyIn",
        "type": "object"
      },
      "ConversationReplyOut": {
        "description": "The conversation as it stands after a reply, and the message stored for it.",
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/InboxConversationOut"
          },
          "message": {
            "$ref": "#/components/schemas/InboxMessageOut"
          }
        },
        "required": [
          "conversation",
          "message"
        ],
        "title": "ConversationReplyOut",
        "type": "object"
      },
      "ConversationStatusIn": {
        "description": "Mark a conversation handled, or open it again.",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/InboxCommentStatus"
          }
        },
        "required": [
          "status"
        ],
        "title": "ConversationStatusIn",
        "type": "object"
      },
      "CreateWorkspaceRequest": {
        "properties": {
          "brand_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand Category"
          },
          "brand_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand Kind"
          },
          "name": {
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "website": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateWorkspaceRequest",
        "type": "object"
      },
      "DashboardSummary": {
        "description": "The full `GET /dashboard/summary` payload.",
        "properties": {
          "connected_channel_count": {
            "title": "Connected Channel Count",
            "type": "integer"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "post_status_counts": {
            "$ref": "#/components/schemas/PostStatusCounts"
          },
          "posting_consistency": {
            "$ref": "#/components/schemas/PostingConsistencySummary"
          },
          "posting_goal": {
            "$ref": "#/components/schemas/PostingGoalSummary"
          },
          "publishing_health": {
            "$ref": "#/components/schemas/PublishingHealthSummary"
          },
          "recent_failure_count": {
            "title": "Recent Failure Count",
            "type": "integer"
          },
          "recent_failures": {
            "items": {
              "$ref": "#/components/schemas/RecentFailureSummary"
            },
            "title": "Recent Failures",
            "type": "array"
          },
          "scheduled_days": {
            "items": {
              "$ref": "#/components/schemas/ScheduledDay"
            },
            "title": "Scheduled Days",
            "type": "array"
          },
          "top_post": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TopPostSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "upcoming_scheduled": {
            "items": {
              "$ref": "#/components/schemas/UpcomingPostSummary"
            },
            "title": "Upcoming Scheduled",
            "type": "array"
          },
          "upcoming_scheduled_count": {
            "title": "Upcoming Scheduled Count",
            "type": "integer"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "post_status_counts",
          "upcoming_scheduled_count",
          "upcoming_scheduled",
          "connected_channel_count",
          "recent_failure_count",
          "recent_failures",
          "publishing_health",
          "posting_consistency",
          "posting_goal",
          "scheduled_days",
          "generated_at"
        ],
        "title": "DashboardSummary",
        "type": "object"
      },
      "DateFormat": {
        "description": "Field order for a numeric date.\n\nOnly the order is a preference. Separators, month names, and padding are the\nformatter's business, so the values name the order and nothing else: a\nliteral `DD/MM/YYYY` would pin a slash the renderer may not want.",
        "enum": [
          "dd_mm_yyyy",
          "mm_dd_yyyy",
          "yyyy_mm_dd"
        ],
        "title": "DateFormat",
        "type": "string"
      },
      "DaysOfMonthSelectorModel": {
        "additionalProperties": false,
        "properties": {
          "days": {
            "items": {
              "maximum": 31.0,
              "minimum": 1.0,
              "type": "integer"
            },
            "minItems": 1,
            "title": "Days",
            "type": "array"
          },
          "kind": {
            "const": "days_of_month",
            "default": "days_of_month",
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "days"
        ],
        "title": "DaysOfMonthSelectorModel",
        "type": "object"
      },
      "DaysOfWeekSelectorModel": {
        "additionalProperties": false,
        "properties": {
          "days": {
            "items": {
              "maximum": 6.0,
              "minimum": 0.0,
              "type": "integer"
            },
            "minItems": 1,
            "title": "Days",
            "type": "array"
          },
          "kind": {
            "const": "days_of_week",
            "default": "days_of_week",
            "title": "Kind",
            "type": "string"
          }
        },
        "required": [
          "days"
        ],
        "title": "DaysOfWeekSelectorModel",
        "type": "object"
      },
      "DeleteAccountIn": {
        "description": "The account's current password, when it has one. An account without a password (Google only) proves itself by a sign-in within the last ten minutes instead.",
        "properties": {
          "password": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          }
        },
        "title": "DeleteAccountIn",
        "type": "object"
      },
      "DeletionOutcome": {
        "description": "What asking to delete a workspace did.",
        "enum": [
          "deleted",
          "scheduled"
        ],
        "title": "DeletionOutcome",
        "type": "string"
      },
      "DeliveryMode": {
        "description": "How a published post reached its platform when that was not a plain delivery: `inbox` is a draft in the creator's TikTok inbox, `manual` was posted on X by its owner.",
        "enum": [
          "inbox",
          "manual"
        ],
        "title": "DeliveryMode",
        "type": "string"
      },
      "Density": {
        "description": "How tightly the app lays out controls and rows for one person.\n\n`AUTO` follows the pointer of the device in use: compact for a mouse or\ntrackpad, comfortable for touch. It is the default, so a null column reads as\n`AUTO`.",
        "enum": [
          "auto",
          "compact",
          "comfortable"
        ],
        "title": "Density",
        "type": "string"
      },
      "DesignCreateIn": {
        "properties": {
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "scene": {
            "additionalProperties": true,
            "title": "Scene",
            "type": "object"
          },
          "scene_version": {
            "minimum": 1.0,
            "title": "Scene Version",
            "type": "integer"
          },
          "source_asset_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Asset Id"
          }
        },
        "required": [
          "name",
          "scene",
          "scene_version"
        ],
        "title": "DesignCreateIn",
        "type": "object"
      },
      "DesignOut": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "export_asset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Asset Id"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "scene": {
            "additionalProperties": true,
            "title": "Scene",
            "type": "object"
          },
          "scene_version": {
            "title": "Scene Version",
            "type": "integer"
          },
          "source_asset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Asset Id"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "required": [
          "id",
          "name",
          "scene",
          "scene_version",
          "source_asset_id",
          "export_asset_id",
          "created_at",
          "updated_at"
        ],
        "title": "DesignOut",
        "type": "object"
      },
      "DesignRenderCreateIn": {
        "description": "A request to turn a design with a clip in it into an MP4.",
        "properties": {
          "over_object_key": {
            "minLength": 1,
            "title": "Over Object Key",
            "type": "string"
          },
          "source_asset_id": {
            "format": "uuid",
            "title": "Source Asset Id",
            "type": "string"
          },
          "spec": {
            "$ref": "#/components/schemas/RenderSpecIn"
          },
          "under_object_key": {
            "minLength": 1,
            "title": "Under Object Key",
            "type": "string"
          }
        },
        "required": [
          "source_asset_id",
          "under_object_key",
          "over_object_key",
          "spec"
        ],
        "title": "DesignRenderCreateIn",
        "type": "object"
      },
      "DesignRenderOut": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "design_id": {
            "title": "Design Id",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "output_asset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Asset Id"
          },
          "output_height": {
            "title": "Output Height",
            "type": "integer"
          },
          "output_width": {
            "title": "Output Width",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/RenderStatus"
          }
        },
        "required": [
          "id",
          "design_id",
          "status",
          "output_asset_id",
          "output_width",
          "output_height",
          "error",
          "created_at",
          "finished_at"
        ],
        "title": "DesignRenderOut",
        "type": "object"
      },
      "DesignUpdateIn": {
        "properties": {
          "expected_updated_at": {
            "format": "date-time",
            "title": "Expected Updated At",
            "type": "string"
          },
          "export_asset_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Export Asset Id"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 120,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "scene": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scene"
          },
          "scene_version": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scene Version"
          }
        },
        "title": "DesignUpdateIn",
        "type": "object"
      },
      "DestinationIn": {
        "properties": {
          "caption_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption Override"
          },
          "channel_id": {
            "format": "uuid",
            "title": "Channel Id",
            "type": "string"
          },
          "collaborators": {
            "default": [],
            "items": {
              "type": "string"
            },
            "title": "Collaborators",
            "type": "array"
          },
          "first_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Comment"
          },
          "format_override": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PostFormat"
              },
              {
                "type": "null"
              }
            ]
          },
          "link_tagging": {
            "description": "False sends every link exactly as written. Otherwise links to a site connected through Lundot are tagged so visits can be credited to the post.",
            "title": "Link Tagging",
            "type": "boolean"
          },
          "media": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/MediaItemIn"
            },
            "title": "Media",
            "type": "array"
          },
          "placement": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Placement"
          },
          "poll": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PollIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "settings": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "bluesky": "#/components/schemas/BlueskyPostSettings",
                    "facebook": "#/components/schemas/FacebookPostSettings",
                    "instagram": "#/components/schemas/InstagramPostSettings",
                    "linkedin": "#/components/schemas/LinkedInPostSettings",
                    "threads": "#/components/schemas/ThreadsPostSettings",
                    "tiktok": "#/components/schemas/TikTokPostSettings",
                    "x": "#/components/schemas/XPostSettings",
                    "youtube": "#/components/schemas/YouTubePostSettings"
                  },
                  "propertyName": "platform"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/XPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/BlueskyPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/LinkedInPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/YouTubePostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/InstagramPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/FacebookPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/ThreadsPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/TikTokPostSettings"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings"
          },
          "thread": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ThreadSegmentIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thread"
          }
        },
        "required": [
          "channel_id"
        ],
        "title": "DestinationIn",
        "type": "object"
      },
      "DisconnectedOut": {
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "count"
        ],
        "title": "DisconnectedOut",
        "type": "object"
      },
      "EngagementTotal": {
        "description": "`engagement` summed over a range, with the same honesty as a metric total.\n\nSeparate from `MetricTotal` because engagement is not a `MetricKey`: it is\nthe sum of the four inputs each platform reports, computed per post at\ncollection time. No rate rides here. Engagement and impressions are reported\nby different sets of posts once several platforms are in scope, so a ratio of\nthe two sums would have no single denominator to name. The rate is stated per\npost and per channel, where the platform is fixed.",
        "properties": {
          "reporting_post_count": {
            "title": "Reporting Post Count",
            "type": "integer"
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          }
        },
        "required": [
          "total",
          "reporting_post_count"
        ],
        "title": "EngagementTotal",
        "type": "object"
      },
      "Envelope_AccountExportOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountExportOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AccountExportOut]",
        "type": "object"
      },
      "Envelope_AccountKeyOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AccountKeyOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AccountKeyOut]",
        "type": "object"
      },
      "Envelope_AiConversationOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AiConversationOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AiConversationOut]",
        "type": "object"
      },
      "Envelope_AiFieldGenerateOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AiFieldGenerateOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AiFieldGenerateOut]",
        "type": "object"
      },
      "Envelope_AiProposalOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AiProposalOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AiProposalOut]",
        "type": "object"
      },
      "Envelope_AiSettingsOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AiSettingsOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AiSettingsOut]",
        "type": "object"
      },
      "Envelope_AiUsageOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AiUsageOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AiUsageOut]",
        "type": "object"
      },
      "Envelope_AlbumOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AlbumOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AlbumOut]",
        "type": "object"
      },
      "Envelope_AnalyticsSummary_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AnalyticsSummary"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AnalyticsSummary]",
        "type": "object"
      },
      "Envelope_AnalyticsTimeseries_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AnalyticsTimeseries"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AnalyticsTimeseries]",
        "type": "object"
      },
      "Envelope_ApiKeyOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ApiKeyOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ApiKeyOut]",
        "type": "object"
      },
      "Envelope_AssistantsDisconnectedOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AssistantsDisconnectedOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AssistantsDisconnectedOut]",
        "type": "object"
      },
      "Envelope_AuditEventPage_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AuditEventPage"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AuditEventPage]",
        "type": "object"
      },
      "Envelope_AutomationCountsOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AutomationCountsOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AutomationCountsOut]",
        "type": "object"
      },
      "Envelope_AutomationDetailOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AutomationDetailOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AutomationDetailOut]",
        "type": "object"
      },
      "Envelope_AutomationItemOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AutomationItemOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AutomationItemOut]",
        "type": "object"
      },
      "Envelope_AutomationOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AutomationOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AutomationOut]",
        "type": "object"
      },
      "Envelope_AutomationPreviewOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AutomationPreviewOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[AutomationPreviewOut]",
        "type": "object"
      },
      "Envelope_BrandOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/BrandOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[BrandOut]",
        "type": "object"
      },
      "Envelope_ChannelGroupOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ChannelGroupOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ChannelGroupOut]",
        "type": "object"
      },
      "Envelope_ChannelHealthOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ChannelHealthOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ChannelHealthOut]",
        "type": "object"
      },
      "Envelope_ChannelOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ChannelOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ChannelOut]",
        "type": "object"
      },
      "Envelope_ChannelStatsOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ChannelStatsOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ChannelStatsOut]",
        "type": "object"
      },
      "Envelope_ConnectResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ConnectResponse"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ConnectResponse]",
        "type": "object"
      },
      "Envelope_ConnectionStatusOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ConnectionStatusOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ConnectionStatusOut]",
        "type": "object"
      },
      "Envelope_ConsentStatusOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ConsentStatusOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ConsentStatusOut]",
        "type": "object"
      },
      "Envelope_ConversationReplyOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ConversationReplyOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ConversationReplyOut]",
        "type": "object"
      },
      "Envelope_DashboardSummary_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DashboardSummary"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[DashboardSummary]",
        "type": "object"
      },
      "Envelope_DesignOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DesignOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[DesignOut]",
        "type": "object"
      },
      "Envelope_DesignRenderOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DesignRenderOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[DesignRenderOut]",
        "type": "object"
      },
      "Envelope_DisconnectedOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DisconnectedOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[DisconnectedOut]",
        "type": "object"
      },
      "Envelope_FeaturePreferencesOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FeaturePreferencesOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[FeaturePreferencesOut]",
        "type": "object"
      },
      "Envelope_FeedLookupOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FeedLookupOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[FeedLookupOut]",
        "type": "object"
      },
      "Envelope_GatewayAppOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GatewayAppOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[GatewayAppOut]",
        "type": "object"
      },
      "Envelope_InboxCommentOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InboxCommentOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[InboxCommentOut]",
        "type": "object"
      },
      "Envelope_InboxConversationOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InboxConversationOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[InboxConversationOut]",
        "type": "object"
      },
      "Envelope_InboxSummaryOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InboxSummaryOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[InboxSummaryOut]",
        "type": "object"
      },
      "Envelope_InviteOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InviteOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[InviteOut]",
        "type": "object"
      },
      "Envelope_InvitePreviewOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/InvitePreviewOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[InvitePreviewOut]",
        "type": "object"
      },
      "Envelope_IssuedAccountKeyOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IssuedAccountKeyOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[IssuedAccountKeyOut]",
        "type": "object"
      },
      "Envelope_IssuedApiKeyOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IssuedApiKeyOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[IssuedApiKeyOut]",
        "type": "object"
      },
      "Envelope_IssuedInviteOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IssuedInviteOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[IssuedInviteOut]",
        "type": "object"
      },
      "Envelope_IssuedWebhookEndpointOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/IssuedWebhookEndpointOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[IssuedWebhookEndpointOut]",
        "type": "object"
      },
      "Envelope_LundotConnectOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LundotConnectOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[LundotConnectOut]",
        "type": "object"
      },
      "Envelope_LundotConnectionOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/LundotConnectionOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[LundotConnectionOut]",
        "type": "object"
      },
      "Envelope_MeOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MeOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[MeOut]",
        "type": "object"
      },
      "Envelope_MediaAssetOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MediaAssetOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[MediaAssetOut]",
        "type": "object"
      },
      "Envelope_MemberOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MemberOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[MemberOut]",
        "type": "object"
      },
      "Envelope_MembersOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/MembersOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[MembersOut]",
        "type": "object"
      },
      "Envelope_NextRunsOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/NextRunsOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[NextRunsOut]",
        "type": "object"
      },
      "Envelope_NotificationFeed_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/NotificationFeed"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[NotificationFeed]",
        "type": "object"
      },
      "Envelope_NotificationPreferencesOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/NotificationPreferencesOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[NotificationPreferencesOut]",
        "type": "object"
      },
      "Envelope_Page_AutomationOut__": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Page_AutomationOut_"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[Page[AutomationOut]]",
        "type": "object"
      },
      "Envelope_Page_InboxCommentOut__": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Page_InboxCommentOut_"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[Page[InboxCommentOut]]",
        "type": "object"
      },
      "Envelope_Page_InboxConversationOut__": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Page_InboxConversationOut_"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[Page[InboxConversationOut]]",
        "type": "object"
      },
      "Envelope_Page_PostGroupOut__": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Page_PostGroupOut_"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[Page[PostGroupOut]]",
        "type": "object"
      },
      "Envelope_Page_RepurposeJobOut__": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Page_RepurposeJobOut_"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[Page[RepurposeJobOut]]",
        "type": "object"
      },
      "Envelope_PlanUsageOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PlanUsageOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PlanUsageOut]",
        "type": "object"
      },
      "Envelope_PostAnalyticsPageOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PostAnalyticsPageOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PostAnalyticsPageOut]",
        "type": "object"
      },
      "Envelope_PostDetailOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PostDetailOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PostDetailOut]",
        "type": "object"
      },
      "Envelope_PostGroupOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PostGroupOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PostGroupOut]",
        "type": "object"
      },
      "Envelope_PostOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PostOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PostOut]",
        "type": "object"
      },
      "Envelope_PostRetryOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PostRetryOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PostRetryOut]",
        "type": "object"
      },
      "Envelope_PostingScheduleOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PostingScheduleOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PostingScheduleOut]",
        "type": "object"
      },
      "Envelope_PreferencesOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PreferencesOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PreferencesOut]",
        "type": "object"
      },
      "Envelope_ProfileOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ProfileOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ProfileOut]",
        "type": "object"
      },
      "Envelope_PublicStreakOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PublicStreakOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PublicStreakOut]",
        "type": "object"
      },
      "Envelope_PublishOptionsOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PublishOptionsOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PublishOptionsOut]",
        "type": "object"
      },
      "Envelope_PushDeviceOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PushDeviceOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[PushDeviceOut]",
        "type": "object"
      },
      "Envelope_ReferralClaimOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReferralClaimOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ReferralClaimOut]",
        "type": "object"
      },
      "Envelope_ReferralInviteOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReferralInviteOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ReferralInviteOut]",
        "type": "object"
      },
      "Envelope_ReferralOverviewOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReferralOverviewOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ReferralOverviewOut]",
        "type": "object"
      },
      "Envelope_ReplyPreviewOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReplyPreviewOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ReplyPreviewOut]",
        "type": "object"
      },
      "Envelope_ReplyVariantsOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ReplyVariantsOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[ReplyVariantsOut]",
        "type": "object"
      },
      "Envelope_RepurposeClipOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RepurposeClipOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[RepurposeClipOut]",
        "type": "object"
      },
      "Envelope_RepurposeJobDetailOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RepurposeJobDetailOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[RepurposeJobDetailOut]",
        "type": "object"
      },
      "Envelope_RepurposeJobOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RepurposeJobOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[RepurposeJobOut]",
        "type": "object"
      },
      "Envelope_SavedReplyOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SavedReplyOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[SavedReplyOut]",
        "type": "object"
      },
      "Envelope_SignInProvidersOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SignInProvidersOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[SignInProvidersOut]",
        "type": "object"
      },
      "Envelope_SignInSessionsOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SignInSessionsOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[SignInSessionsOut]",
        "type": "object"
      },
      "Envelope_StreakShareOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/StreakShareOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[StreakShareOut]",
        "type": "object"
      },
      "Envelope_SuggestedReplyOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SuggestedReplyOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[SuggestedReplyOut]",
        "type": "object"
      },
      "Envelope_SuspendedRunOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SuspendedRunOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[SuspendedRunOut]",
        "type": "object"
      },
      "Envelope_TagOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TagOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[TagOut]",
        "type": "object"
      },
      "Envelope_Union_AutoAnswerSuggestionOut__NoneType__": {
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AutoAnswerSuggestionOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[Union[AutoAnswerSuggestionOut, NoneType]]",
        "type": "object"
      },
      "Envelope_Union_PostingScheduleOut__NoneType__": {
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PostingScheduleOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[Union[PostingScheduleOut, NoneType]]",
        "type": "object"
      },
      "Envelope_Union_StreakShareOut__NoneType__": {
        "properties": {
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StreakShareOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[Union[StreakShareOut, NoneType]]",
        "type": "object"
      },
      "Envelope_UnsubscribeOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UnsubscribeOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[UnsubscribeOut]",
        "type": "object"
      },
      "Envelope_UploadIntentResponse_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/UploadIntentResponse"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[UploadIntentResponse]",
        "type": "object"
      },
      "Envelope_VariationSetOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/VariationSetOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[VariationSetOut]",
        "type": "object"
      },
      "Envelope_WebhookEndpointOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookEndpointOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[WebhookEndpointOut]",
        "type": "object"
      },
      "Envelope_WorkspaceDeletionOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WorkspaceDeletionOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[WorkspaceDeletionOut]",
        "type": "object"
      },
      "Envelope_WorkspaceDeletionResultOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WorkspaceDeletionResultOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[WorkspaceDeletionResultOut]",
        "type": "object"
      },
      "Envelope_WorkspaceSettingsOut_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WorkspaceSettingsOut"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[WorkspaceSettingsOut]",
        "type": "object"
      },
      "Envelope_WorkspaceSummary_": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WorkspaceSummary"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[WorkspaceSummary]",
        "type": "object"
      },
      "Envelope_dict_": {
        "properties": {
          "data": {
            "additionalProperties": true,
            "title": "Data",
            "type": "object"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[dict]",
        "type": "object"
      },
      "Envelope_list_AccountKeyOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AccountKeyOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[AccountKeyOut]]",
        "type": "object"
      },
      "Envelope_list_AiConversationMessageOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AiConversationMessageOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[AiConversationMessageOut]]",
        "type": "object"
      },
      "Envelope_list_AiConversationOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AiConversationOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[AiConversationOut]]",
        "type": "object"
      },
      "Envelope_list_AiProposalOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AiProposalOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[AiProposalOut]]",
        "type": "object"
      },
      "Envelope_list_AlbumOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AlbumOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[AlbumOut]]",
        "type": "object"
      },
      "Envelope_list_ApiKeyOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ApiKeyOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[ApiKeyOut]]",
        "type": "object"
      },
      "Envelope_list_ChannelGroupOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ChannelGroupOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[ChannelGroupOut]]",
        "type": "object"
      },
      "Envelope_list_ChannelOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ChannelOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[ChannelOut]]",
        "type": "object"
      },
      "Envelope_list_ConnectedAppOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ConnectedAppOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[ConnectedAppOut]]",
        "type": "object"
      },
      "Envelope_list_DesignOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DesignOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[DesignOut]]",
        "type": "object"
      },
      "Envelope_list_GatewayAppOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/GatewayAppOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[GatewayAppOut]]",
        "type": "object"
      },
      "Envelope_list_InboxMessageOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/InboxMessageOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[InboxMessageOut]]",
        "type": "object"
      },
      "Envelope_list_InviteOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/InviteOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[InviteOut]]",
        "type": "object"
      },
      "Envelope_list_MediaAssetOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/MediaAssetOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[MediaAssetOut]]",
        "type": "object"
      },
      "Envelope_list_PostGroupOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PostGroupOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[PostGroupOut]]",
        "type": "object"
      },
      "Envelope_list_PostingScheduleOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PostingScheduleOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[PostingScheduleOut]]",
        "type": "object"
      },
      "Envelope_list_QueueSlotOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/QueueSlotOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[QueueSlotOut]]",
        "type": "object"
      },
      "Envelope_list_SavedReplyOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SavedReplyOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[SavedReplyOut]]",
        "type": "object"
      },
      "Envelope_list_SuspendedRunOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SuspendedRunOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[SuspendedRunOut]]",
        "type": "object"
      },
      "Envelope_list_TagOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TagOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[TagOut]]",
        "type": "object"
      },
      "Envelope_list_VariationSetOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/VariationSetOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[VariationSetOut]]",
        "type": "object"
      },
      "Envelope_list_WebhookDeliveryOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[WebhookDeliveryOut]]",
        "type": "object"
      },
      "Envelope_list_WebhookEndpointOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookEndpointOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[WebhookEndpointOut]]",
        "type": "object"
      },
      "Envelope_list_WebhookEventGroupOut__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventGroupOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[WebhookEventGroupOut]]",
        "type": "object"
      },
      "Envelope_list_WorkspaceSummary__": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceSummary"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Meta"
          }
        },
        "required": [
          "data"
        ],
        "title": "Envelope[list[WorkspaceSummary]]",
        "type": "object"
      },
      "EvergreenProvenanceOut": {
        "description": "Why this post exists, and what is still republishing it.\n\nBoth halves are usually empty. They are on every post detail anyway because\nthe question they answer only comes up on the posts that do have an answer,\nand there is no way to know which those are without asking.",
        "properties": {
          "recycled_into": {
            "items": {
              "$ref": "#/components/schemas/EvergreenRecycledIntoOut"
            },
            "title": "Recycled Into",
            "type": "array"
          },
          "repost_of": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvergreenRepostOfOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "repost_of",
          "recycled_into"
        ],
        "title": "EvergreenProvenanceOut",
        "type": "object"
      },
      "EvergreenRecycledIntoOut": {
        "description": "One evergreen category item whose content was copied from this post.",
        "properties": {
          "automation_id": {
            "title": "Automation Id",
            "type": "string"
          },
          "automation_item_id": {
            "title": "Automation Item Id",
            "type": "string"
          },
          "automation_name": {
            "title": "Automation Name",
            "type": "string"
          },
          "publish_count": {
            "title": "Publish Count",
            "type": "integer"
          }
        },
        "required": [
          "automation_id",
          "automation_name",
          "automation_item_id",
          "publish_count"
        ],
        "title": "EvergreenRecycledIntoOut",
        "type": "object"
      },
      "EvergreenRepostOfOut": {
        "description": "The evergreen category publication that produced this post.",
        "properties": {
          "automation_id": {
            "title": "Automation Id",
            "type": "string"
          },
          "automation_item_id": {
            "title": "Automation Item Id",
            "type": "string"
          },
          "automation_name": {
            "title": "Automation Name",
            "type": "string"
          },
          "publication_index": {
            "title": "Publication Index",
            "type": "integer"
          },
          "source_post_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Post Id"
          }
        },
        "required": [
          "automation_id",
          "automation_name",
          "automation_item_id",
          "source_post_id",
          "publication_index"
        ],
        "title": "EvergreenRepostOfOut",
        "type": "object"
      },
      "EveryDaySelectorModel": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "const": "every_day",
            "default": "every_day",
            "title": "Kind",
            "type": "string"
          }
        },
        "title": "EveryDaySelectorModel",
        "type": "object"
      },
      "FacebookPostSettings": {
        "additionalProperties": false,
        "description": "Facebook's one choice, the post type, is `Post.format`.",
        "properties": {
          "platform": {
            "const": "facebook",
            "title": "Platform",
            "type": "string"
          }
        },
        "required": [
          "platform"
        ],
        "title": "FacebookPostSettings",
        "type": "object"
      },
      "FeatureGroup": {
        "description": "An optional part of the product a workspace can collapse.\n\nSeven members, and the test for membership is narrow: the surface has to be\nskippable without breaking anything else. Composing, posts, the gallery, and\nchannels are not here, because a workspace that turned publishing off would\nbe a workspace with nothing left. Those are the rail's fixed spine.\n\nThe editor and repurposing pass that test for a reason worth writing down:\nneither is the only door to itself. The editor still opens from the gallery\nand the composer, and clips already cut stay in the gallery, so collapsing\neither takes a rail row away and nothing else.\n\nTurning one off is a display choice and never a kill switch. Nothing stored\nis deleted, nothing already scheduled stops, and the routes stay reachable;\nonly the surface collapses. See `feature_preference_service` for where each\nmember's state is actually kept, which is not the same table for all of them.",
        "enum": [
          "assistant",
          "automations",
          "evergreen",
          "analytics",
          "inbox",
          "editor",
          "repurpose"
        ],
        "title": "FeatureGroup",
        "type": "string"
      },
      "FeaturePreferenceIn": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "feature": {
            "$ref": "#/components/schemas/FeatureGroup"
          }
        },
        "required": [
          "feature",
          "enabled"
        ],
        "title": "FeaturePreferenceIn",
        "type": "object"
      },
      "FeaturePreferenceOut": {
        "properties": {
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "feature": {
            "$ref": "#/components/schemas/FeatureGroup"
          }
        },
        "required": [
          "feature",
          "enabled"
        ],
        "title": "FeaturePreferenceOut",
        "type": "object"
      },
      "FeaturePreferencesIn": {
        "additionalProperties": false,
        "description": "A full replacement of this workspace's feature choices.\n\nA `PUT`, not a `PATCH`, matching the notification grid: the page holds every\nswitch it shows, so merging would let a stale tab bring back a group somebody\nhad collapsed. An omitted group falls back to its product default.",
        "properties": {
          "features": {
            "items": {
              "$ref": "#/components/schemas/FeaturePreferenceIn"
            },
            "title": "Features",
            "type": "array"
          }
        },
        "title": "FeaturePreferencesIn",
        "type": "object"
      },
      "FeaturePreferencesOut": {
        "description": "Every optional feature group and whether this workspace shows it.\n\nAlways the complete set with defaults applied, in a stable order, so the\nsettings page and the navigation rail render one fixed list rather than a\nshape that depends on what happens to be stored.\n\nA group that is off is collapsed, not revoked. Its data is untouched, its\nroute still loads, and anything already scheduled or configured keeps\nrunning; the rail simply stops offering it.",
        "properties": {
          "features": {
            "items": {
              "$ref": "#/components/schemas/FeaturePreferenceOut"
            },
            "title": "Features",
            "type": "array"
          }
        },
        "required": [
          "features"
        ],
        "title": "FeaturePreferencesOut",
        "type": "object"
      },
      "FeedKind": {
        "description": "What kind of feed a discovered address turned out to be.\n\nNever stored: this describes what the lookup found, for the guided page to\npick the right preset copy around (\"announce new videos\" versus \"share new\nposts\"). `PODCAST` is decided by the presence of an enclosure rather than by\nthe address, because a podcast's own feed address carries no marker of its\nown.",
        "enum": [
          "blog",
          "youtube",
          "podcast"
        ],
        "title": "FeedKind",
        "type": "string"
      },
      "FeedLookupIn": {
        "additionalProperties": false,
        "properties": {
          "url": {
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "FeedLookupIn",
        "type": "object"
      },
      "FeedLookupOut": {
        "description": "What `discover_feed` found: the feed address to store, and a preview of it.",
        "properties": {
          "feed_url": {
            "title": "Feed Url",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/FeedKind"
          },
          "latest_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Title"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "feed_url",
          "title",
          "kind",
          "latest_title"
        ],
        "title": "FeedLookupOut",
        "type": "object"
      },
      "FinalizeConnectEnvelope": {
        "description": "The channels connected, or, with `meta.account_choices`, an empty list and the accounts to choose from.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ChannelOut"
            },
            "title": "Data",
            "type": "array"
          },
          "meta": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FinalizeConnectMeta"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "data"
        ],
        "title": "FinalizeConnectEnvelope",
        "type": "object"
      },
      "FinalizeConnectMeta": {
        "description": "The login can bring in several accounts: nothing is connected yet. Finalize again with `selected_account_ids`.",
        "properties": {
          "account_choices": {
            "items": {
              "$ref": "#/components/schemas/AccountChoiceOut"
            },
            "title": "Account Choices",
            "type": "array"
          }
        },
        "required": [
          "account_choices"
        ],
        "title": "FinalizeConnectMeta",
        "type": "object"
      },
      "FinalizeConnectRequest": {
        "properties": {
          "callback_params": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Callback Params",
            "type": "object"
          },
          "selected_account_ids": {
            "description": "The accounts to connect, from `meta.account_choices` of an earlier answer. Send it with the same `callback_params`.",
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "minItems": 1,
            "title": "Selected Account Ids",
            "type": "array"
          }
        },
        "title": "FinalizeConnectRequest",
        "type": "object"
      },
      "GatewayAppIn": {
        "additionalProperties": false,
        "description": "An OAuth client to publish this workspace's posts on.\n\nBoth halves are required together. A rotation is the same request as a first\nentry, because a platform issues a new secret rather than amending the old\none, and a partial update would leave a pair that has never been checked as\na pair.",
        "properties": {
          "client_id": {
            "description": "The OAuth 2.0 client ID from the platform's developer portal.",
            "maxLength": 4096,
            "title": "Client Id",
            "type": "string"
          },
          "client_secret": {
            "description": "The OAuth 2.0 client secret. Stored encrypted and never returned by any read.",
            "maxLength": 4096,
            "title": "Client Secret",
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "client_secret"
        ],
        "title": "GatewayAppIn",
        "type": "object"
      },
      "GatewayAppOut": {
        "description": "Which app this workspace publishes on for one platform.\n\nThere is no secret here by design.",
        "properties": {
          "app_label": {
            "description": "What to call the credential being entered, such as \"X app\".",
            "title": "App Label",
            "type": "string"
          },
          "benefit": {
            "description": "What this workspace gets by bringing its own app here, as the settings page shows it. Differs per platform: on X it is the allowance that stops applying, because the bill moves with the app.",
            "title": "Benefit",
            "type": "string"
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The app in force, or null when the workspace brought none.",
            "title": "Client Id"
          },
          "configured": {
            "description": "False means posts go out on Publedia's app for this platform, and on X count against the plan's X allowance. True means they go out on, and are billed to, this workspace's own app.",
            "title": "Configured",
            "type": "boolean"
          },
          "gateway_kind": {
            "$ref": "#/components/schemas/GatewayKind",
            "description": "The gateway this app authenticates against."
          },
          "platform": {
            "$ref": "#/components/schemas/Platform",
            "description": "The platform that gateway publishes to."
          },
          "platform_label": {
            "description": "The platform as a person writes it, such as \"X\" or \"YouTube\".",
            "title": "Platform Label",
            "type": "string"
          },
          "portal_name": {
            "description": "What that place is called, for the link text.",
            "title": "Portal Name",
            "type": "string"
          },
          "portal_url": {
            "description": "Where the customer registers an app of their own.",
            "title": "Portal Url",
            "type": "string"
          },
          "verified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the platform last confirmed it accepts this client id and secret.",
            "title": "Verified At"
          }
        },
        "required": [
          "gateway_kind",
          "platform",
          "platform_label",
          "app_label",
          "benefit",
          "portal_url",
          "portal_name",
          "configured"
        ],
        "title": "GatewayAppOut",
        "type": "object"
      },
      "GatewayErrorKind": {
        "description": "Why one delivery did not happen, as stored on the post that did not go.\n\nTen of these classify an answer a platform gave. `PLAN_LIMIT` is the one\nthat classifies an answer Publedia gave, and it is in this enum rather than\nin a column of its own because a post has exactly one reason it did not go\nand a second column would be a second source of truth for it. Reusing a\nplatform kind instead was the alternative, and it would put a claim in a\ntyped column that the sentence beside it contradicts: every reader that\nswitches on the kind, from the post card to a webhook consumer, would be\ntold the platform refused a post the platform never saw.\n\nKeeping it here is also what makes it terminal for free. `RETRYABLE_KINDS`\nin the gateway errors is an allowlist, so a new member is\nterminal unless someone adds it, and a plan refusal must never be retried by\na sweep: nothing about waiting changes the answer.",
        "enum": [
          "auth",
          "rate_limit",
          "timeout",
          "validation",
          "policy",
          "permission",
          "not_found",
          "gateway_unavailable",
          "malformed_response",
          "unknown",
          "plan_limit",
          "app_unavailable"
        ],
        "title": "GatewayErrorKind",
        "type": "string"
      },
      "GatewayKind": {
        "enum": [
          "outstand",
          "native_youtube",
          "native_x",
          "native_bluesky",
          "native_linkedin",
          "native_tiktok"
        ],
        "title": "GatewayKind",
        "type": "string"
      },
      "GoalWeekStatus": {
        "description": "What one week did for the streak.",
        "enum": [
          "met",
          "rested",
          "missed",
          "in_progress",
          "not_started"
        ],
        "title": "GoalWeekStatus",
        "type": "string"
      },
      "GoalWeekSummary": {
        "description": "One week scored against the goal. See `GoalWeekStatus` for what each status does.",
        "properties": {
          "posts": {
            "title": "Posts",
            "type": "integer"
          },
          "start_date": {
            "format": "date",
            "title": "Start Date",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/GoalWeekStatus"
          }
        },
        "required": [
          "start_date",
          "posts",
          "status"
        ],
        "title": "GoalWeekSummary",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "InboxChannelSummary": {
        "description": "Open comments and open direct message conversations for one channel.",
        "properties": {
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "conversations_open": {
            "title": "Conversations Open",
            "type": "integer"
          },
          "open_count": {
            "title": "Open Count",
            "type": "integer"
          }
        },
        "required": [
          "channel_id",
          "open_count"
        ],
        "title": "InboxChannelSummary",
        "type": "object"
      },
      "InboxCommentOut": {
        "description": "One comment in the social inbox, optionally including one level of replies.",
        "properties": {
          "author_avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Avatar Url"
          },
          "author_external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author External Id"
          },
          "author_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Author Username"
          },
          "auto_reply_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Reply At"
          },
          "auto_reply_automation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Reply Automation Id"
          },
          "auto_reply_automation_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The name of the automation that holds this comment's auto-reply claim, or null when none does or it has since been deleted.",
            "title": "Auto Reply Automation Name"
          },
          "auto_reply_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Reply Reason"
          },
          "auto_reply_state": {
            "$ref": "#/components/schemas/AutoReplyState"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "can_hide": {
            "default": false,
            "description": "Whether this comment's connection can hide and unhide it. Asked of the channel's own gateway, so the same platform can answer either way.",
            "title": "Can Hide",
            "type": "boolean"
          },
          "channel_avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "On our own comments, a short-lived signed URL to the connected account's profile picture, which is how the platform shows them. Null on everyone else's, and when the account's picture is not known.",
            "title": "Channel Avatar Url"
          },
          "channel_handle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Handle"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "external_comment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Comment Id"
          },
          "flagged": {
            "default": false,
            "description": "Whether an inbox rule flagged this comment and it is still open. Handling the comment clears it.",
            "title": "Flagged",
            "type": "boolean"
          },
          "gateway_comment_id": {
            "title": "Gateway Comment Id",
            "type": "string"
          },
          "handled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Handled At"
          },
          "handled_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Handled By"
          },
          "handled_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What to call the member in `handled_by`: the name they chose, the one they signed up with, or their email address. Null when nobody handled it or none of those is known.",
            "title": "Handled By Name"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_hidden": {
            "title": "Is Hidden",
            "type": "boolean"
          },
          "is_own": {
            "title": "Is Own",
            "type": "boolean"
          },
          "last_activity_at": {
            "description": "When the thread last moved: this comment or the newest reply under it. The list is ordered by it.",
            "format": "date-time",
            "title": "Last Activity At",
            "type": "string"
          },
          "like_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Like Count"
          },
          "parent_external_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent External Id"
          },
          "permalink": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Permalink"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "post_caption_excerpt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Caption Excerpt"
          },
          "post_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Id"
          },
          "post_permalink": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Permalink"
          },
          "posted_at": {
            "format": "date-time",
            "title": "Posted At",
            "type": "string"
          },
          "replied_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Replied At"
          },
          "replies": {
            "items": {
              "$ref": "#/components/schemas/InboxCommentOut"
            },
            "title": "Replies",
            "type": "array"
          },
          "sent_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member who sent this reply from the inbox. The author fields stay the connected account's, as the platform shows it. Null on everything a member did not send.",
            "title": "Sent By"
          },
          "sent_by_avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A short-lived signed URL to `sent_by`'s profile picture, when they set one.",
            "title": "Sent By Avatar Url"
          },
          "sent_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What to call `sent_by`, named as `handled_by_name` is.",
            "title": "Sent By Name"
          },
          "status": {
            "$ref": "#/components/schemas/InboxCommentStatus"
          },
          "synced_at": {
            "format": "date-time",
            "title": "Synced At",
            "type": "string"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "channel_id",
          "platform",
          "gateway_comment_id",
          "body",
          "is_hidden",
          "is_own",
          "status",
          "posted_at",
          "last_activity_at",
          "synced_at",
          "auto_reply_state"
        ],
        "title": "InboxCommentOut",
        "type": "object"
      },
      "InboxCommentStatus": {
        "description": "Where a comment has got to in the workspace's queue.\n\nTwo members, because a third state nobody sets is a filter nobody uses. This\nis triage state and it is deliberately not the same thing as the comment's\nstate on the platform: hiding a comment does not handle it, and marking it\nhandled does not hide it. Those are two columns for that reason.\n\nStatus is per workspace, not per member. A shared queue is what a team inbox\nis, and per-member read state would need a member column this table does not\nhave.",
        "enum": [
          "open",
          "handled"
        ],
        "title": "InboxCommentStatus",
        "type": "string"
      },
      "InboxConversationOut": {
        "description": "One direct message conversation, as the inbox lists it.",
        "properties": {
          "can_reply": {
            "description": "Whether the channel can message and the reply window is still open.",
            "title": "Can Reply",
            "type": "boolean"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "contact_avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Avatar Url"
          },
          "contact_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "contact_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Name"
          },
          "contact_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Username"
          },
          "handled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Handled At"
          },
          "handled_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Handled By"
          },
          "handled_by_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What to call the member in `handled_by`: the name they chose, the one they signed up with, or their email address. Null when nobody handled it or none of those is known.",
            "title": "Handled By Name"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "last_inbound_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Inbound At"
          },
          "last_message": {
            "$ref": "#/components/schemas/ConversationLastMessage"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "reply_window_closes_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the contact can no longer be answered: 24 hours after their last message. Null when they never wrote.",
            "title": "Reply Window Closes At"
          },
          "status": {
            "$ref": "#/components/schemas/InboxCommentStatus",
            "description": "Open while any message from the contact is open, otherwise handled."
          }
        },
        "required": [
          "id",
          "channel_id",
          "platform",
          "contact_id",
          "contact_username",
          "contact_name",
          "contact_avatar_url",
          "status",
          "last_message",
          "last_inbound_at",
          "reply_window_closes_at",
          "can_reply"
        ],
        "title": "InboxConversationOut",
        "type": "object"
      },
      "InboxMessageOut": {
        "description": "One message in a conversation.",
        "properties": {
          "author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The member who sent this from the inbox. Null for the contact's messages and for ones an automation or the platform's own app sent.",
            "title": "Author"
          },
          "author_avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A short-lived signed URL to `author`'s profile picture, when they set one.",
            "title": "Author Avatar Url"
          },
          "auto_reply_automation_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Reply Automation Name"
          },
          "auto_reply_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Auto Reply Reason"
          },
          "auto_reply_state": {
            "$ref": "#/components/schemas/AutoReplyState"
          },
          "automation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The automation that answered this message, on the contact's side, or sent it, on ours.",
            "title": "Automation Id"
          },
          "body": {
            "title": "Body",
            "type": "string"
          },
          "conversation_id": {
            "title": "Conversation Id",
            "type": "string"
          },
          "delivery_failed": {
            "description": "Our message was accepted and the platform later reported it undelivered. The gateway's own words stay server side.",
            "title": "Delivery Failed",
            "type": "boolean"
          },
          "direction": {
            "$ref": "#/components/schemas/MessageDirection"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "sent_at": {
            "format": "date-time",
            "title": "Sent At",
            "type": "string"
          },
          "sent_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The id of the member `author` names, when there is one.",
            "title": "Sent By"
          }
        },
        "required": [
          "id",
          "conversation_id",
          "direction",
          "body",
          "sent_at",
          "author",
          "automation_id",
          "auto_reply_state",
          "delivery_failed"
        ],
        "title": "InboxMessageOut",
        "type": "object"
      },
      "InboxSummaryOut": {
        "description": "Open counts for the workspace and each channel that has something open.\n\n`total_open` counts top-level comments and `conversations_open` direct\nmessage conversations. They are kept apart so a caller can show either.",
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/InboxChannelSummary"
            },
            "title": "Channels",
            "type": "array"
          },
          "conversations_open": {
            "title": "Conversations Open",
            "type": "integer"
          },
          "total_open": {
            "title": "Total Open",
            "type": "integer"
          }
        },
        "required": [
          "total_open"
        ],
        "title": "InboxSummaryOut",
        "type": "object"
      },
      "InstagramPostSettings": {
        "additionalProperties": false,
        "properties": {
          "ai_generated": {
            "default": false,
            "title": "Ai Generated",
            "type": "boolean"
          },
          "platform": {
            "const": "instagram",
            "title": "Platform",
            "type": "string"
          },
          "reel_cover": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InstagramReelCover"
              },
              {
                "type": "null"
              }
            ]
          },
          "trial_reel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InstagramTrialReel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "platform"
        ],
        "title": "InstagramPostSettings",
        "type": "object"
      },
      "InstagramReelCover": {
        "additionalProperties": false,
        "description": "A reel's cover: an image from Files, or a frame of the video. Exactly one.",
        "properties": {
          "object_key": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Object Key"
          },
          "offset_ms": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Offset Ms"
          }
        },
        "title": "InstagramReelCover",
        "type": "object"
      },
      "InstagramTrialReel": {
        "description": "How a trial reel graduates to the account's followers.",
        "enum": [
          "manual",
          "performance"
        ],
        "title": "InstagramTrialReel",
        "type": "string"
      },
      "InviteCreateIn": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "maxLength": 320,
            "minLength": 3,
            "title": "Email",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole",
            "default": "editor"
          }
        },
        "required": [
          "email"
        ],
        "title": "InviteCreateIn",
        "type": "object"
      },
      "InviteOut": {
        "description": "One invitation. Never carries the token: only the creation response does.",
        "properties": {
          "accepted_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "invited_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Invited By"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          },
          "status": {
            "$ref": "#/components/schemas/InviteStatus"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "status",
          "invited_by",
          "expires_at",
          "accepted_at",
          "revoked_at",
          "created_at"
        ],
        "title": "InviteOut",
        "type": "object"
      },
      "InvitePreviewOut": {
        "description": "What an invitation link leads to.\n\nReadable by anyone holding the link, so it carries a workspace name, the role\non offer, and nothing about who else is in the workspace or what is in it.",
        "properties": {
          "email": {
            "title": "Email",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          },
          "status": {
            "$ref": "#/components/schemas/InviteStatus"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          },
          "workspace_name": {
            "title": "Workspace Name",
            "type": "string"
          }
        },
        "required": [
          "workspace_id",
          "workspace_name",
          "email",
          "role",
          "status",
          "expires_at"
        ],
        "title": "InvitePreviewOut",
        "type": "object"
      },
      "InviteStatus": {
        "description": "Where a workspace invite got to.\n\nDerived on read rather than stored. The row carries `accepted_at`,\n`revoked_at`, and `expires_at`, and a status column beside them would be a\nfourth fact that can disagree with the three: an invite would have to be\nswept to become `EXPIRED`, and until the sweep ran the column would lie.",
        "enum": [
          "pending",
          "accepted",
          "revoked",
          "expired"
        ],
        "title": "InviteStatus",
        "type": "string"
      },
      "IssuedAccountKeyOut": {
        "properties": {
          "key": {
            "$ref": "#/components/schemas/AccountKeyOut"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "key",
          "secret"
        ],
        "title": "IssuedAccountKeyOut",
        "type": "object"
      },
      "IssuedApiKeyOut": {
        "description": "The one response that carries a secret.\n\nDocumented as unrepeatable so a client shows it once and tells the person\nto store it, rather than offering a \"copy again\" affordance that would\nquietly fail.",
        "properties": {
          "key": {
            "$ref": "#/components/schemas/ApiKeyOut"
          },
          "secret": {
            "description": "Shown once. Publedia stores only a hash and cannot show it again.",
            "title": "Secret",
            "type": "string"
          }
        },
        "required": [
          "key",
          "secret"
        ],
        "title": "IssuedApiKeyOut",
        "type": "object"
      },
      "IssuedInviteOut": {
        "description": "A new invitation and the one copy of its token that will ever exist.\n\nOnly the hash is stored, so there is no endpoint that returns `token` again.\n`accept_path` is the link to hand over, as a path on the web app.\n\nThe API mails the link to the invited address once the invitation is saved.\n`emailed` says whether that went out and `email_error` why not; the invitation\nstands either way, and the inviter can still copy the link.",
        "properties": {
          "accept_path": {
            "title": "Accept Path",
            "type": "string"
          },
          "email_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email Error"
          },
          "emailed": {
            "title": "Emailed",
            "type": "boolean"
          },
          "invite": {
            "$ref": "#/components/schemas/InviteOut"
          },
          "token": {
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "invite",
          "token",
          "accept_path",
          "emailed",
          "email_error"
        ],
        "title": "IssuedInviteOut",
        "type": "object"
      },
      "IssuedWebhookEndpointOut": {
        "description": "The one response shape that carries a signing secret.",
        "properties": {
          "secret": {
            "description": "Shown when the webhook is created and when its secret is rotated, and at no other time. Store it: the only way to see another one is to rotate, which invalidates this one.",
            "title": "Secret",
            "type": "string"
          },
          "webhook": {
            "$ref": "#/components/schemas/WebhookEndpointOut"
          }
        },
        "required": [
          "webhook",
          "secret"
        ],
        "title": "IssuedWebhookEndpointOut",
        "type": "object"
      },
      "ItemRetiredReason": {
        "enum": [
          "manual",
          "repost_limit",
          "expired"
        ],
        "title": "ItemRetiredReason",
        "type": "string"
      },
      "LinkedInPostSettings": {
        "additionalProperties": false,
        "properties": {
          "allow_reshares": {
            "default": true,
            "title": "Allow Reshares",
            "type": "boolean"
          },
          "platform": {
            "const": "linkedin",
            "title": "Platform",
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/LinkedInVisibility",
            "default": "public"
          }
        },
        "required": [
          "platform"
        ],
        "title": "LinkedInPostSettings",
        "type": "object"
      },
      "LinkedInVisibility": {
        "enum": [
          "public",
          "connections"
        ],
        "title": "LinkedInVisibility",
        "type": "string"
      },
      "Locale": {
        "description": "The language the app is rendered in for one person.\n\nThe five languages the marketing site is published in, by bare BCP 47 tag.\nMirrors `Locale` in `apps/web/lib/i18n/locales.ts`. Stored against\n`lookup_locale`, so a new member is a migration inserting its row.",
        "enum": [
          "en",
          "es",
          "ru",
          "tr",
          "az"
        ],
        "title": "Locale",
        "type": "string"
      },
      "LundotConnectIn": {
        "additionalProperties": false,
        "properties": {
          "return_path": {
            "anyOf": [
              {
                "maxLength": 512,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where in the app to return after Lundot; a path under /app/.",
            "title": "Return Path"
          }
        },
        "title": "LundotConnectIn",
        "type": "object"
      },
      "LundotConnectOut": {
        "properties": {
          "authorization_url": {
            "description": "Lundot's sign-in and consent page. The state and PKCE verifier stay on the server.",
            "title": "Authorization Url",
            "type": "string"
          }
        },
        "required": [
          "authorization_url"
        ],
        "title": "LundotConnectOut",
        "type": "object"
      },
      "LundotConnectionOut": {
        "description": "The workspace's Lundot connection as the settings page shows it. No token is ever returned.",
        "properties": {
          "available": {
            "description": "Whether this workspace may connect Lundot at all.",
            "title": "Available",
            "type": "boolean"
          },
          "failed_markers": {
            "description": "Post markers Lundot refused for good or that ran out of retries. They are not sent again.",
            "title": "Failed Markers",
            "type": "integer"
          },
          "last_synced_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Synced At"
          },
          "remote_workspace": {
            "anyOf": [
              {
                "properties": {
                  "id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remote Workspace"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          },
          "sites": {
            "items": {
              "$ref": "#/components/schemas/LundotSiteOut"
            },
            "title": "Sites",
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/LundotConnectionStatus"
          },
          "status_changed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Changed At"
          }
        },
        "required": [
          "available",
          "status",
          "remote_workspace",
          "scopes",
          "sites",
          "last_synced_at",
          "status_changed_at",
          "failed_markers"
        ],
        "title": "LundotConnectionOut",
        "type": "object"
      },
      "LundotConnectionPatchIn": {
        "additionalProperties": false,
        "description": "Changes to the named sites; a field left out stays as it is.",
        "properties": {
          "sites": {
            "items": {
              "$ref": "#/components/schemas/LundotSiteChangeIn"
            },
            "maxItems": 100,
            "title": "Sites",
            "type": "array"
          }
        },
        "required": [
          "sites"
        ],
        "title": "LundotConnectionPatchIn",
        "type": "object"
      },
      "LundotConnectionStatus": {
        "description": "Where this workspace's Lundot connection stands.\n\n`reconnect_required` means Lundot refused the connection and nothing is sent until an admin connects again. `disconnect_pending` means calls have stopped but Lundot has not yet confirmed the revocation, which is retried.",
        "enum": [
          "not_connected",
          "connected",
          "reconnect_required",
          "disconnect_pending"
        ],
        "title": "LundotConnectionStatus",
        "type": "string"
      },
      "LundotGoalOut": {
        "properties": {
          "key": {
            "title": "Key",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "key",
          "name"
        ],
        "title": "LundotGoalOut",
        "type": "object"
      },
      "LundotOutcomeOut": {
        "description": "A post's visits and sign-ups from Lundot. Kept apart from the platform's metrics: a click the platform counts is not a visit the site recorded.",
        "properties": {
          "data_through": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Through"
          },
          "limitations": {
            "description": "What the numbers leave out, as Lundot and Publedia name it, such as `anonymous_to_identified_not_linked`: a sign-up in a later visit is not counted.",
            "items": {
              "type": "string"
            },
            "title": "Limitations",
            "type": "array"
          },
          "range": {
            "anyOf": [
              {
                "properties": {
                  "from": {
                    "format": "date",
                    "type": "string"
                  },
                  "to": {
                    "format": "date",
                    "type": "string"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Range"
          },
          "signups": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Of those visits, the ones that reached the site's sign-up goal in the same visit. Null when no goal is set or nothing is known.",
            "title": "Signups"
          },
          "status": {
            "$ref": "#/components/schemas/LundotOutcomeStatus"
          },
          "visits": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Visits that landed through this post's tagged links; null when not known, never 0 for unknown.",
            "title": "Visits"
          }
        },
        "required": [
          "status",
          "visits",
          "signups",
          "range",
          "data_through",
          "limitations"
        ],
        "title": "LundotOutcomeOut",
        "type": "object"
      },
      "LundotOutcomeStatus": {
        "description": "How far a post's visits and sign-ups can be told. `unsupported` covers a Strict site and a post whose links were not tagged (its own UTMs, tagging off, no link to a connected site, or published before connecting); `limitations` says which.",
        "enum": [
          "not_connected",
          "pending",
          "ready",
          "partial",
          "unsupported",
          "reconnect_required",
          "unavailable"
        ],
        "title": "LundotOutcomeStatus",
        "type": "string"
      },
      "LundotPostAttribution": {
        "description": "Whether a Lundot site can credit a visit to a post: `unsupported` for a Strict site, which keeps no query string.",
        "enum": [
          "supported",
          "partial",
          "unsupported"
        ],
        "title": "LundotPostAttribution",
        "type": "string"
      },
      "LundotSiteChangeIn": {
        "additionalProperties": false,
        "properties": {
          "goal": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Goal"
          },
          "id": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Id",
            "type": "string"
          },
          "tagging_enabled": {
            "title": "Tagging Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "id"
        ],
        "title": "LundotSiteChangeIn",
        "type": "object"
      },
      "LundotSiteOut": {
        "description": "A Lundot site this workspace's connection reaches.",
        "properties": {
          "domain": {
            "title": "Domain",
            "type": "string"
          },
          "goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The sign-up goal counted for this site, or null when none is set.",
            "title": "Goal"
          },
          "goals": {
            "description": "The goals Lundot lists for the site; empty when it lists none and the goal is typed by its key.",
            "items": {
              "$ref": "#/components/schemas/LundotGoalOut"
            },
            "title": "Goals",
            "type": "array"
          },
          "hostnames": {
            "items": {
              "type": "string"
            },
            "title": "Hostnames",
            "type": "array"
          },
          "id": {
            "description": "Lundot's id for the site.",
            "title": "Id",
            "type": "string"
          },
          "post_attribution": {
            "$ref": "#/components/schemas/LundotPostAttribution",
            "description": "Whether visits can be credited."
          },
          "privacy_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Privacy Profile"
          },
          "tagging_enabled": {
            "description": "Whether links to this site are tagged when a post is published.",
            "title": "Tagging Enabled",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "domain",
          "hostnames",
          "privacy_profile",
          "post_attribution",
          "goals",
          "goal",
          "tagging_enabled"
        ],
        "title": "LundotSiteOut",
        "type": "object"
      },
      "ManualPostMediaOut": {
        "description": "A file to attach by hand, and the index of the part of `parts` it belongs to.",
        "properties": {
          "mime_type": {
            "title": "Mime Type",
            "type": "string"
          },
          "object_key": {
            "title": "Object Key",
            "type": "string"
          },
          "part": {
            "title": "Part",
            "type": "integer"
          }
        },
        "required": [
          "part",
          "object_key",
          "mime_type"
        ],
        "title": "ManualPostMediaOut",
        "type": "object"
      },
      "ManualPostOut": {
        "description": "A failed X post that reached nothing on X, ready for its owner to post.",
        "properties": {
          "first_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Comment"
          },
          "intent_url": {
            "title": "Intent Url",
            "type": "string"
          },
          "media": {
            "items": {
              "$ref": "#/components/schemas/ManualPostMediaOut"
            },
            "title": "Media",
            "type": "array"
          },
          "over_limit": {
            "title": "Over Limit",
            "type": "boolean"
          },
          "own_app": {
            "description": "True when the platform refused the workspace's own X app, not Publedia's.",
            "title": "Own App",
            "type": "boolean"
          },
          "parts": {
            "items": {
              "type": "string"
            },
            "title": "Parts",
            "type": "array"
          },
          "poll_options": {
            "items": {
              "type": "string"
            },
            "title": "Poll Options",
            "type": "array"
          },
          "post_id": {
            "title": "Post Id",
            "type": "string"
          },
          "reason": {
            "$ref": "#/components/schemas/ManualPostReason"
          },
          "reply_settings": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/XReplyAudience"
              },
              {
                "type": "null"
              }
            ]
          },
          "retry_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the post is sent again by itself. Take it off the retry with `/post-by-hand` before posting it.",
            "title": "Retry At"
          }
        },
        "required": [
          "post_id",
          "reason",
          "own_app",
          "retry_at",
          "parts",
          "media",
          "intent_url",
          "poll_options",
          "first_comment",
          "reply_settings",
          "over_limit"
        ],
        "title": "ManualPostOut",
        "type": "object"
      },
      "ManualPostReason": {
        "enum": [
          "app_unavailable",
          "rate_limit"
        ],
        "title": "ManualPostReason",
        "type": "string"
      },
      "MarkPostedIn": {
        "additionalProperties": false,
        "properties": {
          "permalink": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Permalink"
          }
        },
        "title": "MarkPostedIn",
        "type": "object"
      },
      "MeOut": {
        "description": "Everything the app needs about the caller on first load.\n\n`profile` and `preferences` ride along with the workspace list because the\nshell needs all three before it can render anything, and three round trips to\npaint one screen is three chances to show a flash of the wrong theme.\n\n`messaging_available` is a fact about this deployment rather than the\ncaller: whether it can answer direct messages at all\n(`capabilities.messaging_scope_requested`). Where it cannot, the app offers\nno message automations and no Messages inbox, rather than asking anyone to\nreconnect an account that would still not be able to message.",
        "properties": {
          "active_workspace_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active Workspace Id"
          },
          "messaging_available": {
            "title": "Messaging Available",
            "type": "boolean"
          },
          "preferences": {
            "$ref": "#/components/schemas/PreferencesOut"
          },
          "profile": {
            "$ref": "#/components/schemas/ProfileOut"
          },
          "profile_id": {
            "title": "Profile Id",
            "type": "string"
          },
          "workspaces": {
            "items": {
              "$ref": "#/components/schemas/WorkspaceSummary"
            },
            "title": "Workspaces",
            "type": "array"
          }
        },
        "required": [
          "profile_id",
          "active_workspace_id",
          "workspaces",
          "profile",
          "preferences",
          "messaging_available"
        ],
        "title": "MeOut",
        "type": "object"
      },
      "MediaAssetOut": {
        "properties": {
          "album_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Album Id"
          },
          "alt_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alt Text"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "mime_type": {
            "title": "Mime Type",
            "type": "string"
          },
          "object_key": {
            "title": "Object Key",
            "type": "string"
          },
          "original_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The name the file was uploaded with, or null for a file uploaded before it was kept.",
            "title": "Original Name"
          },
          "post_count": {
            "default": 0,
            "title": "Post Count",
            "type": "integer"
          },
          "read_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read Url"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          }
        },
        "required": [
          "id",
          "album_id",
          "object_key",
          "mime_type",
          "size_bytes",
          "width",
          "height",
          "duration_seconds",
          "alt_text",
          "original_name"
        ],
        "title": "MediaAssetOut",
        "type": "object"
      },
      "MediaConfirmRequest": {
        "properties": {
          "album_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Album Id"
          },
          "alt_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alt Text"
          },
          "design_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Design Id"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "maximum": 86400.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "height": {
            "anyOf": [
              {
                "maximum": 65535.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "mime_type": {
            "minLength": 1,
            "title": "Mime Type",
            "type": "string"
          },
          "object_key": {
            "minLength": 1,
            "title": "Object Key",
            "type": "string"
          },
          "original_name": {
            "anyOf": [
              {
                "maxLength": 1024,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The file's name on the uploader's device, shown instead of the stored key. Only its last path segment is kept, at most 255 characters.",
            "title": "Original Name"
          },
          "size_bytes": {
            "exclusiveMinimum": 0.0,
            "title": "Size Bytes",
            "type": "integer"
          },
          "width": {
            "anyOf": [
              {
                "maximum": 65535.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          }
        },
        "required": [
          "object_key",
          "mime_type",
          "size_bytes"
        ],
        "title": "MediaConfirmRequest",
        "type": "object"
      },
      "MediaItemIn": {
        "properties": {
          "alt_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Alt Text"
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "media_asset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media Asset Id"
          },
          "mime_type": {
            "title": "Mime Type",
            "type": "string"
          },
          "object_key": {
            "title": "Object Key",
            "type": "string"
          },
          "order": {
            "default": 0,
            "title": "Order",
            "type": "integer"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          }
        },
        "required": [
          "object_key",
          "mime_type"
        ],
        "title": "MediaItemIn",
        "type": "object"
      },
      "MediaReplaceRequest": {
        "description": "A new file for an asset that already exists.\n\nNo `album_id` and no `alt_text`: those describe how the user filed and\ndescribed the asset, and a replacement is a change of bytes, not of filing.\n\nThe three dimensions default to `None` because they are optional in the\nrequest, but the route reads `model_fields_set` rather than the value: an\nomitted field is left as it was, and only an explicit `null` clears it. An\nimage export has nothing to say about `duration_seconds`, and silently\nnulling it would make omission destructive.",
        "properties": {
          "duration_seconds": {
            "anyOf": [
              {
                "maximum": 86400.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds"
          },
          "height": {
            "anyOf": [
              {
                "maximum": 65535.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "mime_type": {
            "minLength": 1,
            "title": "Mime Type",
            "type": "string"
          },
          "object_key": {
            "minLength": 1,
            "title": "Object Key",
            "type": "string"
          },
          "size_bytes": {
            "exclusiveMinimum": 0.0,
            "title": "Size Bytes",
            "type": "integer"
          },
          "width": {
            "anyOf": [
              {
                "maximum": 65535.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          }
        },
        "required": [
          "object_key",
          "mime_type",
          "size_bytes"
        ],
        "title": "MediaReplaceRequest",
        "type": "object"
      },
      "MemberOut": {
        "description": "One person in the workspace.\n\n`email` is null when `identity.users` could not be read; `MembersOut.\ndirectory_available` says which of the two it is, so the client can show\n\"addresses unavailable\" instead of a column of blanks.\n\n`is_owner` is true for the member who created the workspace. The creator\ncan never be removed, so the client leaves the removal and leave controls\noff that row.",
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "is_owner": {
            "title": "Is Owner",
            "type": "boolean"
          },
          "is_self": {
            "title": "Is Self",
            "type": "boolean"
          },
          "joined_at": {
            "format": "date-time",
            "title": "Joined At",
            "type": "string"
          },
          "membership_id": {
            "title": "Membership Id",
            "type": "string"
          },
          "profile_id": {
            "title": "Profile Id",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          }
        },
        "required": [
          "membership_id",
          "profile_id",
          "email",
          "display_name",
          "role",
          "joined_at",
          "is_self",
          "is_owner"
        ],
        "title": "MemberOut",
        "type": "object"
      },
      "MemberRoleUpdateIn": {
        "additionalProperties": false,
        "properties": {
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          }
        },
        "required": [
          "role"
        ],
        "title": "MemberRoleUpdateIn",
        "type": "object"
      },
      "MembersOut": {
        "properties": {
          "directory_available": {
            "title": "Directory Available",
            "type": "boolean"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/MemberOut"
            },
            "title": "Members",
            "type": "array"
          }
        },
        "required": [
          "members",
          "directory_available"
        ],
        "title": "MembersOut",
        "type": "object"
      },
      "MembershipRole": {
        "enum": [
          "admin",
          "editor",
          "viewer"
        ],
        "title": "MembershipRole",
        "type": "string"
      },
      "MessageDirection": {
        "description": "Which way a direct message went.\n\nStored for both directions because the conversation is read whole, and\nbecause our own sends coming back as outbound rows is what keeps a message\nautomation from answering itself: only inbound rows are ever dispatched.",
        "enum": [
          "inbound",
          "outbound"
        ],
        "title": "MessageDirection",
        "type": "string"
      },
      "MetricKey": {
        "enum": [
          "impressions",
          "views",
          "likes",
          "comments",
          "shares",
          "saves",
          "clicks"
        ],
        "title": "MetricKey",
        "type": "string"
      },
      "MetricSeries": {
        "description": "One metric's buckets across the whole range, named by the metric.\n\nEvery series in one response covers the same buckets in the same order, so a\nclient switching which metric it draws never refetches and never has to\nreconcile two axes.",
        "properties": {
          "buckets": {
            "items": {
              "$ref": "#/components/schemas/TimeseriesBucket"
            },
            "title": "Buckets",
            "type": "array"
          },
          "metric": {
            "$ref": "#/components/schemas/TimeseriesMetric"
          }
        },
        "required": [
          "metric",
          "buckets"
        ],
        "title": "MetricSeries",
        "type": "object"
      },
      "MetricTotal": {
        "description": "One metric summed over a range, and the population it was summed over.\n\n`total` is `None`, never `0`, when nothing in range reported the metric.\nPostgres already draws that line for free, `sum()` over no non-null rows is\nnull and `count(column)` skips nulls, and this model keeps it rather than\ncoalescing: a scope where no channel reports clicks has no click total, and\na zero there would read as \"nobody clicked\".\n\n`reporting_post_count` is why this is a model rather than a bare integer. A\nfigure summed over three of seven posts is not a workspace total, and a lone\nnumber cannot say which it is.",
        "properties": {
          "metric": {
            "$ref": "#/components/schemas/MetricKey"
          },
          "reporting_post_count": {
            "title": "Reporting Post Count",
            "type": "integer"
          },
          "total": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          }
        },
        "required": [
          "metric",
          "total",
          "reporting_post_count"
        ],
        "title": "MetricTotal",
        "type": "object"
      },
      "NextRunsIn": {
        "properties": {
          "automation_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Automation Id"
          },
          "count": {
            "default": 3,
            "maximum": 3.0,
            "minimum": 1.0,
            "title": "Count",
            "type": "integer"
          },
          "graph": {
            "$ref": "#/components/schemas/AutomationGraphIn"
          }
        },
        "required": [
          "graph"
        ],
        "title": "NextRunsIn",
        "type": "object"
      },
      "NextRunsOut": {
        "properties": {
          "basis": {
            "$ref": "#/components/schemas/ProjectionBasis"
          },
          "outcome": {
            "$ref": "#/components/schemas/NextRunsOutcome"
          },
          "runs": {
            "items": {
              "$ref": "#/components/schemas/ProjectedRunOut"
            },
            "title": "Runs",
            "type": "array"
          }
        },
        "required": [
          "basis",
          "outcome",
          "runs"
        ],
        "title": "NextRunsOut",
        "type": "object"
      },
      "NextRunsOutcome": {
        "enum": [
          "ready",
          "invalid"
        ],
        "title": "NextRunsOutcome",
        "type": "string"
      },
      "NodeRunStatus": {
        "enum": [
          "executed",
          "skipped",
          "halted"
        ],
        "title": "NodeRunStatus",
        "type": "string"
      },
      "NodeType": {
        "description": "Registry of automation graph node types.\n\nTwo flows live in this one list, and `FlowKind` in\neach block's spec is what keeps them apart. A\npublishing flow starts at `SCHEDULE` and ends at `PUBLISH`; a reply flow\nstarts at `COMMENT_RECEIVED` or `MESSAGE_RECEIVED` and ends at `SEND_REPLY`,\nor at `INBOX_ACTION` for an inbox rule. Which blocks are legal in which flow\nis declared on the block, not inferred from the name here, so that adding a\nthird flow later is a registry change rather than a rewrite of the\nvalidator.",
        "enum": [
          "schedule",
          "content_queue",
          "category_queue",
          "album_source",
          "rss_source",
          "mcp_source",
          "ai_generate",
          "fixed_content",
          "ai_rewrite",
          "add_hashtags",
          "append_cta",
          "condition",
          "content_filter",
          "multi_split",
          "delay",
          "approval_gate",
          "publish",
          "exit",
          "rate_limiter",
          "quiet_hours",
          "ab_split",
          "comment_received",
          "ai_reply",
          "send_reply",
          "message_received",
          "inbox_action",
          "post_published",
          "post_comment",
          "comment_intent",
          "article_source"
        ],
        "title": "NodeType",
        "type": "string"
      },
      "NotificationEvent": {
        "description": "Something worth telling a member about.\n\nOne vocabulary for both halves of the feature: `notifications.kind` records\nwhat happened, and `member_notification_preferences.event` records who wants\nto hear about it. A free string on either side would let a notification be\nwritten under a name no preference can ever silence.\n\nEvery member here is a signal this codebase already produces. Nothing\naspirational: an event with no producer is a switch that does nothing.",
        "enum": [
          "post_published",
          "post_failed",
          "automation_run_failed",
          "approval_requested",
          "channel_disconnected",
          "member_joined",
          "ai_budget_warning",
          "weekly_summary",
          "referral_reward",
          "comment_flagged",
          "comment_received",
          "workspace_deletion_scheduled"
        ],
        "title": "NotificationEvent",
        "type": "string"
      },
      "NotificationFeed": {
        "description": "The full `GET /notifications` payload.",
        "properties": {
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/NotificationItem"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items",
          "generated_at"
        ],
        "title": "NotificationFeed",
        "type": "object"
      },
      "NotificationItem": {
        "description": "One thing worth telling the workspace about.\n\nThe columns of the `notifications` table, in the same names, so the day a\nproducer starts writing rows this payload does not change shape. `read_at`\nis always null for now and is here for that reason rather than as a\nplaceholder: a client that renders it is already correct.\n\n`id` is derived from the kind and the row it came from, so it is stable\nacross reads. Two calls a second apart return the same id for the same\nfailed post, which is what a list key and a future dismissal both need.",
        "properties": {
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/NotificationEvent"
          },
          "read_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Read At"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "created_at"
        ],
        "title": "NotificationItem",
        "type": "object"
      },
      "NotificationPreferenceIn": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "title": "Email",
            "type": "boolean"
          },
          "event": {
            "$ref": "#/components/schemas/NotificationEvent"
          },
          "in_app": {
            "title": "In App",
            "type": "boolean"
          },
          "push": {
            "title": "Push",
            "type": "boolean"
          }
        },
        "required": [
          "event",
          "in_app",
          "email"
        ],
        "title": "NotificationPreferenceIn",
        "type": "object"
      },
      "NotificationPreferenceOut": {
        "properties": {
          "email": {
            "title": "Email",
            "type": "boolean"
          },
          "email_available": {
            "title": "Email Available",
            "type": "boolean"
          },
          "event": {
            "$ref": "#/components/schemas/NotificationEvent"
          },
          "in_app": {
            "title": "In App",
            "type": "boolean"
          },
          "push": {
            "title": "Push",
            "type": "boolean"
          },
          "push_available": {
            "title": "Push Available",
            "type": "boolean"
          }
        },
        "required": [
          "event",
          "in_app",
          "email",
          "email_available",
          "push",
          "push_available"
        ],
        "title": "NotificationPreferenceOut",
        "type": "object"
      },
      "NotificationPreferencesIn": {
        "additionalProperties": false,
        "description": "A full replacement of the caller's own settings for this workspace.\n\nA `PUT`, not a `PATCH`: the page holds the whole grid, and merging would let\na stale tab bring back a switch the member had turned off. An omitted event\nfalls back to its product default.\n\nThere is no member id here. A member writes their own settings and nobody\nelse's, so the acting profile comes from the verified token and there is\nnothing in the body to point somewhere else.",
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/NotificationPreferenceIn"
            },
            "title": "Events",
            "type": "array"
          }
        },
        "title": "NotificationPreferencesIn",
        "type": "object"
      },
      "NotificationPreferencesOut": {
        "description": "Every event and what the caller wants for it, in a stable order.\n\nAlways the complete set, defaults filled in, so the settings page renders one\nfixed list rather than a shape that depends on what happens to be stored.",
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/NotificationPreferenceOut"
            },
            "title": "Events",
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "title": "NotificationPreferencesOut",
        "type": "object"
      },
      "PageInfo": {
        "properties": {
          "page": {
            "default": 1,
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "default": 20,
            "title": "Page Size",
            "type": "integer"
          },
          "total": {
            "default": 0,
            "title": "Total",
            "type": "integer"
          }
        },
        "title": "PageInfo",
        "type": "object"
      },
      "Page_AutomationOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AutomationOut"
            },
            "title": "Items",
            "type": "array"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "items",
          "page_info"
        ],
        "title": "Page[AutomationOut]",
        "type": "object"
      },
      "Page_InboxCommentOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/InboxCommentOut"
            },
            "title": "Items",
            "type": "array"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "items",
          "page_info"
        ],
        "title": "Page[InboxCommentOut]",
        "type": "object"
      },
      "Page_InboxConversationOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/InboxConversationOut"
            },
            "title": "Items",
            "type": "array"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "items",
          "page_info"
        ],
        "title": "Page[InboxConversationOut]",
        "type": "object"
      },
      "Page_PostGroupOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PostGroupOut"
            },
            "title": "Items",
            "type": "array"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "items",
          "page_info"
        ],
        "title": "Page[PostGroupOut]",
        "type": "object"
      },
      "Page_RepurposeJobOut_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/RepurposeJobOut"
            },
            "title": "Items",
            "type": "array"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "items",
          "page_info"
        ],
        "title": "Page[RepurposeJobOut]",
        "type": "object"
      },
      "Permission": {
        "enum": [
          "workspace_manage",
          "workspace_delete",
          "membership_manage",
          "channel_manage",
          "media_write",
          "media_upload",
          "post_draft",
          "post_schedule",
          "post_publish",
          "post_retry",
          "post_cancel",
          "automation_manage",
          "automation_pause",
          "inbox_reply",
          "integration_manage",
          "read"
        ],
        "title": "Permission",
        "type": "string"
      },
      "PlanLimitsOut": {
        "description": "What this workspace may use. `null` on a field means unlimited.\n\nSent with the counts rather than looked up in the client's own catalog. The\nlimits are enforced server-side, so this is the only reading that can be\nright: a client comparing against its own table would be guessing, and the\nfirst thing it would guess wrong is a workspace whose X cap has been lifted\nbecause it brought its own X app.\n\n`storage_bytes` is bytes, for the same reason the count beside it is.",
        "properties": {
          "automations": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Automations"
          },
          "connected_accounts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Connected Accounts"
          },
          "scheduled_posts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled Posts"
          },
          "seats": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats"
          },
          "storage_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Bytes"
          },
          "x_posts": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "X Posts"
          }
        },
        "required": [
          "connected_accounts",
          "seats",
          "scheduled_posts",
          "storage_bytes",
          "automations",
          "x_posts"
        ],
        "title": "PlanLimitsOut",
        "type": "object"
      },
      "PlanUsageOut": {
        "description": "What this workspace is using, against the plan it is on.\n\nCounts and ceilings in one answer, because a meter needs both and two\nrequests could disagree across a plan change between them. The ceilings come\nfrom `PLAN_LIMITS_OUT` in the domain constants, beside the X cap the\nservices enforce; the web catalog keeps the prices, the names, the\ncopy, and the capabilities.\n\n`storage_bytes` is bytes, not gigabytes, on both halves: rounding is a\ndisplay decision and the API should not make it a second time.\n\n`x_posts` is posts and not rows, which is the one place these two numbers\nare not the same thing: X charges per post and a thread is one row and one\npost per segment, so the composer has to be able to say that a four-post\nthread spends four.",
        "properties": {
          "automations": {
            "title": "Automations",
            "type": "integer"
          },
          "base_plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingPlan"
              },
              {
                "type": "null"
              }
            ]
          },
          "bonus_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bonus Until"
          },
          "connected_accounts": {
            "title": "Connected Accounts",
            "type": "integer"
          },
          "limits": {
            "$ref": "#/components/schemas/PlanLimitsOut"
          },
          "period_end": {
            "format": "date-time",
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "format": "date-time",
            "title": "Period Start",
            "type": "string"
          },
          "plan": {
            "$ref": "#/components/schemas/BillingPlan"
          },
          "scheduled_posts": {
            "title": "Scheduled Posts",
            "type": "integer"
          },
          "seats": {
            "title": "Seats",
            "type": "integer"
          },
          "storage_bytes": {
            "title": "Storage Bytes",
            "type": "integer"
          },
          "x_posts": {
            "title": "X Posts",
            "type": "integer"
          }
        },
        "required": [
          "plan",
          "limits",
          "connected_accounts",
          "seats",
          "scheduled_posts",
          "storage_bytes",
          "automations",
          "x_posts",
          "period_start",
          "period_end"
        ],
        "title": "PlanUsageOut",
        "type": "object"
      },
      "Platform": {
        "enum": [
          "x",
          "linkedin",
          "facebook",
          "instagram",
          "tiktok",
          "youtube",
          "bluesky",
          "threads"
        ],
        "title": "Platform",
        "type": "string"
      },
      "PollIn": {
        "properties": {
          "duration_minutes": {
            "title": "Duration Minutes",
            "type": "integer"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/PollOptionIn"
            },
            "minItems": 1,
            "title": "Options",
            "type": "array"
          }
        },
        "required": [
          "options",
          "duration_minutes"
        ],
        "title": "PollIn",
        "type": "object"
      },
      "PollOptionIn": {
        "properties": {
          "label": {
            "title": "Label",
            "type": "string"
          }
        },
        "required": [
          "label"
        ],
        "title": "PollOptionIn",
        "type": "object"
      },
      "PostActionScope": {
        "enum": [
          "group",
          "post"
        ],
        "title": "PostActionScope",
        "type": "string"
      },
      "PostAnalyticsOut": {
        "description": "One published post and its latest reading, if it has one.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "captured_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Captured At"
          },
          "channel_display_name": {
            "title": "Channel Display Name",
            "type": "string"
          },
          "channel_handle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel Handle"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "collection": {
            "$ref": "#/components/schemas/CollectionState"
          },
          "engagement": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engagement"
          },
          "engagement_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engagement Rate"
          },
          "group_id": {
            "title": "Group Id",
            "type": "string"
          },
          "lundot": {
            "$ref": "#/components/schemas/LundotOutcomeOut"
          },
          "metrics": {
            "$ref": "#/components/schemas/PostMetricValues"
          },
          "permalink": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Permalink"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "post_id": {
            "title": "Post Id",
            "type": "string"
          },
          "published_at": {
            "format": "date-time",
            "title": "Published At",
            "type": "string"
          }
        },
        "required": [
          "post_id",
          "group_id",
          "caption",
          "platform",
          "channel_id",
          "channel_handle",
          "channel_display_name",
          "permalink",
          "published_at",
          "captured_at",
          "metrics",
          "engagement",
          "engagement_rate",
          "collection",
          "lundot"
        ],
        "title": "PostAnalyticsOut",
        "type": "object"
      },
      "PostAnalyticsPageOut": {
        "description": "One page of published posts, and the state of collection across the range.\n\n`last_collected_at` and `collection_degraded` describe every post the filters\nmatch, not only the posts on this page.",
        "properties": {
          "collection_degraded": {
            "title": "Collection Degraded",
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/PostAnalyticsOut"
            },
            "title": "Items",
            "type": "array"
          },
          "last_collected_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Collected At"
          },
          "page_info": {
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "items",
          "page_info",
          "last_collected_at",
          "collection_degraded"
        ],
        "title": "PostAnalyticsPageOut",
        "type": "object"
      },
      "PostCreateIn": {
        "description": "A post for one or more channels, or an idea with none.\n\nWith no destinations the request saves an idea: a caption, files or both, with\nchannels picked later through `POST /posts/groups/{group_id}/channels`.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "destinations": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/DestinationIn"
            },
            "title": "Destinations",
            "type": "array"
          },
          "format": {
            "$ref": "#/components/schemas/PostFormat",
            "description": "Required with destinations; an idea takes its format when channels are picked."
          },
          "media": {
            "description": "An idea's files. With destinations, each destination carries its own `media`.",
            "items": {
              "$ref": "#/components/schemas/MediaItemIn"
            },
            "title": "Media",
            "type": "array"
          },
          "media_ids": {
            "description": "Files of this workspace's Files, by id, in order. For an idea only, beside or instead of `media`.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Media Ids",
            "type": "array"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "PostCreateIn",
        "type": "object"
      },
      "PostDetailOut": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/PostEventOut"
            },
            "title": "Events",
            "type": "array"
          },
          "evergreen": {
            "$ref": "#/components/schemas/EvergreenProvenanceOut"
          },
          "group": {
            "$ref": "#/components/schemas/PostGroupOut"
          },
          "manual_posts": {
            "description": "Each channel of the group that may be posted on X by hand; usually empty.",
            "items": {
              "$ref": "#/components/schemas/ManualPostOut"
            },
            "title": "Manual Posts",
            "type": "array"
          },
          "media_read_urls": {
            "description": "Read URLs for the files in the post's `media_order` and in `manual_posts` that are in this workspace's library; a file the library no longer holds, or one the store cannot sign, is left out.",
            "items": {
              "$ref": "#/components/schemas/PostMediaReadUrlOut"
            },
            "title": "Media Read Urls",
            "type": "array"
          },
          "post": {
            "$ref": "#/components/schemas/PostOut"
          }
        },
        "required": [
          "post",
          "group",
          "events",
          "evergreen",
          "media_read_urls",
          "manual_posts"
        ],
        "title": "PostDetailOut",
        "type": "object"
      },
      "PostEventOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "data": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "post_id": {
            "title": "Post Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "post_id",
          "event_type",
          "data",
          "created_at"
        ],
        "title": "PostEventOut",
        "type": "object"
      },
      "PostFormat": {
        "enum": [
          "text",
          "image",
          "carousel",
          "video",
          "reel",
          "story",
          "poll",
          "thread"
        ],
        "title": "PostFormat",
        "type": "string"
      },
      "PostGroupAddChannelIn": {
        "additionalProperties": false,
        "properties": {
          "caption_override": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption Override"
          },
          "channel_id": {
            "format": "uuid",
            "title": "Channel Id",
            "type": "string"
          },
          "format_override": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PostFormat"
              },
              {
                "type": "null"
              }
            ]
          },
          "media": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/MediaItemIn"
            },
            "title": "Media",
            "type": "array"
          },
          "settings": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "bluesky": "#/components/schemas/BlueskyPostSettings",
                    "facebook": "#/components/schemas/FacebookPostSettings",
                    "instagram": "#/components/schemas/InstagramPostSettings",
                    "linkedin": "#/components/schemas/LinkedInPostSettings",
                    "threads": "#/components/schemas/ThreadsPostSettings",
                    "tiktok": "#/components/schemas/TikTokPostSettings",
                    "x": "#/components/schemas/XPostSettings",
                    "youtube": "#/components/schemas/YouTubePostSettings"
                  },
                  "propertyName": "platform"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/XPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/BlueskyPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/LinkedInPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/YouTubePostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/InstagramPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/FacebookPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/ThreadsPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/TikTokPostSettings"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings"
          }
        },
        "required": [
          "channel_id"
        ],
        "title": "PostGroupAddChannelIn",
        "type": "object"
      },
      "PostGroupKind": {
        "description": "What a post group is, derived and never stored. `idea` has no channel yet: it holds its own\n`caption` and `media` and no `posts`. `post` has at least one channel's post.",
        "enum": [
          "idea",
          "post"
        ],
        "title": "PostGroupKind",
        "type": "string"
      },
      "PostGroupOut": {
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An idea's text; null on a post.",
            "title": "Caption"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/PostGroupKind"
          },
          "media": {
            "description": "An idea's files; empty on a post.",
            "items": {},
            "title": "Media",
            "type": "array"
          },
          "posts": {
            "items": {
              "$ref": "#/components/schemas/PostOut"
            },
            "title": "Posts",
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/PostGroupStatus"
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/TagRefOut"
            },
            "title": "Tags",
            "type": "array"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id",
          "kind",
          "caption",
          "media",
          "status",
          "posts",
          "tags",
          "created_at"
        ],
        "title": "PostGroupOut",
        "type": "object"
      },
      "PostGroupStatus": {
        "description": "One compose action's status, derived from its posts by `derive_group_status`.\n\nNever stored. `QUEUED` is here for the same reason `SCHEDULED` is: a group\nwhose destinations are queued has to be filterable and renderable as queued,\nand without a member of its own it would derive to `DRAFT` and disappear\nfrom the surface that was meant to show it.",
        "enum": [
          "draft",
          "queued",
          "scheduled",
          "publishing",
          "published",
          "partially_failed",
          "failed",
          "cancelled"
        ],
        "title": "PostGroupStatus",
        "type": "string"
      },
      "PostGroupUpdateIn": {
        "additionalProperties": false,
        "description": "What an edit of an idea changes. An omitted field is left alone; null clears it. `media_ids`\nreplaces the files like `media` does, and the two are not sent together.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "media": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/MediaItemIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media"
          },
          "media_ids": {
            "description": "Files of this workspace's Files, by id, in order. For an idea only, beside or instead of `media`.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Media Ids",
            "type": "array"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "PostGroupUpdateIn",
        "type": "object"
      },
      "PostListSort": {
        "description": "The orders the posts list can be read in. Never stored.\n\n`NEWEST` and `OLDEST` order by the date the list row shows for a group's\nfirst post: when it was published, else when it is or was due, else when it\nwas last edited. `SOONEST` puts groups that are going out first, by the\nearliest scheduled or publishing channel, and every group with no time to\ngo out at after them, newest first.",
        "enum": [
          "newest",
          "oldest",
          "soonest"
        ],
        "title": "PostListSort",
        "type": "string"
      },
      "PostMediaReadUrlOut": {
        "description": "A short-lived URL to show one of the post's files, minted per response.",
        "properties": {
          "object_key": {
            "title": "Object Key",
            "type": "string"
          },
          "read_url": {
            "title": "Read Url",
            "type": "string"
          }
        },
        "required": [
          "object_key",
          "read_url"
        ],
        "title": "PostMediaReadUrlOut",
        "type": "object"
      },
      "PostMetricValues": {
        "description": "One reading. `None` means the platform does not report it, never zero.",
        "properties": {
          "clicks": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clicks"
          },
          "comments": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comments"
          },
          "impressions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Impressions"
          },
          "likes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Likes"
          },
          "saves": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Saves"
          },
          "shares": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Shares"
          },
          "views": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Views"
          }
        },
        "title": "PostMetricValues",
        "type": "object"
      },
      "PostOut": {
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "delivery_mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeliveryMode"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GatewayErrorKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "format": {
            "$ref": "#/components/schemas/PostFormat"
          },
          "gateway_delivery_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Delivery Id"
          },
          "group_id": {
            "title": "Group Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "media_order": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media Order"
          },
          "native_post_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Native Post Id"
          },
          "permalink": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Permalink"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "platform_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform Metadata"
          },
          "published_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published At"
          },
          "scheduled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled At"
          },
          "scheduled_via": {
            "$ref": "#/components/schemas/ScheduleOrigin"
          },
          "settings": {
            "discriminator": {
              "mapping": {
                "bluesky": "#/components/schemas/BlueskyPostSettings",
                "facebook": "#/components/schemas/FacebookPostSettings",
                "instagram": "#/components/schemas/InstagramPostSettings",
                "linkedin": "#/components/schemas/LinkedInPostSettings",
                "threads": "#/components/schemas/ThreadsPostSettings",
                "tiktok": "#/components/schemas/TikTokPostSettings",
                "x": "#/components/schemas/XPostSettings",
                "youtube": "#/components/schemas/YouTubePostSettings"
              },
              "propertyName": "platform"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/XPostSettings"
              },
              {
                "$ref": "#/components/schemas/BlueskyPostSettings"
              },
              {
                "$ref": "#/components/schemas/LinkedInPostSettings"
              },
              {
                "$ref": "#/components/schemas/YouTubePostSettings"
              },
              {
                "$ref": "#/components/schemas/InstagramPostSettings"
              },
              {
                "$ref": "#/components/schemas/FacebookPostSettings"
              },
              {
                "$ref": "#/components/schemas/ThreadsPostSettings"
              },
              {
                "$ref": "#/components/schemas/TikTokPostSettings"
              }
            ],
            "title": "Settings"
          },
          "status": {
            "$ref": "#/components/schemas/PostStatus"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "group_id",
          "channel_id",
          "platform",
          "status",
          "caption",
          "format",
          "scheduled_at",
          "scheduled_via",
          "created_by",
          "media_order",
          "platform_metadata",
          "gateway_delivery_id",
          "native_post_id",
          "permalink",
          "published_at",
          "delivery_mode",
          "error_kind",
          "error_message",
          "settings",
          "created_at",
          "updated_at"
        ],
        "title": "PostOut",
        "type": "object"
      },
      "PostRetryOut": {
        "description": "The group after a Retry, plus the failed posts it did not send again.\n\n`held` is empty when every failed post went again. A held post is still in\n`posts`, reading `failed` with its error, because its earlier delivery had\nto be kept: it went live, the platform could not confirm it, its channel\nneeds reconnecting, nothing records it, or the platform refused its content,\nits video file or its account.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "An idea's text; null on a post.",
            "title": "Caption"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "held": {
            "items": {
              "$ref": "#/components/schemas/RetryHeldOut"
            },
            "title": "Held",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/PostGroupKind"
          },
          "media": {
            "description": "An idea's files; empty on a post.",
            "items": {},
            "title": "Media",
            "type": "array"
          },
          "posts": {
            "items": {
              "$ref": "#/components/schemas/PostOut"
            },
            "title": "Posts",
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/PostGroupStatus"
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/TagRefOut"
            },
            "title": "Tags",
            "type": "array"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id",
          "kind",
          "caption",
          "media",
          "status",
          "posts",
          "tags",
          "created_at",
          "held"
        ],
        "title": "PostRetryOut",
        "type": "object"
      },
      "PostStatus": {
        "description": "Where one channel's post is in its lifecycle.\n\n`QUEUED` is a holding state, not a scheduled one. A queued post is finished\nand waiting, and it carries no `scheduled_at` at all, which is what keeps it\naway from delivery: `PostRepository.claim_due_posts` selects `SCHEDULED`\nrows whose time has come, and a queued row fails both halves of that.\n\nIt replaced a queue that resolved each channel's next free posting slot and\nwrote a concrete instant, which made queueing a scheduling action wearing\nanother name. Deciding when a queued post goes out is work automations will\ndo; the posting-schedule tables and the slot resolution are still there for\nthem, unused by this path.\n\n`posts.status` is the native enum type `post_status`, labelled with these\nvalues, so a new member needs a migration adding its label.",
        "enum": [
          "draft",
          "queued",
          "scheduled",
          "publishing",
          "published",
          "failed",
          "cancelled"
        ],
        "title": "PostStatus",
        "type": "string"
      },
      "PostStatusCounts": {
        "additionalProperties": false,
        "description": "Count of workspace posts in each `PostStatus`. Zero, not absent, when none exist.\n\nOne field per member of that enum, and `extra=\"forbid\"` is what keeps the\ntwo in step: `_post_status_counts` below builds its dict from the enum\nitself, so a member added there and forgotten here fails loudly at\nconstruction rather than going missing from a total that still looks right.",
        "properties": {
          "cancelled": {
            "default": 0,
            "title": "Cancelled",
            "type": "integer"
          },
          "draft": {
            "default": 0,
            "title": "Draft",
            "type": "integer"
          },
          "failed": {
            "default": 0,
            "title": "Failed",
            "type": "integer"
          },
          "published": {
            "default": 0,
            "title": "Published",
            "type": "integer"
          },
          "publishing": {
            "default": 0,
            "title": "Publishing",
            "type": "integer"
          },
          "queued": {
            "default": 0,
            "title": "Queued",
            "type": "integer"
          },
          "scheduled": {
            "default": 0,
            "title": "Scheduled",
            "type": "integer"
          }
        },
        "title": "PostStatusCounts",
        "type": "object"
      },
      "PostTagsApplyIn": {
        "additionalProperties": false,
        "description": "Add and remove tags across a selection of compose actions.\n\nAdd and remove rather than a replacement set: over a mixed selection a\nreplacement silently strips the labels the other groups had. The composer's\nsingle-group case computes its own diff and sends one group id, so one\nendpoint serves both callers.",
        "properties": {
          "add": {
            "default": [],
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Add",
            "type": "array"
          },
          "group_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Group Ids",
            "type": "array"
          },
          "remove": {
            "default": [],
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Remove",
            "type": "array"
          }
        },
        "required": [
          "group_ids"
        ],
        "title": "PostTagsApplyIn",
        "type": "object"
      },
      "PostUpdateIn": {
        "additionalProperties": false,
        "description": "What an edit of one draft changes.\n\nEvery field a destination takes in `DestinationIn` beyond the channel, with\nthe same types and so the same validation. An omitted field leaves the\npost's value alone; an explicit null clears it, which for `media` and\n`collaborators` means none.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "collaborators": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collaborators"
          },
          "expected_updated_at": {
            "description": "The post's `updated_at` this edit was made against. When the post has changed since, the edit is refused with 409 `post_conflict` instead of overwriting the newer version.",
            "format": "date-time",
            "title": "Expected Updated At",
            "type": "string"
          },
          "first_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Comment"
          },
          "format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PostFormat"
              },
              {
                "type": "null"
              }
            ]
          },
          "link_tagging": {
            "description": "False sends every link exactly as written. Otherwise links to a site connected through Lundot are tagged so visits can be credited to the post.",
            "title": "Link Tagging",
            "type": "boolean"
          },
          "media": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/MediaItemIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media"
          },
          "placement": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Placement"
          },
          "poll": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PollIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "settings": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "bluesky": "#/components/schemas/BlueskyPostSettings",
                    "facebook": "#/components/schemas/FacebookPostSettings",
                    "instagram": "#/components/schemas/InstagramPostSettings",
                    "linkedin": "#/components/schemas/LinkedInPostSettings",
                    "threads": "#/components/schemas/ThreadsPostSettings",
                    "tiktok": "#/components/schemas/TikTokPostSettings",
                    "x": "#/components/schemas/XPostSettings",
                    "youtube": "#/components/schemas/YouTubePostSettings"
                  },
                  "propertyName": "platform"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/XPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/BlueskyPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/LinkedInPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/YouTubePostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/InstagramPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/FacebookPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/ThreadsPostSettings"
                  },
                  {
                    "$ref": "#/components/schemas/TikTokPostSettings"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings"
          },
          "thread": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ThreadSegmentIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thread"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "PostUpdateIn",
        "type": "object"
      },
      "PostingConsistencyDay": {
        "description": "One local calendar day in the consistency grid, zero-filled when idle.\n\n`count` is posts, not deliveries: one post sent to three channels is one.\nIt is read beside a goal in posts a week, and a day that counted each\nchannel would report three posts where the week reports one.",
        "properties": {
          "count": {
            "title": "Count",
            "type": "integer"
          },
          "date": {
            "format": "date",
            "title": "Date",
            "type": "string"
          }
        },
        "required": [
          "date",
          "count"
        ],
        "title": "PostingConsistencyDay",
        "type": "object"
      },
      "PostingConsistencySummary": {
        "description": "Posts published per local day, plus the daily streaks derived from them.\n\n`days` always holds `CONSISTENCY_WINDOW_DAYS` consecutive entries ending on\n`end_date`, so the grid geometry never depends on how active a workspace is.\nDays are in the workspace's timezone unless the request named another.",
        "properties": {
          "active_days": {
            "title": "Active Days",
            "type": "integer"
          },
          "current_streak_days": {
            "title": "Current Streak Days",
            "type": "integer"
          },
          "days": {
            "items": {
              "$ref": "#/components/schemas/PostingConsistencyDay"
            },
            "title": "Days",
            "type": "array"
          },
          "end_date": {
            "format": "date",
            "title": "End Date",
            "type": "string"
          },
          "longest_streak_days": {
            "title": "Longest Streak Days",
            "type": "integer"
          },
          "start_date": {
            "format": "date",
            "title": "Start Date",
            "type": "string"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          },
          "total_published": {
            "title": "Total Published",
            "type": "integer"
          }
        },
        "required": [
          "start_date",
          "end_date",
          "timezone",
          "total_published",
          "active_days",
          "current_streak_days",
          "longest_streak_days",
          "days"
        ],
        "title": "PostingConsistencySummary",
        "type": "object"
      },
      "PostingGoalSummary": {
        "description": "This week against the workspace's goal, and the streak of weeks that met it.\n\nAlways in the workspace's own timezone, whatever zone the request asked the\nday grid in: the streak is the workspace's, and it is the same number on\nHome and on a public share link, which has no reader zone to go by.",
        "properties": {
          "current_streak_since": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Streak Since"
          },
          "current_streak_weeks": {
            "title": "Current Streak Weeks",
            "type": "integer"
          },
          "goal_is_set": {
            "title": "Goal Is Set",
            "type": "boolean"
          },
          "longest_streak_weeks": {
            "title": "Longest Streak Weeks",
            "type": "integer"
          },
          "posts_per_week": {
            "title": "Posts Per Week",
            "type": "integer"
          },
          "rest_weeks_available": {
            "title": "Rest Weeks Available",
            "type": "integer"
          },
          "this_week_posts": {
            "title": "This Week Posts",
            "type": "integer"
          },
          "this_week_scheduled": {
            "title": "This Week Scheduled",
            "type": "integer"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          },
          "week_start_date": {
            "format": "date",
            "title": "Week Start Date",
            "type": "string"
          },
          "weeks": {
            "items": {
              "$ref": "#/components/schemas/GoalWeekSummary"
            },
            "title": "Weeks",
            "type": "array"
          },
          "weeks_per_rest_week": {
            "title": "Weeks Per Rest Week",
            "type": "integer"
          }
        },
        "required": [
          "timezone",
          "posts_per_week",
          "goal_is_set",
          "week_start_date",
          "this_week_posts",
          "this_week_scheduled",
          "current_streak_weeks",
          "longest_streak_weeks",
          "current_streak_since",
          "rest_weeks_available",
          "weeks_per_rest_week",
          "weeks"
        ],
        "title": "PostingGoalSummary",
        "type": "object"
      },
      "PostingScheduleIn": {
        "additionalProperties": false,
        "description": "A channel's whole posting week.\n\nThe whole week rather than one slot, because there is no per-slot row to\naddress: `times_of_day` crossed with `day_selector` is the week.",
        "properties": {
          "day_selector": {
            "discriminator": {
              "mapping": {
                "days_of_month": "#/components/schemas/DaysOfMonthSelectorModel",
                "days_of_week": "#/components/schemas/DaysOfWeekSelectorModel",
                "every_day": "#/components/schemas/EveryDaySelectorModel"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/EveryDaySelectorModel"
              },
              {
                "$ref": "#/components/schemas/DaysOfWeekSelectorModel"
              },
              {
                "$ref": "#/components/schemas/DaysOfMonthSelectorModel"
              }
            ],
            "title": "Day Selector"
          },
          "times_of_day": {
            "items": {
              "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$",
              "type": "string"
            },
            "maxItems": 24,
            "minItems": 1,
            "title": "Times Of Day",
            "type": "array"
          }
        },
        "required": [
          "times_of_day",
          "day_selector"
        ],
        "title": "PostingScheduleIn",
        "type": "object"
      },
      "PostingScheduleOut": {
        "properties": {
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "day_selector": {
            "discriminator": {
              "mapping": {
                "days_of_month": "#/components/schemas/DaysOfMonthSelectorModel",
                "days_of_week": "#/components/schemas/DaysOfWeekSelectorModel",
                "every_day": "#/components/schemas/EveryDaySelectorModel"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/EveryDaySelectorModel"
              },
              {
                "$ref": "#/components/schemas/DaysOfWeekSelectorModel"
              },
              {
                "$ref": "#/components/schemas/DaysOfMonthSelectorModel"
              }
            ],
            "title": "Day Selector"
          },
          "next_slot_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Slot At"
          },
          "times_of_day": {
            "items": {
              "type": "string"
            },
            "title": "Times Of Day",
            "type": "array"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          }
        },
        "required": [
          "channel_id",
          "times_of_day",
          "day_selector",
          "timezone",
          "next_slot_at"
        ],
        "title": "PostingScheduleOut",
        "type": "object"
      },
      "PreferencesOut": {
        "description": "Display and time settings, with the product defaults already applied.\n\nNever null. The client renders these directly; deciding what an unset\nappearance means is the server's job and is done once, in\n`account_service.DEFAULT_PREFERENCES`.",
        "properties": {
          "appearance": {
            "$ref": "#/components/schemas/Appearance"
          },
          "date_format": {
            "$ref": "#/components/schemas/DateFormat"
          },
          "density": {
            "$ref": "#/components/schemas/Density"
          },
          "locale": {
            "$ref": "#/components/schemas/Locale"
          },
          "locale_chosen": {
            "title": "Locale Chosen",
            "type": "boolean"
          },
          "time_format": {
            "$ref": "#/components/schemas/TimeFormat"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          },
          "week_start": {
            "$ref": "#/components/schemas/WeekStart"
          }
        },
        "required": [
          "timezone",
          "time_format",
          "date_format",
          "week_start",
          "appearance",
          "density",
          "locale",
          "locale_chosen"
        ],
        "title": "PreferencesOut",
        "type": "object"
      },
      "PreferencesUpdateIn": {
        "additionalProperties": false,
        "description": "A partial update: an omitted field keeps its current value.\n\nNo field is nullable. Every preference has a default, so \"clear this\" and\n\"set it back to the default\" are the same request, and the client makes it by\nsending the default value rather than a null the server would have to\ninterpret.",
        "properties": {
          "appearance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Appearance"
              },
              {
                "type": "null"
              }
            ]
          },
          "date_format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DateFormat"
              },
              {
                "type": "null"
              }
            ]
          },
          "density": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Density"
              },
              {
                "type": "null"
              }
            ]
          },
          "locale": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Locale"
              },
              {
                "type": "null"
              }
            ]
          },
          "time_format": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TimeFormat"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "week_start": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WeekStart"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "PreferencesUpdateIn",
        "type": "object"
      },
      "PreviewDestinationOut": {
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "channel_name": {
            "title": "Channel Name",
            "type": "string"
          }
        },
        "required": [
          "channel_id",
          "channel_name",
          "caption"
        ],
        "title": "PreviewDestinationOut",
        "type": "object"
      },
      "PreviewNodeResultOut": {
        "properties": {
          "execution_count": {
            "title": "Execution Count",
            "type": "integer"
          },
          "node_id": {
            "title": "Node Id",
            "type": "string"
          },
          "node_type": {
            "$ref": "#/components/schemas/NodeType"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "status": {
            "$ref": "#/components/schemas/NodeRunStatus"
          }
        },
        "required": [
          "node_id",
          "node_type",
          "status",
          "execution_count",
          "reason"
        ],
        "title": "PreviewNodeResultOut",
        "type": "object"
      },
      "PreviewPathStepOut": {
        "properties": {
          "source": {
            "title": "Source",
            "type": "string"
          },
          "source_handle": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Handle"
          },
          "target": {
            "title": "Target",
            "type": "string"
          }
        },
        "required": [
          "source",
          "target",
          "source_handle"
        ],
        "title": "PreviewPathStepOut",
        "type": "object"
      },
      "PreviewPostAction": {
        "enum": [
          "draft",
          "publish",
          "schedule"
        ],
        "title": "PreviewPostAction",
        "type": "string"
      },
      "PreviewPostOut": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/PreviewPostAction"
          },
          "action_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action At"
          },
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "destinations": {
            "items": {
              "$ref": "#/components/schemas/PreviewDestinationOut"
            },
            "title": "Destinations",
            "type": "array"
          },
          "format": {
            "$ref": "#/components/schemas/PostFormat"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "media": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Media",
            "type": "array"
          }
        },
        "required": [
          "id",
          "caption",
          "destinations",
          "media",
          "format",
          "action",
          "action_at"
        ],
        "title": "PreviewPostOut",
        "type": "object"
      },
      "PreviewRunOutcome": {
        "enum": [
          "produced",
          "no_output",
          "failed",
          "invalid_configuration"
        ],
        "title": "PreviewRunOutcome",
        "type": "string"
      },
      "PreviewRunResultOut": {
        "properties": {
          "consumed_item_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Consumed Item Id"
          },
          "created_post_ids": {
            "items": {
              "type": "string"
            },
            "title": "Created Post Ids",
            "type": "array"
          },
          "drafted_post_ids": {
            "items": {
              "type": "string"
            },
            "title": "Drafted Post Ids",
            "type": "array"
          },
          "failed": {
            "title": "Failed",
            "type": "boolean"
          },
          "gated": {
            "title": "Gated",
            "type": "boolean"
          },
          "node_results": {
            "items": {
              "$ref": "#/components/schemas/PreviewNodeResultOut"
            },
            "title": "Node Results",
            "type": "array"
          },
          "path_taken": {
            "items": {
              "$ref": "#/components/schemas/PreviewPathStepOut"
            },
            "title": "Path Taken",
            "type": "array"
          },
          "queue_empty": {
            "title": "Queue Empty",
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "required": [
          "created_post_ids",
          "drafted_post_ids",
          "consumed_item_id",
          "queue_empty",
          "gated",
          "reason",
          "failed",
          "node_results",
          "path_taken"
        ],
        "title": "PreviewRunResultOut",
        "type": "object"
      },
      "PrimaryOutcome": {
        "description": "What one workspace is for, in the words of the person who set it up.\n\nOn the workspace rather than the person, because one agency operator runs\ndifferent workflows in different client workspaces: the brand they publish\nfor weekly and the brand they only report on are two answers, not one.\n\nEvery member here changes the get-started checklist, which is the rule the\nquestion exists under: an answer that changes nothing should not be asked\nfor. `CONVERT_ENGAGEMENT` is the weakest of the six today, because Publedia\nhas no comment or direct-message surface to send someone to; it ranks\nchannel connection first and says why, which is the honest version of the\n\"only for supported channels\" rule.",
        "enum": [
          "publish_consistently",
          "adapt_content",
          "manage_brands",
          "automate_work",
          "understand_performance",
          "convert_engagement"
        ],
        "title": "PrimaryOutcome",
        "type": "string"
      },
      "ProfileOut": {
        "description": "The caller as the product renders them.\n\n`email` comes from `identity.users`, not from this schema, so it is null when\nthat table cannot be read from the API's database. `display_name` is null when\nnobody ever set one, which the client shows as the email address rather than\nas a blank.",
        "properties": {
          "avatar_object_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Object Key"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "working_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkingContext"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "display_name",
          "email",
          "avatar_object_key",
          "working_context"
        ],
        "title": "ProfileOut",
        "type": "object"
      },
      "ProfileUpdateIn": {
        "additionalProperties": false,
        "description": "A partial update to the caller's own name, avatar, and working context.\n\nEvery field is explicitly nullable, and null means \"remove this\" rather than\n\"leave it alone\", which is why `to_update` reads `model_fields_set` instead\nof the values. Without that a member could never take their avatar off again,\nor go back to not having said what kind of work they do.\n\nWrites `profiles` only. `identity.users` is not touched; see the\n`Profile` model docstring for why that makes this the source of truth rather\nthan a copy.",
        "properties": {
          "avatar_object_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Object Key"
          },
          "display_name": {
            "anyOf": [
              {
                "maxLength": 120,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "working_context": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WorkingContext"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "ProfileUpdateIn",
        "type": "object"
      },
      "ProjectedCommentOut": {
        "properties": {
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "channel_name": {
            "title": "Channel Name",
            "type": "string"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "channel_id",
          "channel_name",
          "platform",
          "text"
        ],
        "title": "ProjectedCommentOut",
        "type": "object"
      },
      "ProjectedMediaOut": {
        "properties": {
          "height": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Height"
          },
          "mime_type": {
            "title": "Mime Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Width"
          }
        },
        "required": [
          "url",
          "mime_type",
          "width",
          "height"
        ],
        "title": "ProjectedMediaOut",
        "type": "object"
      },
      "ProjectedPostOut": {
        "properties": {
          "action": {
            "$ref": "#/components/schemas/PreviewPostAction"
          },
          "action_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action At"
          },
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "channel_name": {
            "title": "Channel Name",
            "type": "string"
          },
          "media": {
            "items": {
              "$ref": "#/components/schemas/ProjectedMediaOut"
            },
            "title": "Media",
            "type": "array"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          }
        },
        "required": [
          "channel_id",
          "channel_name",
          "platform",
          "caption",
          "media",
          "action",
          "action_at"
        ],
        "title": "ProjectedPostOut",
        "type": "object"
      },
      "ProjectedRunKind": {
        "enum": [
          "posts",
          "comment",
          "nothing",
          "failed"
        ],
        "title": "ProjectedRunKind",
        "type": "string"
      },
      "ProjectedRunNote": {
        "enum": [
          "nothing_new",
          "list_empty",
          "all_retired",
          "article_done",
          "held_by_filter",
          "daily_cap",
          "below_likes",
          "step_failed",
          "example"
        ],
        "title": "ProjectedRunNote",
        "type": "string"
      },
      "ProjectedRunOut": {
        "properties": {
          "at": {
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "comments": {
            "items": {
              "$ref": "#/components/schemas/ProjectedCommentOut"
            },
            "title": "Comments",
            "type": "array"
          },
          "kind": {
            "$ref": "#/components/schemas/ProjectedRunKind"
          },
          "likes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Likes"
          },
          "note": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectedRunNote"
              },
              {
                "type": "null"
              }
            ]
          },
          "posts": {
            "items": {
              "$ref": "#/components/schemas/ProjectedPostOut"
            },
            "title": "Posts",
            "type": "array"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "source_post_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Post Id"
          },
          "waits_for_review": {
            "title": "Waits For Review",
            "type": "boolean"
          }
        },
        "required": [
          "at",
          "kind",
          "note",
          "reason",
          "posts",
          "comments",
          "waits_for_review",
          "source_post_id",
          "likes"
        ],
        "title": "ProjectedRunOut",
        "type": "object"
      },
      "ProjectionBasis": {
        "enum": [
          "schedule",
          "recent_posts"
        ],
        "title": "ProjectionBasis",
        "type": "string"
      },
      "PublicStreakOut": {
        "properties": {
          "current_streak_since": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Streak Since"
          },
          "current_streak_weeks": {
            "title": "Current Streak Weeks",
            "type": "integer"
          },
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "locale": {
            "$ref": "#/components/schemas/Locale"
          },
          "longest_streak_weeks": {
            "title": "Longest Streak Weeks",
            "type": "integer"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "posts_per_week": {
            "title": "Posts Per Week",
            "type": "integer"
          },
          "weeks": {
            "items": {
              "$ref": "#/components/schemas/PublicStreakWeekOut"
            },
            "title": "Weeks",
            "type": "array"
          }
        },
        "required": [
          "name",
          "posts_per_week",
          "current_streak_weeks",
          "longest_streak_weeks",
          "current_streak_since",
          "weeks",
          "generated_at",
          "locale"
        ],
        "title": "PublicStreakOut",
        "type": "object"
      },
      "PublicStreakWeekOut": {
        "properties": {
          "start_date": {
            "format": "date",
            "title": "Start Date",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/GoalWeekStatus"
          }
        },
        "required": [
          "start_date",
          "status"
        ],
        "title": "PublicStreakWeekOut",
        "type": "object"
      },
      "PublishOptionsOut": {
        "description": "A channel's live option lists. A block is null when its platform has none.",
        "properties": {
          "gateway_kind": {
            "$ref": "#/components/schemas/GatewayKind"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "tiktok": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TikTokPublishOptionsOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "youtube": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/YouTubePublishOptionsOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "platform",
          "gateway_kind",
          "youtube",
          "tiktok"
        ],
        "title": "PublishOptionsOut",
        "type": "object"
      },
      "PublishingHealthSummary": {
        "description": "Roll-up of channel connectivity + recent delivery failures.",
        "properties": {
          "channels_needing_attention": {
            "default": 0,
            "title": "Channels Needing Attention",
            "type": "integer"
          },
          "connected_channel_count": {
            "default": 0,
            "title": "Connected Channel Count",
            "type": "integer"
          },
          "failed_post_count": {
            "default": 0,
            "title": "Failed Post Count",
            "type": "integer"
          },
          "healthy_channel_count": {
            "default": 0,
            "title": "Healthy Channel Count",
            "type": "integer"
          },
          "posts_with_failures": {
            "default": 0,
            "title": "Posts With Failures",
            "type": "integer"
          }
        },
        "title": "PublishingHealthSummary",
        "type": "object"
      },
      "PushDeviceIn": {
        "additionalProperties": false,
        "description": "A device to push to. `environment` left out is the deployment's own APNs host. Send the raw APNs token, not an Expo push token.",
        "properties": {
          "bundle_id": {
            "maxLength": 200,
            "title": "Bundle Id",
            "type": "string"
          },
          "environment": {
            "$ref": "#/components/schemas/PushEnvironment"
          },
          "platform": {
            "$ref": "#/components/schemas/PushPlatform"
          },
          "token": {
            "maxLength": 400,
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token",
          "platform",
          "bundle_id"
        ],
        "title": "PushDeviceIn",
        "type": "object"
      },
      "PushDeviceOut": {
        "properties": {
          "bundle_id": {
            "title": "Bundle Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "environment": {
            "$ref": "#/components/schemas/PushEnvironment"
          },
          "last_seen_at": {
            "format": "date-time",
            "title": "Last Seen At",
            "type": "string"
          },
          "platform": {
            "$ref": "#/components/schemas/PushPlatform"
          },
          "token": {
            "title": "Token",
            "type": "string"
          }
        },
        "required": [
          "token",
          "platform",
          "bundle_id",
          "environment",
          "created_at",
          "last_seen_at"
        ],
        "title": "PushDeviceOut",
        "type": "object"
      },
      "PushEnvironment": {
        "description": "Which APNs host a token belongs to: `sandbox` for a development build, `production` for TestFlight and the App Store.",
        "enum": [
          "sandbox",
          "production"
        ],
        "title": "PushEnvironment",
        "type": "string"
      },
      "PushPlatform": {
        "description": "The phone platform a device registers for push on.",
        "enum": [
          "ios"
        ],
        "title": "PushPlatform",
        "type": "string"
      },
      "QueueIn": {
        "additionalProperties": false,
        "description": "What to queue a post for. Empty, or no body, queues it with no time.",
        "properties": {
          "slot_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slot At"
          }
        },
        "title": "QueueIn",
        "type": "object"
      },
      "QueueSlotOut": {
        "properties": {
          "group_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "post_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Post Id"
          },
          "scheduled_at": {
            "format": "date-time",
            "title": "Scheduled At",
            "type": "string"
          }
        },
        "required": [
          "scheduled_at",
          "post_id",
          "group_id"
        ],
        "title": "QueueSlotOut",
        "type": "object"
      },
      "RecentFailureSummary": {
        "description": "A single recently failed post delivery.\n\nOne per destination, like `UpcomingPostSummary`, so a post that failed on\ntwo channels arrives twice; `group_id` ties them back into one post.\n`error_kind` is what decides the way out of each failure (reconnect, edit\nor retry), so it is the typed enum rather than a free string.",
        "properties": {
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "error_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GatewayErrorKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "failed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failed At"
          },
          "group_id": {
            "title": "Group Id",
            "type": "string"
          },
          "platform": {
            "title": "Platform",
            "type": "string"
          },
          "post_id": {
            "title": "Post Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "post_id",
          "group_id",
          "channel_id",
          "platform",
          "error_kind",
          "error_message",
          "updated_at",
          "failed_at"
        ],
        "title": "RecentFailureSummary",
        "type": "object"
      },
      "RecordConsentsRequest": {
        "description": "A batch of answers from a single interaction.\n\nThe acceptance gate sends terms and privacy in one call, so they share an\ninteraction and cannot half-succeed; sign-up records its own rows on the\nserver. The cap is a sanity bound, not a limit anyone should reach: there\nare four documents.",
        "properties": {
          "consents": {
            "items": {
              "$ref": "#/components/schemas/ConsentGrantIn"
            },
            "maxItems": 8,
            "minItems": 1,
            "title": "Consents",
            "type": "array"
          },
          "locale": {
            "anyOf": [
              {
                "maxLength": 35,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "method": {
            "$ref": "#/components/schemas/ConsentMethod"
          }
        },
        "required": [
          "consents",
          "method"
        ],
        "title": "RecordConsentsRequest",
        "type": "object"
      },
      "RecurrenceIn": {
        "additionalProperties": false,
        "properties": {
          "day_selector": {
            "discriminator": {
              "mapping": {
                "days_of_month": "#/components/schemas/DaysOfMonthSelectorModel",
                "days_of_week": "#/components/schemas/DaysOfWeekSelectorModel",
                "every_day": "#/components/schemas/EveryDaySelectorModel"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/EveryDaySelectorModel"
              },
              {
                "$ref": "#/components/schemas/DaysOfWeekSelectorModel"
              },
              {
                "$ref": "#/components/schemas/DaysOfMonthSelectorModel"
              }
            ],
            "title": "Day Selector"
          },
          "times_of_day": {
            "items": {
              "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$",
              "type": "string"
            },
            "minItems": 1,
            "title": "Times Of Day",
            "type": "array"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          }
        },
        "required": [
          "times_of_day",
          "day_selector",
          "timezone"
        ],
        "title": "RecurrenceIn",
        "type": "object"
      },
      "RecurrenceOut": {
        "additionalProperties": false,
        "properties": {
          "day_selector": {
            "discriminator": {
              "mapping": {
                "days_of_month": "#/components/schemas/DaysOfMonthSelectorModel",
                "days_of_week": "#/components/schemas/DaysOfWeekSelectorModel",
                "every_day": "#/components/schemas/EveryDaySelectorModel"
              },
              "propertyName": "kind"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/EveryDaySelectorModel"
              },
              {
                "$ref": "#/components/schemas/DaysOfWeekSelectorModel"
              },
              {
                "$ref": "#/components/schemas/DaysOfMonthSelectorModel"
              }
            ],
            "title": "Day Selector"
          },
          "times_of_day": {
            "items": {
              "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$",
              "type": "string"
            },
            "minItems": 1,
            "title": "Times Of Day",
            "type": "array"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          }
        },
        "required": [
          "times_of_day",
          "day_selector",
          "timezone"
        ],
        "title": "RecurrenceOut",
        "type": "object"
      },
      "ReferralClaimIn": {
        "additionalProperties": false,
        "description": "The code a new account arrived with. Case and surrounding spaces are ignored.",
        "properties": {
          "code": {
            "maxLength": 64,
            "minLength": 1,
            "title": "Code",
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "title": "ReferralClaimIn",
        "type": "object"
      },
      "ReferralClaimOut": {
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/ReferralClaimOutcome"
          }
        },
        "required": [
          "outcome"
        ],
        "title": "ReferralClaimOut",
        "type": "object"
      },
      "ReferralClaimOutcome": {
        "description": "What happened to a code a new account offered.\n\nEvery outcome is a 200 rather than an error: the browser offering the code\nhas nothing to show for any of them and clears the stored code either way.",
        "enum": [
          "attributed",
          "already_attributed",
          "unknown_code",
          "self_referral",
          "same_organization",
          "not_eligible"
        ],
        "title": "ReferralClaimOutcome",
        "type": "string"
      },
      "ReferralInviteOut": {
        "description": "What a referral link offers, for the page someone lands on from it.",
        "properties": {
          "referrer_first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Referrer First Name"
          },
          "reward_days": {
            "title": "Reward Days",
            "type": "integer"
          },
          "reward_plan": {
            "$ref": "#/components/schemas/BillingPlan"
          }
        },
        "required": [
          "referrer_first_name",
          "reward_days",
          "reward_plan"
        ],
        "title": "ReferralInviteOut",
        "type": "object"
      },
      "ReferralOut": {
        "description": "One person the caller referred, by first name only.",
        "properties": {
          "first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Name"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "qualified_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qualified At"
          },
          "signed_up_at": {
            "format": "date-time",
            "title": "Signed Up At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "first_name",
          "signed_up_at",
          "qualified_at"
        ],
        "title": "ReferralOut",
        "type": "object"
      },
      "ReferralOverviewOut": {
        "description": "The caller's referral link, progress, and ledger.",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "days_earned": {
            "title": "Days Earned",
            "type": "integer"
          },
          "days_pending": {
            "title": "Days Pending",
            "type": "integer"
          },
          "link_opens": {
            "title": "Link Opens",
            "type": "integer"
          },
          "qualified": {
            "title": "Qualified",
            "type": "integer"
          },
          "referrals": {
            "items": {
              "$ref": "#/components/schemas/ReferralOut"
            },
            "title": "Referrals",
            "type": "array"
          },
          "reward_days": {
            "title": "Reward Days",
            "type": "integer"
          },
          "rewards": {
            "items": {
              "$ref": "#/components/schemas/ReferralRewardOut"
            },
            "title": "Rewards",
            "type": "array"
          },
          "rewards_this_year": {
            "title": "Rewards This Year",
            "type": "integer"
          },
          "signed_up": {
            "title": "Signed Up",
            "type": "integer"
          },
          "yearly_cap": {
            "title": "Yearly Cap",
            "type": "integer"
          }
        },
        "required": [
          "code",
          "link_opens",
          "signed_up",
          "qualified",
          "rewards_this_year",
          "days_earned",
          "days_pending",
          "reward_days",
          "yearly_cap",
          "referrals",
          "rewards"
        ],
        "title": "ReferralOverviewOut",
        "type": "object"
      },
      "ReferralRewardKind": {
        "description": "What a reward is paid in.\n\n`PLAN_CREDIT` is time on a plan, and the only kind while there is no\ncheckout. A cash commission would be a second member here, paid in money\nrather than days, without reshaping the ledger.",
        "enum": [
          "plan_credit"
        ],
        "title": "ReferralRewardKind",
        "type": "string"
      },
      "ReferralRewardOut": {
        "description": "One ledger row: a reward the caller earned, and where it went.",
        "properties": {
          "amount": {
            "title": "Amount",
            "type": "integer"
          },
          "applied_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applied At"
          },
          "confirms_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirms At"
          },
          "counterpart_first_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterpart First Name"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/ReferralRewardKind"
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingPlan"
              },
              {
                "type": "null"
              }
            ]
          },
          "side": {
            "$ref": "#/components/schemas/ReferralRewardSide"
          },
          "status": {
            "$ref": "#/components/schemas/ReferralRewardStatus"
          },
          "unit": {
            "$ref": "#/components/schemas/ReferralRewardUnit"
          },
          "workspace_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Workspace Name"
          }
        },
        "required": [
          "id",
          "side",
          "kind",
          "amount",
          "unit",
          "status",
          "plan",
          "workspace_name",
          "counterpart_first_name",
          "created_at",
          "confirms_at",
          "applied_at"
        ],
        "title": "ReferralRewardOut",
        "type": "object"
      },
      "ReferralRewardSide": {
        "description": "Which half of a referral a reward row pays: the person who shared the\nlink, or the person who signed up through it.",
        "enum": [
          "referrer",
          "referred"
        ],
        "title": "ReferralRewardSide",
        "type": "string"
      },
      "ReferralRewardStatus": {
        "description": "Where a reward got to.\n\n`PENDING` is a referrer's reward inside its hold period: it confirms at\n`confirms_at` if the referred account is still in use, and becomes `VOID`\nif it is not. `EARNED` is confirmed and not yet in effect: the beneficiary\nhas no workspace to apply it to yet, or their plan has no plan above it, so\nthe credit waits for billing to honour it. `APPLIED` extended a workspace's\nbonus plan. `CAPPED` was over the referrer's yearly limit and grants\nnothing; it is kept so the ledger still shows every referral that qualified.",
        "enum": [
          "pending",
          "earned",
          "applied",
          "capped",
          "void"
        ],
        "title": "ReferralRewardStatus",
        "type": "string"
      },
      "ReferralRewardUnit": {
        "description": "The unit `referral_rewards.amount` is counted in. Days for plan credit.",
        "enum": [
          "days"
        ],
        "title": "ReferralRewardUnit",
        "type": "string"
      },
      "RefusalOut": {
        "properties": {
          "at": {
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "client": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client"
          },
          "connected_app": {
            "title": "Connected App",
            "type": "boolean"
          },
          "key": {
            "description": "The key's prefix and last 4; empty for a connected app.",
            "title": "Key",
            "type": "string"
          },
          "key_name": {
            "title": "Key Name",
            "type": "string"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "client",
          "at",
          "reason",
          "key_name",
          "key",
          "connected_app"
        ],
        "title": "RefusalOut",
        "type": "object"
      },
      "RenderAudioIn": {
        "description": "One soundtrack laid under the design, in the units the scene stores.\n\n`start`/`end` are seconds into the track file; `offset` is seconds into the\nfinished design, so a track can begin after the video does. Every bound is\nre-checked in `design_render_service`, which is what actually builds the\nfilter graph out of these numbers.",
        "properties": {
          "asset_id": {
            "title": "Asset Id",
            "type": "string"
          },
          "end": {
            "exclusiveMinimum": 0.0,
            "title": "End",
            "type": "number"
          },
          "fade_in": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Fade In",
            "type": "number"
          },
          "fade_out": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Fade Out",
            "type": "number"
          },
          "offset": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Offset",
            "type": "number"
          },
          "start": {
            "minimum": 0.0,
            "title": "Start",
            "type": "number"
          },
          "volume": {
            "default": 1.0,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Volume",
            "type": "number"
          }
        },
        "required": [
          "asset_id",
          "start",
          "end"
        ],
        "title": "RenderAudioIn",
        "type": "object"
      },
      "RenderClipIn": {
        "description": "One clip, placed on the canvas and in the design's own time.\n\n`starts_at` is the field that makes several clips possible: it is seconds\ninto the finished design, so laying one clip after another and overlapping\ntwo are the same thing said with different numbers.",
        "properties": {
          "asset_id": {
            "title": "Asset Id",
            "type": "string"
          },
          "height": {
            "exclusiveMinimum": 0.0,
            "title": "Height",
            "type": "integer"
          },
          "muted": {
            "default": false,
            "title": "Muted",
            "type": "boolean"
          },
          "opacity": {
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Opacity",
            "type": "number"
          },
          "segments": {
            "items": {
              "$ref": "#/components/schemas/RenderSegmentIn"
            },
            "title": "Segments",
            "type": "array"
          },
          "starts_at": {
            "default": 0.0,
            "minimum": 0.0,
            "title": "Starts At",
            "type": "number"
          },
          "volume": {
            "default": 1.0,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Volume",
            "type": "number"
          },
          "width": {
            "exclusiveMinimum": 0.0,
            "title": "Width",
            "type": "integer"
          },
          "x": {
            "title": "X",
            "type": "integer"
          },
          "y": {
            "title": "Y",
            "type": "integer"
          }
        },
        "required": [
          "asset_id",
          "x",
          "y",
          "width",
          "height",
          "segments"
        ],
        "title": "RenderClipIn",
        "type": "object"
      },
      "RenderSegmentIn": {
        "description": "One kept range of the source file, in seconds into that file.",
        "properties": {
          "end": {
            "exclusiveMinimum": 0.0,
            "title": "End",
            "type": "number"
          },
          "start": {
            "minimum": 0.0,
            "title": "Start",
            "type": "number"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "title": "RenderSegmentIn",
        "type": "object"
      },
      "RenderSpecIn": {
        "description": "The geometry and timings a render needs, as the browser computed them.\n\nSent rather than derived from the stored scene: the scene's schema lives in\nTypeScript and is validated by zod in the browser, so a second copy here\nwould be a second source of truth that could disagree with the preview the\nuser just approved. It is still validated server-side, because it arrives\nover HTTP and the worker builds a command line out of it.",
        "properties": {
          "audio": {
            "items": {
              "$ref": "#/components/schemas/RenderAudioIn"
            },
            "title": "Audio",
            "type": "array"
          },
          "canvas_height": {
            "exclusiveMinimum": 0.0,
            "title": "Canvas Height",
            "type": "integer"
          },
          "canvas_width": {
            "exclusiveMinimum": 0.0,
            "title": "Canvas Width",
            "type": "integer"
          },
          "clip_height": {
            "exclusiveMinimum": 0.0,
            "title": "Clip Height",
            "type": "integer"
          },
          "clip_width": {
            "exclusiveMinimum": 0.0,
            "title": "Clip Width",
            "type": "integer"
          },
          "clip_x": {
            "title": "Clip X",
            "type": "integer"
          },
          "clip_y": {
            "title": "Clip Y",
            "type": "integer"
          },
          "clips": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/RenderClipIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clips"
          },
          "muted": {
            "default": false,
            "title": "Muted",
            "type": "boolean"
          },
          "segments": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/RenderSegmentIn"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Segments"
          },
          "trim_end": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trim End"
          },
          "trim_start": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trim Start"
          },
          "volume": {
            "default": 1.0,
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Volume",
            "type": "number"
          }
        },
        "required": [
          "canvas_width",
          "canvas_height",
          "clip_x",
          "clip_y",
          "clip_width",
          "clip_height"
        ],
        "title": "RenderSpecIn",
        "type": "object"
      },
      "RenderStatus": {
        "description": "Where a design's video render has got to.\n\nFour states rather than a boolean, because a render is the one thing in this\nproduct the user waits on: \"queued\" and \"running\" look identical from a\nboolean and mean different things to someone watching a progress line.",
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed"
        ],
        "title": "RenderStatus",
        "type": "string"
      },
      "ReplyDestination": {
        "description": "Where the reply goes: under the comment, or into the author's inbox.",
        "enum": [
          "public_comment",
          "direct_message"
        ],
        "title": "ReplyDestination",
        "type": "string"
      },
      "ReplyKind": {
        "description": "What a held run answers, which decides how an approvals list words it.\n\n`NONE` is a publish flow: it answers nobody, and its caption is a post.",
        "enum": [
          "comment",
          "message",
          "none"
        ],
        "title": "ReplyKind",
        "type": "string"
      },
      "ReplyPreviewIn": {
        "properties": {
          "comment": {
            "maxLength": 2200,
            "minLength": 1,
            "title": "Comment",
            "type": "string"
          },
          "graph": {
            "$ref": "#/components/schemas/AutomationGraphIn"
          },
          "inbox_comment_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inbox Comment Id"
          },
          "is_reply": {
            "default": false,
            "title": "Is Reply",
            "type": "boolean"
          }
        },
        "required": [
          "graph",
          "comment"
        ],
        "title": "ReplyPreviewIn",
        "type": "object"
      },
      "ReplyPreviewOut": {
        "properties": {
          "ai_written": {
            "title": "Ai Written",
            "type": "boolean"
          },
          "intent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CommentIntent"
              },
              {
                "type": "null"
              }
            ]
          },
          "keyword": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Keyword"
          },
          "needs_approval": {
            "title": "Needs Approval",
            "type": "boolean"
          },
          "outcome": {
            "$ref": "#/components/schemas/ReplyPreviewOutcome"
          },
          "reply_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reply Text"
          },
          "skip_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReplySkipReason"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "outcome",
          "skip_reason",
          "keyword",
          "reply_text",
          "ai_written",
          "needs_approval"
        ],
        "title": "ReplyPreviewOut",
        "type": "object"
      },
      "ReplyPreviewOutcome": {
        "enum": [
          "reply",
          "skipped",
          "invalid"
        ],
        "title": "ReplyPreviewOutcome",
        "type": "string"
      },
      "ReplySkipReason": {
        "enum": [
          "is_reply",
          "skip_keyword",
          "no_match",
          "blocked_topic",
          "not_a_question"
        ],
        "title": "ReplySkipReason",
        "type": "string"
      },
      "ReplySubject": {
        "description": "What the reply answers: a public comment, or a direct message.\n\nThe prompt names the thing being answered, labels its untrusted block, and\npicks the system prompt from this, so a model answering a private message\nis never told it is writing under a public post.",
        "enum": [
          "comment",
          "direct_message"
        ],
        "title": "ReplySubject",
        "type": "string"
      },
      "ReplyVariantsIn": {
        "additionalProperties": false,
        "description": "A fixed reply's form, for more wordings in the same voice.\n\n`replies` are the rows already written, so nothing suggested repeats one.\n`post_ids` are the trigger's posts, whose captions the server reads;\n`caption` is the text of a post not saved yet. `count` is how many rows the\nform has room for, at most the variants a fixed reply holds.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "maxLength": 5000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "count": {
            "default": 3,
            "maximum": 4.0,
            "minimum": 1.0,
            "title": "Count",
            "type": "integer"
          },
          "keywords": {
            "items": {
              "maxLength": 200,
              "type": "string"
            },
            "maxItems": 20,
            "title": "Keywords",
            "type": "array"
          },
          "post_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 20,
            "title": "Post Ids",
            "type": "array"
          },
          "replies": {
            "items": {
              "maxLength": 500,
              "type": "string"
            },
            "maxItems": 5,
            "title": "Replies",
            "type": "array"
          },
          "subject": {
            "$ref": "#/components/schemas/ReplySubject",
            "default": "comment"
          }
        },
        "title": "ReplyVariantsIn",
        "type": "object"
      },
      "ReplyVariantsOut": {
        "description": "New wordings, none already in the form, each one a fixed reply can hold.",
        "properties": {
          "replies": {
            "items": {
              "type": "string"
            },
            "title": "Replies",
            "type": "array"
          }
        },
        "required": [
          "replies"
        ],
        "title": "ReplyVariantsOut",
        "type": "object"
      },
      "RepostOrder": {
        "enum": [
          "in_order",
          "shuffle"
        ],
        "title": "RepostOrder",
        "type": "string"
      },
      "RepostRulesIn": {
        "additionalProperties": false,
        "properties": {
          "add_top_posts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TopPostsRuleIn"
              },
              {
                "type": "null"
              }
            ]
          },
          "order": {
            "$ref": "#/components/schemas/RepostOrder",
            "default": "in_order"
          },
          "retire_after": {
            "anyOf": [
              {
                "maximum": 50.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retire After"
          }
        },
        "title": "RepostRulesIn",
        "type": "object"
      },
      "RepostRulesOut": {
        "additionalProperties": false,
        "properties": {
          "add_top_posts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TopPostsRuleOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "order": {
            "$ref": "#/components/schemas/RepostOrder",
            "default": "in_order"
          },
          "retire_after": {
            "anyOf": [
              {
                "maximum": 50.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retire After"
          }
        },
        "title": "RepostRulesOut",
        "type": "object"
      },
      "RepurposeClipOut": {
        "description": "One candidate clip, as the review screen renders it.",
        "properties": {
          "end_seconds": {
            "title": "End Seconds",
            "type": "number"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "fits_platforms": {
            "items": {
              "$ref": "#/components/schemas/Platform"
            },
            "title": "Fits Platforms",
            "type": "array"
          },
          "hook": {
            "title": "Hook",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "ordinal": {
            "title": "Ordinal",
            "type": "integer"
          },
          "output_asset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Asset Id"
          },
          "output_read_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Read Url"
          },
          "reason": {
            "title": "Reason",
            "type": "string"
          },
          "start_seconds": {
            "title": "Start Seconds",
            "type": "number"
          },
          "status": {
            "$ref": "#/components/schemas/RepurposeClipStatus"
          }
        },
        "required": [
          "id",
          "status",
          "ordinal",
          "start_seconds",
          "end_seconds",
          "hook",
          "reason",
          "fits_platforms",
          "output_asset_id",
          "output_read_url",
          "error"
        ],
        "title": "RepurposeClipOut",
        "type": "object"
      },
      "RepurposeClipStatus": {
        "description": "What has been decided about one candidate clip.\n\n`SUGGESTED` is the only state a model can put a clip in. Everything past it\nis a person's decision, which is the rule the cut stage enforces: nothing is\nencoded that has not been accepted by someone.",
        "enum": [
          "suggested",
          "accepted",
          "rejected",
          "rendered"
        ],
        "title": "RepurposeClipStatus",
        "type": "string"
      },
      "RepurposeClipUpdateIn": {
        "description": "An edit, a decision, or both.\n\nOne request rather than three routes because the review gesture is usually\nboth at once: someone nudges the out point and accepts in the same motion,\nand splitting that into two round trips is two chances for them to disagree.\n\nEvery field is optional and absence means \"leave this alone\", which\n`model_fields_set` is what distinguishes from an explicit null.",
        "properties": {
          "accepted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accepted"
          },
          "end_seconds": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Seconds"
          },
          "hook": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hook"
          },
          "start_seconds": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Seconds"
          }
        },
        "title": "RepurposeClipUpdateIn",
        "type": "object"
      },
      "RepurposeJobCreateIn": {
        "description": "Which video in the gallery to turn into clips.",
        "properties": {
          "source_asset_id": {
            "format": "uuid",
            "title": "Source Asset Id",
            "type": "string"
          }
        },
        "required": [
          "source_asset_id"
        ],
        "title": "RepurposeJobCreateIn",
        "type": "object"
      },
      "RepurposeJobDetailOut": {
        "description": "One job with everything the review screen needs.\n\nThe transcript rides along because the review screen shows the words under\neach candidate: reading a clip's own transcript is how someone decides\nwhether the moment stands on its own, which is the judgement this whole\nflow exists to support.",
        "properties": {
          "accepted_count": {
            "title": "Accepted Count",
            "type": "integer"
          },
          "clip_count": {
            "title": "Clip Count",
            "type": "integer"
          },
          "clips": {
            "items": {
              "$ref": "#/components/schemas/RepurposeClipOut"
            },
            "title": "Clips",
            "type": "array"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "rendered_count": {
            "title": "Rendered Count",
            "type": "integer"
          },
          "source_asset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Asset Id"
          },
          "source_read_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Read Url"
          },
          "source_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Seconds"
          },
          "stage": {
            "$ref": "#/components/schemas/RepurposeStage"
          },
          "status": {
            "$ref": "#/components/schemas/RepurposeStatus"
          },
          "transcribed_through_seconds": {
            "title": "Transcribed Through Seconds",
            "type": "number"
          },
          "transcript": {
            "items": {
              "$ref": "#/components/schemas/TranscriptSegmentOut"
            },
            "title": "Transcript",
            "type": "array"
          }
        },
        "required": [
          "id",
          "source_asset_id",
          "stage",
          "status",
          "source_seconds",
          "transcribed_through_seconds",
          "clip_count",
          "accepted_count",
          "rendered_count",
          "error",
          "created_at",
          "finished_at",
          "clips",
          "transcript",
          "source_read_url"
        ],
        "title": "RepurposeJobDetailOut",
        "type": "object"
      },
      "RepurposeJobOut": {
        "description": "One job in the list. Enough to say what it is doing and what it needs.",
        "properties": {
          "accepted_count": {
            "title": "Accepted Count",
            "type": "integer"
          },
          "clip_count": {
            "title": "Clip Count",
            "type": "integer"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "rendered_count": {
            "title": "Rendered Count",
            "type": "integer"
          },
          "source_asset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Asset Id"
          },
          "source_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Seconds"
          },
          "stage": {
            "$ref": "#/components/schemas/RepurposeStage"
          },
          "status": {
            "$ref": "#/components/schemas/RepurposeStatus"
          },
          "transcribed_through_seconds": {
            "title": "Transcribed Through Seconds",
            "type": "number"
          }
        },
        "required": [
          "id",
          "source_asset_id",
          "stage",
          "status",
          "source_seconds",
          "transcribed_through_seconds",
          "clip_count",
          "accepted_count",
          "rendered_count",
          "error",
          "created_at",
          "finished_at"
        ],
        "title": "RepurposeJobOut",
        "type": "object"
      },
      "RepurposeStage": {
        "description": "Which piece of work a repurpose job is on.\n\nA stage names the work, and `RepurposeStatus` beside it names how that work\nis going. Two columns rather than one, because they are independent: every\nstage can be waiting, running, or failed, and a single enum covering the\ncombinations would be the cross product of the two, restated by hand.\n\nKeeping them apart is what makes a retry honest. A job that failed at\n`SUGGEST` has a transcript already, and retrying it moves the status back to\nqueued while the stage stays where it is, so nothing that succeeded is paid\nfor twice.\n\n`REVIEW` is a stage like the others even though no worker ever claims it.\nChoosing the moments, fixing the boundaries, and writing the hooks is the\npart of repurposing that needs judgement, so it is a step in the machine\nrather than a state the machine passes through.",
        "enum": [
          "transcribe",
          "suggest",
          "review",
          "cut",
          "done"
        ],
        "title": "RepurposeStage",
        "type": "string"
      },
      "RepurposeStatus": {
        "description": "How the stage a repurpose job is on is going.\n\n`WAITING` is distinct from `QUEUED` on purpose. Queued means a worker will\npick this up; waiting means nothing will happen until a person acts. Showing\nboth as \"in progress\" is how a product ends up with a spinner over a job that\nis waiting for its owner.",
        "enum": [
          "queued",
          "running",
          "waiting",
          "failed",
          "completed"
        ],
        "title": "RepurposeStatus",
        "type": "string"
      },
      "RescheduleIn": {
        "properties": {
          "scheduled_at": {
            "format": "date-time",
            "title": "Scheduled At",
            "type": "string"
          }
        },
        "required": [
          "scheduled_at"
        ],
        "title": "RescheduleIn",
        "type": "object"
      },
      "RetryHeldOut": {
        "description": "One failed post a Retry did not send again, and why.",
        "properties": {
          "post_id": {
            "title": "Post Id",
            "type": "string"
          },
          "reason": {
            "$ref": "#/components/schemas/RetryHold"
          }
        },
        "required": [
          "post_id",
          "reason"
        ],
        "title": "RetryHeldOut",
        "type": "object"
      },
      "RetryHold": {
        "description": "Why a retry kept a failed post's delivery instead of sending the post again.",
        "enum": [
          "live",
          "unconfirmed",
          "channel_unavailable",
          "delivery_unknown",
          "rejected",
          "file_refused",
          "account_refused"
        ],
        "title": "RetryHold",
        "type": "string"
      },
      "SavedReplyCreateIn": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "maxLength": 2200,
            "minLength": 1,
            "title": "Body",
            "type": "string"
          },
          "name": {
            "maxLength": 60,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "body"
        ],
        "title": "SavedReplyCreateIn",
        "type": "object"
      },
      "SavedReplyOut": {
        "description": "One saved reply, with its placeholders as typed.",
        "properties": {
          "body": {
            "title": "Body",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "body",
          "created_at",
          "updated_at"
        ],
        "title": "SavedReplyOut",
        "type": "object"
      },
      "SavedReplyUpdateIn": {
        "additionalProperties": false,
        "description": "Rename or rewrite a saved reply. Partial: an omitted field keeps its value.",
        "properties": {
          "body": {
            "anyOf": [
              {
                "maxLength": 2200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 60,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "SavedReplyUpdateIn",
        "type": "object"
      },
      "ScheduleIn": {
        "properties": {
          "scheduled_at": {
            "format": "date-time",
            "title": "Scheduled At",
            "type": "string"
          }
        },
        "required": [
          "scheduled_at"
        ],
        "title": "ScheduleIn",
        "type": "object"
      },
      "ScheduleOrigin": {
        "description": "How a post came by the `scheduled_at` it currently holds.\n\nProvenance, not behaviour: dispatch reads `status` and `scheduled_at` and\nnever looks here.\n\nNothing writes `QUEUE` any more. Queueing is a status of its own\n(`PostStatus.QUEUED`) and assigns no time, so there is no provenance for it\nto record. The member stays because rows written by the queue that did\nresolve slots still hold it, and dropping it would make the mapper raise\n`LookupError` on every one of them. A re-fit that gives queued posts times\nlater is free to start writing it again.\n\nAny explicit reschedule sets this back to `MANUAL`, because once a person\nhas moved a post by hand it is not in the queue any more.",
        "enum": [
          "manual",
          "queue"
        ],
        "title": "ScheduleOrigin",
        "type": "string"
      },
      "ScheduledDay": {
        "description": "Posts scheduled on one local day from now on. Zero-filled.",
        "properties": {
          "date": {
            "format": "date",
            "title": "Date",
            "type": "string"
          },
          "posts": {
            "title": "Posts",
            "type": "integer"
          }
        },
        "required": [
          "date",
          "posts"
        ],
        "title": "ScheduledDay",
        "type": "object"
      },
      "SignInProvidersOut": {
        "description": "The sign-in methods beside email and password that this deployment offers.",
        "properties": {
          "google": {
            "title": "Google",
            "type": "boolean"
          }
        },
        "required": [
          "google"
        ],
        "title": "SignInProvidersOut",
        "type": "object"
      },
      "SignInSessionOut": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "current": {
            "title": "Current",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "refreshed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refreshed At"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          }
        },
        "required": [
          "id",
          "user_agent",
          "ip_address",
          "created_at",
          "refreshed_at",
          "current"
        ],
        "title": "SignInSessionOut",
        "type": "object"
      },
      "SignInSessionsOut": {
        "properties": {
          "available": {
            "title": "Available",
            "type": "boolean"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/SignInSessionOut"
            },
            "title": "Sessions",
            "type": "array"
          }
        },
        "required": [
          "sessions",
          "available"
        ],
        "title": "SignInSessionsOut",
        "type": "object"
      },
      "SortOrder": {
        "enum": [
          "asc",
          "desc"
        ],
        "title": "SortOrder",
        "type": "string"
      },
      "StreakShareIn": {
        "additionalProperties": false,
        "properties": {
          "locale": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Locale"
              },
              {
                "type": "null"
              }
            ]
          },
          "show_name": {
            "$ref": "#/components/schemas/StreakShareName",
            "default": "none"
          }
        },
        "title": "StreakShareIn",
        "type": "object"
      },
      "StreakShareName": {
        "description": "Which name a public streak link shows beside the streak.\n\nChosen by the member who shares, and resolved when the link is read rather\nthan copied into the row, so a renamed workspace or profile is what the\nlink shows the next time it is opened. `NONE` is the default because a\nworkspace name can be a client's name, and nothing leaves the product\nunder it unless somebody picked it.",
        "enum": [
          "none",
          "workspace",
          "first_name"
        ],
        "title": "StreakShareName",
        "type": "string"
      },
      "StreakShareOut": {
        "description": "The caller's own link. The web app builds the URL from `token` and `locale`.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "locale": {
            "$ref": "#/components/schemas/Locale"
          },
          "show_name": {
            "$ref": "#/components/schemas/StreakShareName"
          },
          "token": {
            "title": "Token",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "token",
          "show_name",
          "created_at",
          "updated_at",
          "locale"
        ],
        "title": "StreakShareOut",
        "type": "object"
      },
      "SuggestedReplyOut": {
        "description": "A drafted reply for the reply box. Nothing has been sent.",
        "properties": {
          "body": {
            "title": "Body",
            "type": "string"
          }
        },
        "required": [
          "body"
        ],
        "title": "SuggestedReplyOut",
        "type": "object"
      },
      "SuspendedRunOut": {
        "description": "One run held at an approval gate, as an approvals list renders it.\n\nThe caption comes from the held payload rather than from a post, because in\nsuspend mode there is no post yet. That is what makes the mode worth having,\nand it means this response is the only place the approver can read what they\nare approving.\n\n`untrusted_sources` names each system outside this workspace the held content\ncame from, so the approvals screen can say \"a Notion page\" rather than\nshowing text with no history. Usually empty.\n\n`reply_kind` says whether the run answers a comment, a direct message or\nnobody (a publish flow). For a reply, `reply_to_text` and `reply_to_author`\nare the comment or message being answered and who wrote it, so the approver\ncan read the question beside the answer. A workspace API key is never shown\na reply to a direct message, so neither field ever carries one to a key.",
        "properties": {
          "automation_id": {
            "title": "Automation Id",
            "type": "string"
          },
          "automation_name": {
            "title": "Automation Name",
            "type": "string"
          },
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "channel_captions": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Channel Captions",
            "type": "object"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Reason"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "media": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Media"
          },
          "node_id": {
            "title": "Node Id",
            "type": "string"
          },
          "reply_kind": {
            "$ref": "#/components/schemas/ReplyKind"
          },
          "reply_to_author": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reply To Author"
          },
          "reply_to_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reply To Text"
          },
          "status": {
            "$ref": "#/components/schemas/SuspendedRunStatus"
          },
          "suspended_at": {
            "format": "date-time",
            "title": "Suspended At",
            "type": "string"
          },
          "untrusted_sources": {
            "items": {
              "type": "string"
            },
            "title": "Untrusted Sources",
            "type": "array"
          }
        },
        "required": [
          "id",
          "automation_id",
          "automation_name",
          "node_id",
          "status",
          "caption",
          "channel_captions",
          "media",
          "suspended_at",
          "expires_at",
          "failure_reason",
          "untrusted_sources",
          "reply_kind",
          "reply_to_text",
          "reply_to_author"
        ],
        "title": "SuspendedRunOut",
        "type": "object"
      },
      "SuspendedRunStatus": {
        "description": "Where a run that stopped at an `approval_gate` got to.\n\n`PENDING` waits for a person. `APPROVED` has a decision but has not been\nreplayed yet, which is a separate state on purpose: approving happens in a\nweb request and replaying a graph can publish to four platforms, so the two\nmust not share a transaction. The worker moves `APPROVED` to `RESUMED`, or to\n`FAILED` with the reason if the replay could not finish.",
        "enum": [
          "pending",
          "approved",
          "resumed",
          "declined",
          "expired",
          "failed"
        ],
        "title": "SuspendedRunStatus",
        "type": "string"
      },
      "TagCreateIn": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 40,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "tone": {
            "$ref": "#/components/schemas/TagTone",
            "default": "neutral"
          }
        },
        "required": [
          "name"
        ],
        "title": "TagCreateIn",
        "type": "object"
      },
      "TagOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "post_count": {
            "title": "Post Count",
            "type": "integer"
          },
          "tone": {
            "$ref": "#/components/schemas/TagTone"
          }
        },
        "required": [
          "id",
          "name",
          "tone",
          "post_count",
          "created_at"
        ],
        "title": "TagOut",
        "type": "object"
      },
      "TagRefOut": {
        "description": "A tag as it appears on a post group: enough to draw a chip, no counts.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "tone": {
            "$ref": "#/components/schemas/TagTone"
          }
        },
        "required": [
          "id",
          "name",
          "tone"
        ],
        "title": "TagRefOut",
        "type": "object"
      },
      "TagTone": {
        "enum": [
          "neutral",
          "accent",
          "cool",
          "green",
          "rose",
          "violet",
          "amber"
        ],
        "title": "TagTone",
        "type": "string"
      },
      "TagUpdateIn": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 40,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "tone": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TagTone"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "title": "TagUpdateIn",
        "type": "object"
      },
      "ThreadSegmentIn": {
        "properties": {
          "media": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/MediaItemIn"
            },
            "title": "Media",
            "type": "array"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "ThreadSegmentIn",
        "type": "object"
      },
      "ThreadsPostSettings": {
        "additionalProperties": false,
        "properties": {
          "platform": {
            "const": "threads",
            "title": "Platform",
            "type": "string"
          },
          "reply_audience": {
            "$ref": "#/components/schemas/ThreadsReplyAudience",
            "default": "everyone"
          }
        },
        "required": [
          "platform"
        ],
        "title": "ThreadsPostSettings",
        "type": "object"
      },
      "ThreadsReplyAudience": {
        "description": "The three reply controls Outstand passes to Threads.",
        "enum": [
          "everyone",
          "following",
          "mentioned"
        ],
        "title": "ThreadsReplyAudience",
        "type": "string"
      },
      "TikTokCreatorInfoOut": {
        "description": "What TikTok says the creator can post right now. Read fresh on every call.",
        "properties": {
          "avatar_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Url"
          },
          "comment_disabled": {
            "title": "Comment Disabled",
            "type": "boolean"
          },
          "duet_disabled": {
            "title": "Duet Disabled",
            "type": "boolean"
          },
          "max_video_seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Video Seconds"
          },
          "nickname": {
            "title": "Nickname",
            "type": "string"
          },
          "privacy_options": {
            "items": {
              "$ref": "#/components/schemas/TikTokPrivacy"
            },
            "title": "Privacy Options",
            "type": "array"
          },
          "stitch_disabled": {
            "title": "Stitch Disabled",
            "type": "boolean"
          }
        },
        "required": [
          "nickname",
          "avatar_url",
          "privacy_options",
          "comment_disabled",
          "duet_disabled",
          "stitch_disabled",
          "max_video_seconds"
        ],
        "title": "TikTokCreatorInfoOut",
        "type": "object"
      },
      "TikTokDirectPostBlock": {
        "enum": [
          "inbox_only",
          "post_limit",
          "banned",
          "app_limit",
          "cannot_post"
        ],
        "title": "TikTokDirectPostBlock",
        "type": "string"
      },
      "TikTokPostMode": {
        "enum": [
          "inbox",
          "direct"
        ],
        "title": "TikTokPostMode",
        "type": "string"
      },
      "TikTokPostSettings": {
        "additionalProperties": false,
        "properties": {
          "ai_generated": {
            "default": false,
            "title": "Ai Generated",
            "type": "boolean"
          },
          "allow_comment": {
            "default": false,
            "title": "Allow Comment",
            "type": "boolean"
          },
          "allow_duet": {
            "default": false,
            "title": "Allow Duet",
            "type": "boolean"
          },
          "allow_stitch": {
            "default": false,
            "title": "Allow Stitch",
            "type": "boolean"
          },
          "auto_add_music": {
            "default": false,
            "title": "Auto Add Music",
            "type": "boolean"
          },
          "branded_content": {
            "default": false,
            "title": "Branded Content",
            "type": "boolean"
          },
          "disclose_commercial": {
            "default": false,
            "title": "Disclose Commercial",
            "type": "boolean"
          },
          "mode": {
            "$ref": "#/components/schemas/TikTokPostMode",
            "default": "inbox"
          },
          "photo_title": {
            "anyOf": [
              {
                "maxLength": 90,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Photo Title"
          },
          "platform": {
            "const": "tiktok",
            "title": "Platform",
            "type": "string"
          },
          "privacy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TikTokPrivacy"
              },
              {
                "type": "null"
              }
            ]
          },
          "your_brand": {
            "default": false,
            "title": "Your Brand",
            "type": "boolean"
          }
        },
        "required": [
          "platform"
        ],
        "title": "TikTokPostSettings",
        "type": "object"
      },
      "TikTokPrivacy": {
        "enum": [
          "public",
          "friends",
          "followers",
          "only_me"
        ],
        "title": "TikTokPrivacy",
        "type": "string"
      },
      "TikTokPublishOptionsOut": {
        "description": "Whether direct posting can be offered for this creator now, and why not when it cannot.\n\n`creator_info` is null for a channel on the aggregator, which cannot read it.",
        "properties": {
          "creator_info": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TikTokCreatorInfoOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "direct_post_available": {
            "title": "Direct Post Available",
            "type": "boolean"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TikTokDirectPostBlock"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "direct_post_available",
          "unavailable_reason",
          "creator_info"
        ],
        "title": "TikTokPublishOptionsOut",
        "type": "object"
      },
      "TimeFormat": {
        "description": "Whether clock times read as a 12-hour or a 24-hour value.\n\nThe values are the tokens the web app already thinks in rather than\n`TWELVE`/`TWENTY_FOUR`, so nothing has to translate them on the way to an\n`Intl.DateTimeFormat` option.",
        "enum": [
          "12h",
          "24h"
        ],
        "title": "TimeFormat",
        "type": "string"
      },
      "TimeseriesBucket": {
        "description": "One interval of the trend series, for one metric.\n\nThe three counts are why `value` can be read without guessing. A bucket with\n`published_post_count == 0` is a day the workspace published nothing, and\nits `value` is `0`: the sum over no posts, which is a real magnitude and is\ndrawn as a real zero. A bucket that published something and has a `null`\n`value` is the opposite fact, an absence of knowledge, and the chart draws\nit as a hatch rather than as a flat bar.\n\n`collected_post_count` and `reporting_post_count` split that absence in two,\nthe same way `AnalyticsSummary` splits it. Nothing collected at all is a\ncollection that has not run yet, and is the state every workspace is in for\nits first hour. Collected but not reporting is a platform that does not\npublish this number, which no amount of waiting fixes.",
        "properties": {
          "collected_post_count": {
            "title": "Collected Post Count",
            "type": "integer"
          },
          "date": {
            "format": "date",
            "title": "Date",
            "type": "string"
          },
          "published_post_count": {
            "title": "Published Post Count",
            "type": "integer"
          },
          "reporting_post_count": {
            "title": "Reporting Post Count",
            "type": "integer"
          },
          "value": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "date",
          "value",
          "published_post_count",
          "collected_post_count",
          "reporting_post_count"
        ],
        "title": "TimeseriesBucket",
        "type": "object"
      },
      "TimeseriesInterval": {
        "description": "How wide one bucket of the trend series is.\n\nTwo grains rather than a bucket count, so the same range always produces the\nsame buckets whatever the caller's viewport is. A week starts on Monday,\nwhich is what Postgres `date_trunc('week', ...)` means and what the calendar\nsurfaces in this product already anchor to.",
        "enum": [
          "day",
          "week"
        ],
        "title": "TimeseriesInterval",
        "type": "string"
      },
      "TimeseriesMetric": {
        "description": "What one trend series plots.\n\n`MetricKey` plus `ENGAGEMENT`, for the reason `AnalyticsSort` carries the\nsame extra member: engagement is not a column a platform reports, it is the\nsum of the four inputs each platform does report, written per post at\ncollection time.\n\nNo `ENGAGEMENT_RATE`. `EngagementTotal` already argues why no rate rides on\na figure summed across platforms: engagement and impressions come from\ndifferent sets of posts once several platforms are in scope, so the ratio of\nthe two sums has no denominator anybody can name. A daily bucket is the same\nsum over a smaller set of posts and inherits the problem exactly. The rate\nstays where the platform is fixed: per post, and per channel.",
        "enum": [
          "engagement",
          "impressions",
          "views",
          "likes",
          "comments",
          "shares",
          "saves",
          "clicks"
        ],
        "title": "TimeseriesMetric",
        "type": "string"
      },
      "TopPostSummary": {
        "description": "The highest-engagement post in a window, for the Home card.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "engagement": {
            "title": "Engagement",
            "type": "integer"
          },
          "engagement_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engagement Rate"
          },
          "metrics": {
            "$ref": "#/components/schemas/PostMetricValues"
          },
          "permalink": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Permalink"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "post_id": {
            "title": "Post Id",
            "type": "string"
          },
          "published_at": {
            "format": "date-time",
            "title": "Published At",
            "type": "string"
          }
        },
        "required": [
          "post_id",
          "caption",
          "platform",
          "channel_id",
          "permalink",
          "published_at",
          "engagement",
          "engagement_rate",
          "metrics"
        ],
        "title": "TopPostSummary",
        "type": "object"
      },
      "TopPostsRuleIn": {
        "additionalProperties": false,
        "properties": {
          "beat_average_by": {
            "default": 1.5,
            "maximum": 5.0,
            "minimum": 1.1,
            "title": "Beat Average By",
            "type": "number"
          },
          "channel_ids": {
            "items": {
              "type": "string"
            },
            "title": "Channel Ids",
            "type": "array"
          },
          "lookback_days": {
            "default": 90,
            "maximum": 365.0,
            "minimum": 14.0,
            "title": "Lookback Days",
            "type": "integer"
          }
        },
        "title": "TopPostsRuleIn",
        "type": "object"
      },
      "TopPostsRuleOut": {
        "additionalProperties": false,
        "properties": {
          "beat_average_by": {
            "default": 1.5,
            "maximum": 5.0,
            "minimum": 1.1,
            "title": "Beat Average By",
            "type": "number"
          },
          "channel_ids": {
            "items": {
              "type": "string"
            },
            "title": "Channel Ids",
            "type": "array"
          },
          "lookback_days": {
            "default": 90,
            "maximum": 365.0,
            "minimum": 14.0,
            "title": "Lookback Days",
            "type": "integer"
          }
        },
        "title": "TopPostsRuleOut",
        "type": "object"
      },
      "TranscriptSegmentOut": {
        "properties": {
          "end_seconds": {
            "title": "End Seconds",
            "type": "number"
          },
          "start_seconds": {
            "title": "Start Seconds",
            "type": "number"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "start_seconds",
          "end_seconds",
          "text"
        ],
        "title": "TranscriptSegmentOut",
        "type": "object"
      },
      "UnsubscribeOut": {
        "description": "Which email a link switches off, and whether it is on now.",
        "properties": {
          "email_enabled": {
            "title": "Email Enabled",
            "type": "boolean"
          },
          "event": {
            "$ref": "#/components/schemas/NotificationEvent"
          },
          "workspace_id": {
            "title": "Workspace Id",
            "type": "string"
          },
          "workspace_name": {
            "title": "Workspace Name",
            "type": "string"
          }
        },
        "required": [
          "event",
          "workspace_id",
          "workspace_name",
          "email_enabled"
        ],
        "title": "UnsubscribeOut",
        "type": "object"
      },
      "UpcomingPostSummary": {
        "description": "A single upcoming scheduled post, for the dashboard's \"coming up\" list.\n\nThe list holds one row per destination channel, so a post shared across\nseveral channels arrives as that many entries. `group_id` is what ties\nthem back together: it is the one thing that actually means \"the same\npost\", where caption and scheduled time do not, since two unrelated,\ncaption-less posts can land on the same instant.\n\n`channel_id` and `platform` say where this destination goes, so a row\ngrouped by `group_id` can show the platforms it is going to without a\nsecond request.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Caption"
          },
          "channel_id": {
            "title": "Channel Id",
            "type": "string"
          },
          "group_id": {
            "title": "Group Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "platform": {
            "title": "Platform",
            "type": "string"
          },
          "scheduled_at": {
            "format": "date-time",
            "title": "Scheduled At",
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "id",
          "group_id",
          "channel_id",
          "platform",
          "caption",
          "scheduled_at"
        ],
        "title": "UpcomingPostSummary",
        "type": "object"
      },
      "UploadIntentRequest": {
        "properties": {
          "filename": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Filename",
            "type": "string"
          },
          "mime_type": {
            "minLength": 1,
            "title": "Mime Type",
            "type": "string"
          },
          "size_bytes": {
            "exclusiveMinimum": 0.0,
            "title": "Size Bytes",
            "type": "integer"
          }
        },
        "required": [
          "filename",
          "mime_type",
          "size_bytes"
        ],
        "title": "UploadIntentRequest",
        "type": "object"
      },
      "UploadIntentResponse": {
        "properties": {
          "fields": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Fields",
            "type": "object"
          },
          "object_key": {
            "title": "Object Key",
            "type": "string"
          },
          "upload_url": {
            "title": "Upload Url",
            "type": "string"
          }
        },
        "required": [
          "object_key",
          "upload_url",
          "fields"
        ],
        "title": "UploadIntentResponse",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "VariationDraftIn": {
        "description": "One variant, as the browser prepared it.\n\nThe scene and the two overlay keys arrive together because they have to\nagree: the overlays are a raster of that scene with the clip hidden, taken\nby the code that drew the preview. Nothing server-side re-derives one from\nthe other, for the reason `RenderSpecIn` gives.",
        "properties": {
          "body": {
            "anyOf": [
              {
                "maxLength": 400,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "hook": {
            "anyOf": [
              {
                "maxLength": 400,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hook"
          },
          "over_object_key": {
            "minLength": 1,
            "title": "Over Object Key",
            "type": "string"
          },
          "scene": {
            "additionalProperties": true,
            "title": "Scene",
            "type": "object"
          },
          "scene_version": {
            "minimum": 1.0,
            "title": "Scene Version",
            "type": "integer"
          },
          "source_asset_id": {
            "format": "uuid",
            "title": "Source Asset Id",
            "type": "string"
          },
          "spec": {
            "$ref": "#/components/schemas/RenderSpecIn"
          },
          "under_object_key": {
            "minLength": 1,
            "title": "Under Object Key",
            "type": "string"
          }
        },
        "required": [
          "scene",
          "scene_version",
          "source_asset_id",
          "under_object_key",
          "over_object_key",
          "spec"
        ],
        "title": "VariationDraftIn",
        "type": "object"
      },
      "VariationItemOut": {
        "description": "One variant, as the progress list shows it.",
        "properties": {
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Body"
          },
          "design_id": {
            "title": "Design Id",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "hook": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hook"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "output_asset_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output Asset Id"
          },
          "position": {
            "title": "Position",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/VariationStatus"
          }
        },
        "required": [
          "id",
          "design_id",
          "position",
          "hook",
          "body",
          "status",
          "output_asset_id",
          "error"
        ],
        "title": "VariationItemOut",
        "type": "object"
      },
      "VariationSetCreateIn": {
        "description": "A request to build N videos from one design.\n\nThe length bounds are declared here so validation refuses an oversized batch\nbefore any work starts. The service checks the ceiling again, because it is\nalso reachable from anything that is not this route.",
        "properties": {
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/VariationDraftIn"
            },
            "maxItems": 12,
            "minItems": 1,
            "title": "Variants",
            "type": "array"
          }
        },
        "required": [
          "name",
          "variants"
        ],
        "title": "VariationSetCreateIn",
        "type": "object"
      },
      "VariationSetOut": {
        "description": "A set and everything in it, with the tally a progress line is drawn from.\n\nThe counts are served rather than left to the client to add up, so the\nprogress line and the \"is there anything left to wait for\" decision are made\nonce, in the place that knows what each status means.",
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "design_id": {
            "title": "Design Id",
            "type": "string"
          },
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "finished": {
            "title": "Finished",
            "type": "boolean"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/VariationItemOut"
            },
            "title": "Items",
            "type": "array"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "pending": {
            "title": "Pending",
            "type": "integer"
          },
          "running": {
            "title": "Running",
            "type": "integer"
          },
          "succeeded": {
            "title": "Succeeded",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "design_id",
          "name",
          "created_at",
          "items",
          "total",
          "succeeded",
          "failed",
          "pending",
          "running",
          "finished"
        ],
        "title": "VariationSetOut",
        "type": "object"
      },
      "VariationStatus": {
        "description": "Where one variant has got to.\n\n`RenderStatus` plus `PENDING`, and the extra member is the point: a variant\nwith no render row yet is waiting for a slot, which from the outside looks\nnothing like a render sitting in the encoder's queue. Collapsing the two\nwould make a batch of twelve report every variant as queued the moment it\nwas created, and then report no progress at all for the first six.",
        "enum": [
          "pending",
          "queued",
          "running",
          "succeeded",
          "failed"
        ],
        "title": "VariationStatus",
        "type": "string"
      },
      "VideoCategoryOut": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title"
        ],
        "title": "VideoCategoryOut",
        "type": "object"
      },
      "WebhookDeliveryOut": {
        "description": "One attempt to post one event, as the endpoint's activity list shows it.\n\nThe payload is included because \"what did you actually send me\" is the first\nquestion anybody debugging a receiver asks, and the alternative is telling\nthem to look in a log they cannot reach.",
        "properties": {
          "attempt_count": {
            "title": "Attempt Count",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "event": {
            "$ref": "#/components/schemas/WebhookEventKind"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Attempt At"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "response_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status"
          },
          "status": {
            "$ref": "#/components/schemas/WebhookDeliveryStatus"
          }
        },
        "required": [
          "id",
          "event",
          "status",
          "attempt_count",
          "response_status",
          "error",
          "payload",
          "next_attempt_at",
          "delivered_at",
          "created_at"
        ],
        "title": "WebhookDeliveryOut",
        "type": "object"
      },
      "WebhookDeliveryStatus": {
        "description": "Where one attempt to post one event to one endpoint got to.\n\n`PENDING` is the only status the sweep picks up, and a delivery stays in it\nbetween retries: `next_attempt_at` is what says the row is not due yet, so\n\"waiting to be retried\" needs no status of its own and cannot drift out of\nstep with the timestamp that actually schedules it.\n\n`FAILED` means the attempt budget is spent. The endpoint is not disabled by\nit, because one bad afternoon at the receiver should not silently stop every\nlater event; what a run of failures costs is visible on the endpoint's own\nrow instead.",
        "enum": [
          "pending",
          "delivered",
          "failed"
        ],
        "title": "WebhookDeliveryStatus",
        "type": "string"
      },
      "WebhookEndpointCreateIn": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventKind"
            },
            "minItems": 1,
            "title": "Events",
            "type": "array"
          },
          "url": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookEndpointCreateIn",
        "type": "object"
      },
      "WebhookEndpointOut": {
        "description": "An endpoint as it can safely be listed. There is no secret here by design.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventKind"
            },
            "title": "Events",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "last_delivered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Delivered At"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "last_failed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failed At"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "events",
          "is_active",
          "last_delivered_at",
          "last_failed_at",
          "last_error",
          "created_at"
        ],
        "title": "WebhookEndpointOut",
        "type": "object"
      },
      "WebhookEndpointUpdateIn": {
        "additionalProperties": false,
        "description": "Every field optional, and absent means \"leave it alone\".\n\nAn empty `description` clears it; `None` does not, because `None` already\nmeans \"not named\" for every other field here.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/WebhookEventKind"
                },
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "title": "WebhookEndpointUpdateIn",
        "type": "object"
      },
      "WebhookEventGroupOut": {
        "description": "A titled set of events, in the order the form renders them.",
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventOut"
            },
            "title": "Events",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "events"
        ],
        "title": "WebhookEventGroupOut",
        "type": "object"
      },
      "WebhookEventKind": {
        "description": "Something a workspace can have posted to a URL of its own.\n\nNamed for the outbound half of the word. `WebhookEvent`, without the suffix,\nis already the table that deduplicates the webhooks the gateway sends *to*\nus; these are the ones we send *out*, and the two directions must not share\na name.\n\nThe dotted names are the ones the post event stream already writes\n(`post.published`, `post.failed`), so the same string means the same thing in\n`post_events.event_type` and in a delivered payload. That is why the posts\ngroup is not a curated rewording: an integrator reading either surface sees\none vocabulary.\n\nEvery member has a producer in this codebase. An event nobody emits is a\ncheckbox that promises a call that never arrives, which is worse than an\nabsent checkbox, because the integration waits for it.",
        "enum": [
          "post.scheduled",
          "post.published",
          "post.failed",
          "post.cancelled",
          "channel.connected",
          "channel.disconnected",
          "comment.received",
          "comment.replied",
          "comment.reply_failed",
          "automation.run_failed",
          "automation.approval_requested"
        ],
        "title": "WebhookEventKind",
        "type": "string"
      },
      "WebhookEventOut": {
        "description": "One subscribable event, with the sentence the form shows under it.",
        "properties": {
          "description": {
            "title": "Description",
            "type": "string"
          },
          "event": {
            "$ref": "#/components/schemas/WebhookEventKind"
          }
        },
        "required": [
          "event",
          "description"
        ],
        "title": "WebhookEventOut",
        "type": "object"
      },
      "WeekStart": {
        "description": "The day a calendar week begins on for one person.\n\nThree members, not seven. These are the only first days in real use, and\noffering the other four would put choices in a settings form that no\ncalendar convention asks for.",
        "enum": [
          "saturday",
          "sunday",
          "monday"
        ],
        "title": "WeekStart",
        "type": "string"
      },
      "WorkingContext": {
        "description": "The kind of work one person does in Publedia.\n\nA person, not a workspace: someone who runs an agency runs it in every\nclient workspace they open, so this follows them across the switcher. It is\nalso why it is not `workspaces.brand_kind`, which records what the brand is\nrather than who is operating it and cannot tell an owner-operator, an\nin-house manager, and an agency operator apart.\n\nNullable wherever it is stored, and null means \"never answered or skipped\".\nEvery onboarding question is refusable, so an unanswered dimension has to be\na state the product can render rather than a default in disguise.",
        "enum": [
          "creator",
          "owner_operator",
          "in_house_manager",
          "agency"
        ],
        "title": "WorkingContext",
        "type": "string"
      },
      "WorkspaceDeletionIn": {
        "additionalProperties": false,
        "description": "The workspace's name, typed back as the confirmation, and the outcome confirmed.\n\n`expect_immediate` is the `empty` the dialog was shown. The server decides\nagain and answers 409 `deletion_outcome_changed` when it would do otherwise.",
        "properties": {
          "confirm_name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Confirm Name",
            "type": "string"
          },
          "expect_immediate": {
            "title": "Expect Immediate",
            "type": "boolean"
          }
        },
        "required": [
          "confirm_name",
          "expect_immediate"
        ],
        "title": "WorkspaceDeletionIn",
        "type": "object"
      },
      "WorkspaceDeletionOut": {
        "description": "Where this workspace's deletion stands.\n\n`empty` says what asking would do: an empty workspace is deleted at once,\nany other is deleted `grace_days` after the request. `can_delete` is whether\nthe caller may ask, or cancel, so the client offers neither to anyone else.\n`in_progress` is a deletion whose date has passed, which nobody can cancel.",
        "properties": {
          "can_delete": {
            "title": "Can Delete",
            "type": "boolean"
          },
          "empty": {
            "title": "Empty",
            "type": "boolean"
          },
          "grace_days": {
            "title": "Grace Days",
            "type": "integer"
          },
          "in_progress": {
            "title": "In Progress",
            "type": "boolean"
          },
          "scheduled_for": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled For"
          }
        },
        "required": [
          "scheduled_for",
          "in_progress",
          "empty",
          "can_delete",
          "grace_days"
        ],
        "title": "WorkspaceDeletionOut",
        "type": "object"
      },
      "WorkspaceDeletionResultOut": {
        "description": "What the request did, and where the caller goes next after a deletion.",
        "properties": {
          "next_workspace_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Workspace Id"
          },
          "outcome": {
            "$ref": "#/components/schemas/DeletionOutcome"
          },
          "scheduled_for": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scheduled For"
          }
        },
        "required": [
          "outcome",
          "scheduled_for",
          "next_workspace_id"
        ],
        "title": "WorkspaceDeletionResultOut",
        "type": "object"
      },
      "WorkspaceSettingsIn": {
        "additionalProperties": false,
        "description": "A partial update. An omitted field keeps its value.\n\nThe timezone has no clear flag: it has no unset state to return to, so a\nnull there could only ever mean \"not changing this\". The starting point and\nthe weekly goal do have one, so for those an explicit null means \"back to\nunset\" and `to_update` reads `model_fields_set` to tell the two apart.\n\n`primary_outcomes` replaces the whole list; an empty list or an explicit\nnull clears it.",
        "properties": {
          "content_start": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContentStart"
              },
              {
                "type": "null"
              }
            ]
          },
          "primary_outcomes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PrimaryOutcome"
                },
                "maxItems": 6,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Outcomes"
          },
          "timezone": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "weekly_post_goal": {
            "anyOf": [
              {
                "maximum": 50.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weekly Post Goal"
          }
        },
        "title": "WorkspaceSettingsIn",
        "type": "object"
      },
      "WorkspaceSettingsOut": {
        "description": "Workspace-wide values that are not brand facts.",
        "properties": {
          "content_start": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContentStart"
              },
              {
                "type": "null"
              }
            ]
          },
          "primary_outcomes": {
            "items": {
              "$ref": "#/components/schemas/PrimaryOutcome"
            },
            "title": "Primary Outcomes",
            "type": "array"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          },
          "weekly_post_goal": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weekly Post Goal"
          }
        },
        "required": [
          "timezone",
          "primary_outcomes",
          "content_start",
          "weekly_post_goal"
        ],
        "title": "WorkspaceSettingsOut",
        "type": "object"
      },
      "WorkspaceSummary": {
        "properties": {
          "brand_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand Category"
          },
          "brand_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand Kind"
          },
          "channel_count": {
            "title": "Channel Count",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "deletion_scheduled_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Deletion Scheduled At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Url"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "plan": {
            "$ref": "#/components/schemas/BillingPlan"
          },
          "role": {
            "$ref": "#/components/schemas/MembershipRole"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "brand_kind",
          "brand_category",
          "website",
          "logo_url",
          "created_at",
          "plan",
          "channel_count"
        ],
        "title": "WorkspaceSummary",
        "type": "object"
      },
      "XPostSettings": {
        "additionalProperties": false,
        "properties": {
          "made_with_ai": {
            "default": false,
            "title": "Made With Ai",
            "type": "boolean"
          },
          "paid_partnership": {
            "default": false,
            "title": "Paid Partnership",
            "type": "boolean"
          },
          "platform": {
            "const": "x",
            "title": "Platform",
            "type": "string"
          },
          "reply_audience": {
            "$ref": "#/components/schemas/XReplyAudience",
            "default": "everyone"
          }
        },
        "required": [
          "platform"
        ],
        "title": "XPostSettings",
        "type": "object"
      },
      "XReplyAudience": {
        "enum": [
          "everyone",
          "following",
          "mentioned",
          "verified"
        ],
        "title": "XReplyAudience",
        "type": "string"
      },
      "YouTubePostSettings": {
        "additionalProperties": false,
        "properties": {
          "altered_content": {
            "default": false,
            "title": "Altered Content",
            "type": "boolean"
          },
          "category_id": {
            "default": "22",
            "pattern": "^\\d{1,4}$",
            "title": "Category Id",
            "type": "string"
          },
          "made_for_kids": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Made For Kids"
          },
          "notify_subscribers": {
            "default": true,
            "title": "Notify Subscribers",
            "type": "boolean"
          },
          "platform": {
            "const": "youtube",
            "title": "Platform",
            "type": "string"
          },
          "privacy": {
            "$ref": "#/components/schemas/YouTubePrivacy",
            "default": "public"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "platform"
        ],
        "title": "YouTubePostSettings",
        "type": "object"
      },
      "YouTubePrivacy": {
        "enum": [
          "public",
          "unlisted",
          "private"
        ],
        "title": "YouTubePrivacy",
        "type": "string"
      },
      "YouTubePublishOptionsOut": {
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/VideoCategoryOut"
            },
            "title": "Categories",
            "type": "array"
          },
          "region_code": {
            "title": "Region Code",
            "type": "string"
          }
        },
        "required": [
          "region_code",
          "categories"
        ],
        "title": "YouTubePublishOptionsOut",
        "type": "object"
      }
    }
  },
  "info": {
    "title": "Publedia API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/account/api-keys": {
      "get": {
        "description": "The caller's personal keys, newest first, revoked ones included, each with the workspaces it reaches. Secrets are never returned.",
        "operationId": "list_account_api_keys_account_api_keys_get",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_AccountKeyOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Personal Api Keys",
        "tags": [
          "account"
        ]
      },
      "post": {
        "description": "Issue one key that reaches several workspaces over the assistant endpoint. With `workspaces` left out it reaches every workspace the caller administers that has assistants turned on at this moment; workspaces joined later are not added. The caller must be an admin of each, and scopes cannot exceed their role there. A person can have 20 working keys. The secret is in this response and nowhere else.",
        "operationId": "create_account_api_key_account_api_keys_post",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountKeyCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_IssuedAccountKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Personal Api Key",
        "tags": [
          "account"
        ]
      }
    },
    "/account/api-keys/{key_id}": {
      "delete": {
        "description": "Revoke a personal key in every workspace. It stops working immediately.",
        "operationId": "revoke_account_api_key_account_api_keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AccountKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke Personal Api Key",
        "tags": [
          "account"
        ]
      }
    },
    "/account/api-keys/{key_id}/rotate": {
      "post": {
        "description": "A new secret for the same key, shown once in this response. The old secret keeps working for `overlap_seconds`; 0 stops it now.",
        "operationId": "rotate_account_api_key_account_api_keys__key_id__rotate_post",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyRotateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_IssuedAccountKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Rotate Personal Api Key",
        "tags": [
          "account"
        ]
      }
    },
    "/account/api-keys/{key_id}/workspaces": {
      "post": {
        "description": "Give a personal key one more workspace the caller administers.",
        "operationId": "add_account_api_key_workspace_account_api_keys__key_id__workspaces_post",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountKeyWorkspaceIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AccountKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Workspace To Personal Api Key",
        "tags": [
          "account"
        ]
      }
    },
    "/account/api-keys/{key_id}/workspaces/{workspace_id}": {
      "delete": {
        "description": "Take one workspace from a personal key; the others keep working.",
        "operationId": "remove_account_api_key_workspace_account_api_keys__key_id__workspaces__workspace_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AccountKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Workspace From Personal Api Key",
        "tags": [
          "account"
        ]
      }
    },
    "/account/delete": {
      "post": {
        "description": "Delete the signed-in person's account: the profile, the consent log, referral records and notification settings, their profile pictures, then the sign-in user with its sessions and linked Google account. The caller proves who they are: the current password for an account that has one (403 `account_password_wrong`), else a sign-in within the last ten minutes (403 `account_sign_in_again`). Refused with 409 `account_has_workspaces` while the person belongs to a workspace, other than one already scheduled for deletion that holds nobody else.",
        "operationId": "delete_account_account_delete_post",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccountIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Account",
        "tags": [
          "account"
        ]
      }
    },
    "/account/export": {
      "get": {
        "description": "Everything kept about the signed-in person outside the workspaces' content, as one JSON document, for the right of access and portability.",
        "operationId": "export_account_account_export_get",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AccountExportOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Account",
        "tags": [
          "account"
        ]
      }
    },
    "/account/invites/accept": {
      "post": {
        "description": "Join the workspace an invitation names. The caller must be signed in with the address the invitation was sent to, and that address must be confirmed. Accepting twice is not an error: the second call returns the membership that already exists.",
        "operationId": "accept_invite_account_invites_accept_post",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInviteIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_WorkspaceSummary_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Accept Invite",
        "tags": [
          "account"
        ]
      }
    },
    "/account/invites/{token}": {
      "get": {
        "description": "What an invitation link leads to, so the accept screen can name the workspace and the role. Readable by anyone holding the link, so it discloses nothing about who else is in the workspace. A revoked or unknown token is a 404 either way, on purpose.",
        "operationId": "preview_invite_account_invites__token__get",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_InvitePreviewOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview Invite",
        "tags": [
          "account"
        ]
      }
    },
    "/account/preferences": {
      "get": {
        "description": "The caller's display and time settings. Defaults are already applied, so no field is ever null and the client does not decide what unset means.",
        "operationId": "get_preferences_account_preferences_get",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PreferencesOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Preferences",
        "tags": [
          "account"
        ]
      },
      "patch": {
        "description": "Update display and time settings. Partial: an omitted field keeps its current value. The time zone must be an IANA name this server can resolve, so a typo is refused here rather than surfacing later as a scheduled post that never ran.",
        "operationId": "update_preferences_account_preferences_patch",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreferencesUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PreferencesOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Preferences",
        "tags": [
          "account"
        ]
      }
    },
    "/account/profile": {
      "patch": {
        "description": "Update the caller's display name, avatar, and working context. Partial: an omitted field keeps its value, an explicit null removes it, which is how a setup answer goes back to unanswered. Writes Publedia's own profile row and never the sign-in user record, which belongs to the web app.",
        "operationId": "update_profile_account_profile_patch",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ProfileOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Profile",
        "tags": [
          "account"
        ]
      }
    },
    "/account/referral": {
      "get": {
        "description": "The caller's referral link, progress, and reward ledger. The code is issued on the first call and never changes. Applies any reward waiting for a workspace before answering.",
        "operationId": "get_referral_overview_account_referral_get",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ReferralOverviewOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Referral Overview",
        "tags": [
          "referrals"
        ]
      }
    },
    "/account/referral/claim": {
      "post": {
        "description": "Credit the caller's new account to the owner of `code`. Always 200: `outcome` says whether it was attributed, already attributed (the first code wins), unknown, the caller's own, or offered by an account that is no longer new.",
        "operationId": "claim_referral_account_referral_claim_post",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferralClaimIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ReferralClaimOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Claim Referral",
        "tags": [
          "referrals"
        ]
      }
    },
    "/account/sessions": {
      "get": {
        "description": "Every browser and device holding a live session for the caller.\n\nDeliberately not workspace-scoped: a session belongs to the person, not to\nwhichever workspace happens to be active.",
        "operationId": "list_sign_in_sessions_account_sessions_get",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_SignInSessionsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Sign In Sessions",
        "tags": [
          "account"
        ]
      }
    },
    "/ai/chat": {
      "post": {
        "description": "Ask the assistant about this workspace. Streams Server-Sent Events: conversation, text_delta, tool_call, tool_result, usage, and a final done. The assistant can read the workspace and can suggest changes, but no tool it has changes anything: a suggestion becomes a pending proposal that a person applies through /ai/proposals/{id}/apply. Which tools it may use is decided by the caller's role and the route they are on, not by the request.",
        "operationId": "chat_ai_chat_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiChatIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              },
              "text/event-stream": {}
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Chat",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/ai/conversations": {
      "get": {
        "description": "The caller's recent assistant conversations, most recently used first. Scoped to the member rather than the workspace: a chat is a draft space, and colleagues do not read each other's. Conversations are pruned after 30 days.",
        "operationId": "list_conversations_ai_conversations_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_AiConversationOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Conversations",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "description": "Reserve a conversation id ahead of the first message, for a client that needs the real id before it can persist anything locally. Untitled and invisible to /ai/conversations until a first message lands on it.",
        "operationId": "create_conversation_ai_conversations_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiConversationCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AiConversationOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Conversation",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/ai/conversations/{conversation_id}": {
      "get": {
        "description": "Every turn in one of the caller's conversations, oldest first.",
        "operationId": "get_conversation_ai_conversations__conversation_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_AiConversationMessageOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Conversation",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/ai/conversations/{conversation_id}/proposals": {
      "get": {
        "description": "Changes the assistant suggested in this conversation that are still waiting for a decision. Each carries the exact difference it would make.",
        "operationId": "list_proposals_ai_conversations__conversation_id__proposals_get",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_AiProposalOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Proposals",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/ai/fields": {
      "post": {
        "description": "Writes one automation or composer field from the brand and the content already around it. Makes a real model call and can spend AI credits. Returns values that are already valid for the field they are destined for.",
        "operationId": "generate_field_ai_fields_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiFieldGenerateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AiFieldGenerateOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Generate Field",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/ai/proposals/{proposal_id}/apply": {
      "post": {
        "description": "Carry out a change the assistant suggested. This is the only way one takes effect: the assistant itself has no tool that can. Applying twice returns 409, and so does applying against a record that changed since the suggestion was made.",
        "operationId": "apply_proposal_ai_proposals__proposal_id__apply_post",
        "parameters": [
          {
            "in": "path",
            "name": "proposal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Proposal Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AiProposalOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Apply Proposal",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/ai/proposals/{proposal_id}/decline": {
      "post": {
        "description": "Turn down a suggested change. It closes for good: the assistant cannot revive it by repeating the same tool call.",
        "operationId": "decline_proposal_ai_proposals__proposal_id__decline_post",
        "parameters": [
          {
            "in": "path",
            "name": "proposal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Proposal Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AiProposalOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Decline Proposal",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/ai/proposals/{proposal_id}/undo": {
      "post": {
        "description": "Put the workspace back as it was before an applied change. Refused once the post has moved on, since an undo that half works is worse than one that says no.",
        "operationId": "undo_proposal_ai_proposals__proposal_id__undo_post",
        "parameters": [
          {
            "in": "path",
            "name": "proposal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Proposal Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AiProposalOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Undo Proposal",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/ai/settings": {
      "get": {
        "description": "Workspace AI governance: whether the in-app assistant renders, whether external MCP clients are accepted, and this month's token spend against the configured ceiling. Any member may read it, because the assistant needs an answer before it can decide whether to render.",
        "operationId": "get_ai_settings_ai_settings_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AiSettingsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Ai Settings",
        "tags": [
          "ai"
        ],
        "x-api-key-scope": "read"
      },
      "put": {
        "description": "Update workspace AI governance. Partial: an omitted field keeps its current value, while an explicit null monthly_token_budget returns to the plan's allowance, and a budget above that allowance is refused. Requires workspace_manage, so an editor can use the assistant but cannot widen what it is allowed to do.",
        "operationId": "update_ai_settings_ai_settings_put",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AiSettingsUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AiSettingsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Ai Settings",
        "tags": [
          "ai"
        ]
      }
    },
    "/ai/usage": {
      "get": {
        "description": "This workspace's AI activity for the current calendar month: tokens against the budget, assistant turns, tool calls with refusals and failures, a breakdown per member and per tool, and the most recent activity. Requires workspace_manage, since it shows what every member has spent.",
        "operationId": "get_ai_usage_ai_usage_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AiUsageOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Ai Usage",
        "tags": [
          "ai"
        ]
      }
    },
    "/albums": {
      "get": {
        "operationId": "list_albums_albums_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_AlbumOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Albums",
        "tags": [
          "media"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "operationId": "create_album_albums_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlbumCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AlbumOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Album",
        "tags": [
          "media"
        ]
      }
    },
    "/analytics/posts": {
      "get": {
        "description": "Published posts in a date range with their most recent metric reading. Posts with no reading are included: omitting them would understate how much was published. `meta.available_metrics` is the set of columns the channels in scope can ever fill. `last_collected_at` and `collection_degraded` describe every post the filters match, not the page: the newest reading in range, and whether the publishing gateway is down while a post in range is on a healthy channel.",
        "operationId": "list_post_analytics_route_analytics_posts_get",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/Platform"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            }
          },
          {
            "in": "query",
            "name": "channel_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Channel Id"
            }
          },
          {
            "in": "query",
            "name": "post_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Post Id"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AnalyticsSort",
              "default": "engagement"
            }
          },
          {
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortOrder",
              "default": "desc"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "timezone",
            "required": false,
            "schema": {
              "default": "UTC",
              "title": "Timezone",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostAnalyticsPageOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Post Analytics Route",
        "tags": [
          "analytics"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/analytics/summary": {
      "get": {
        "description": "Metric totals and a per-channel split over the same filters as `/analytics/posts`, with no paging. Every total carries the number of posts that actually reported it, and a metric nothing reported comes back null rather than zero: no channel in scope reporting clicks is not the same fact as nobody clicking.",
        "operationId": "analytics_summary_route_analytics_summary_get",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/Platform"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            }
          },
          {
            "in": "query",
            "name": "channel_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Channel Id"
            }
          },
          {
            "in": "query",
            "name": "timezone",
            "required": false,
            "schema": {
              "default": "UTC",
              "title": "Timezone",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AnalyticsSummary_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Analytics Summary Route",
        "tags": [
          "analytics"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/analytics/timeseries": {
      "get": {
        "description": "The same totals as `/analytics/summary`, split by the local day each post published. Attribution by publish day, not a daily delta: a bucket answers how the posts published then have done since, which is what the range means everywhere else in this domain. Summing a series reproduces that metric's total for the same filters. A bucket with no published post carries a real `0`; a bucket that published something nothing has reported carries `null`, and the two are not the same fact.",
        "operationId": "analytics_timeseries_route_analytics_timeseries_get",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "From"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "To"
            }
          },
          {
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/Platform"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            }
          },
          {
            "in": "query",
            "name": "channel_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Channel Id"
            }
          },
          {
            "in": "query",
            "name": "metric",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/TimeseriesMetric"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Metric"
            }
          },
          {
            "in": "query",
            "name": "interval",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TimeseriesInterval",
              "default": "day"
            }
          },
          {
            "in": "query",
            "name": "timezone",
            "required": false,
            "schema": {
              "default": "UTC",
              "title": "Timezone",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AnalyticsTimeseries_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Analytics Timeseries Route",
        "tags": [
          "analytics"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/api-keys": {
      "get": {
        "description": "Every API key in this workspace, newest first. Revoked keys stay listed so an audit trail still resolves. Connected apps are listed apart, under `/connected-apps`. Secrets are never returned.",
        "operationId": "list_api_keys_api_keys_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_ApiKeyOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Api Keys",
        "tags": [
          "api-keys"
        ]
      },
      "post": {
        "description": "Issue a key. The secret is in this response and nowhere else, so it cannot be retrieved later. Scopes cannot exceed the issuing member's own role: asking for more is refused rather than quietly trimmed. A new key expires: after `expires_in_days` (90 by default), or at `expires_at`, at most 365 days away.",
        "operationId": "create_api_key_api_keys_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_IssuedApiKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Api Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/api-keys/{key_id}": {
      "delete": {
        "description": "Delete a key, revoked or not. Access ends at once and the key leaves the list. Past audit entries stay, without the link to the key.",
        "operationId": "delete_api_key_api_keys__key_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Api Key",
        "tags": [
          "api-keys"
        ]
      },
      "patch": {
        "description": "Rename a key. Its scopes, expiry and secret are unchanged.",
        "operationId": "rename_api_key_api_keys__key_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyRenameIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ApiKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Rename Api Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/api-keys/{key_id}/replace": {
      "post": {
        "description": "Issue a new key in place of this one, with its secret in this response only. With `revoke_old_when_used`, a key that still works is revoked the first time the new one is used.",
        "operationId": "replace_api_key_api_keys__key_id__replace_post",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyReplaceIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_IssuedApiKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Api Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/api-keys/{key_id}/revoke": {
      "post": {
        "description": "Revoke a key. It stops working immediately, including for clients that are already connected. The row stays so its past calls remain attributable.",
        "operationId": "revoke_api_key_api_keys__key_id__revoke_post",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ApiKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke Api Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/api-keys/{key_id}/rotate": {
      "post": {
        "description": "A new secret for the same key, shown once in this response. The old secret keeps working for `overlap_seconds`, so a client can move over without downtime; 0 stops it now.",
        "operationId": "rotate_api_key_api_keys__key_id__rotate_post",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyRotateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_IssuedApiKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Rotate Api Key",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/api-keys/{key_id}/stop-old-secret": {
      "post": {
        "description": "End a rotation's overlap now: the secret before the rotation stops working.",
        "operationId": "stop_old_secret_api_keys__key_id__stop_old_secret_post",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ApiKeyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Stop Old Secret",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/assistants/disconnect-all": {
      "post": {
        "description": "Sign out every assistant in the workspace, in one transaction: every connected app, and every live key an assistant called with or that names one. Other keys stay. Admins only.",
        "operationId": "disconnect_all_assistants_assistants_disconnect_all_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AssistantsDisconnectedOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Disconnect All Assistants",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/assistants/status": {
      "get": {
        "description": "The latest call from an assistant and the latest refusal since: the caller's own, or with `view=everyone` the workspace's (admins only).",
        "operationId": "assistant_connection_status_assistants_status_get",
        "parameters": [
          {
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectedAppsView"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ConnectionStatusOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Assistant Connection Status",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/auth/providers": {
      "get": {
        "description": "Whether Google sign-in is offered. Public: the sign-in page reads it before anyone is signed in. Sign-in itself is served under `/auth` by Better Auth, outside this contract.",
        "operationId": "sign_in_providers_auth_providers_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_SignInProvidersOut_"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Sign In Providers",
        "tags": [
          "sign-in"
        ]
      }
    },
    "/automations": {
      "get": {
        "description": "Automations in this workspace. `kind=evergreen` returns only the categories on the Evergreen screen, `kind=comment` and `kind=message` only the automations a comment or a direct message starts, and `kind=flow` the rest, so an automation appears in exactly one place. `post_id` keeps only the automations whose comment trigger is scoped to that post. `exclude_archived=true` leaves archived automations out unless `status` is given.",
        "operationId": "list_automations_automations_get",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AutomationStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AutomationKind"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          },
          {
            "in": "query",
            "name": "post_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Post Id"
            }
          },
          {
            "in": "query",
            "name": "exclude_archived",
            "required": false,
            "schema": {
              "default": false,
              "title": "Exclude Archived",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 200,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Page_AutomationOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Automations",
        "tags": [
          "automations"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "operationId": "create_automation_automations_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Automation",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/counts": {
      "get": {
        "description": "How many automations this workspace has in each kind and status, zeros included, so a screen can label its tabs without paging every list.",
        "operationId": "count_automations_automations_counts_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationCountsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Count Automations",
        "tags": [
          "automations"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/automations/feed-lookup": {
      "post": {
        "description": "Works out the feed behind a URL a member typed: a channel link, a blog's homepage, or a feed address itself. Makes real outbound requests and writes nothing.",
        "operationId": "feed_lookup_automations_feed_lookup_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedLookupIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_FeedLookupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Feed Lookup",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/next-runs": {
      "post": {
        "operationId": "next_runs_automations_next_runs_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NextRunsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_NextRunsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Next Runs",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/reply-preview": {
      "post": {
        "operationId": "reply_preview_automations_reply_preview_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyPreviewIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ReplyPreviewOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reply Preview",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/reply-variants": {
      "post": {
        "description": "Drafts more wordings for a fixed reply, in the brand's voice and grounded in the automation's posts, for a person to keep or remove. Saves nothing. Makes a real model call and can spend AI credits.",
        "operationId": "reply_variants_automations_reply_variants_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplyVariantsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ReplyVariantsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reply Variants",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/suspended-runs": {
      "get": {
        "description": "Runs paused at an approval gate in suspend mode, waiting for a decision. Nothing has been created for these yet: the caption in the response is what will be published if the run is approved.",
        "operationId": "list_suspended_runs_automations_suspended_runs_get",
        "parameters": [
          {
            "in": "query",
            "name": "automation_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Automation Id"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_SuspendedRunOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Suspended Runs",
        "tags": [
          "automations"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/automations/suspended-runs/{suspended_run_id}/approve": {
      "post": {
        "description": "Approve a held run. The publish happens on the worker's next sweep, not in this request, so a graph that posts to several platforms cannot hold an HTTP request open while it does.",
        "operationId": "approve_suspended_run_automations_suspended_runs__suspended_run_id__approve_post",
        "parameters": [
          {
            "in": "path",
            "name": "suspended_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Suspended Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_SuspendedRunOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Approve Suspended Run",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/suspended-runs/{suspended_run_id}/decline": {
      "post": {
        "operationId": "decline_suspended_run_automations_suspended_runs__suspended_run_id__decline_post",
        "parameters": [
          {
            "in": "path",
            "name": "suspended_run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Suspended Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_SuspendedRunOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Decline Suspended Run",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/{automation_id}": {
      "get": {
        "operationId": "get_automation_automations__automation_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationDetailOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Automation",
        "tags": [
          "automations"
        ],
        "x-api-key-scope": "read"
      },
      "patch": {
        "operationId": "update_automation_automations__automation_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Automation",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/{automation_id}/archive": {
      "post": {
        "operationId": "archive_automation_automations__automation_id__archive_post",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Archive Automation",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/{automation_id}/graph": {
      "put": {
        "operationId": "put_automation_graph_automations__automation_id__graph_put",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationGraphIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Put Automation Graph",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/{automation_id}/items": {
      "post": {
        "operationId": "add_automation_item_automations__automation_id__items_post",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationItemCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationItemOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Automation Item",
        "tags": [
          "automations"
        ]
      },
      "put": {
        "description": "Replaces the whole queue. Every existing item is deleted, so publish counts, the link from each item to the post it produced, and the publication history all go with them. Kept for compatibility; use the per-item routes to edit a queue without resetting it.",
        "operationId": "replace_automation_items_automations__automation_id__items_put",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationReplaceItemsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationDetailOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Automation Items",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/{automation_id}/items/from-post": {
      "post": {
        "description": "Copies an existing post's caption and media into a new queue item and records which post it came from. The copy is independent: editing the post afterwards does not change the item.",
        "operationId": "add_automation_item_from_post_automations__automation_id__items_from_post_post",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationItemFromPostIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationItemOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Automation Item From Post",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/{automation_id}/items/reorder": {
      "post": {
        "operationId": "reorder_automation_items_automations__automation_id__items_reorder_post",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationReorderItemsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationDetailOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reorder Automation Items",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/{automation_id}/items/{item_id}": {
      "delete": {
        "operationId": "delete_automation_item_automations__automation_id__items__item_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Automation Item",
        "tags": [
          "automations"
        ]
      },
      "patch": {
        "operationId": "update_automation_item_automations__automation_id__items__item_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutomationItemUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationItemOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Automation Item",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/{automation_id}/pause": {
      "post": {
        "operationId": "pause_automation_automations__automation_id__pause_post",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Pause Automation",
        "tags": [
          "automations"
        ],
        "x-api-key-scope": "automation_pause"
      }
    },
    "/automations/{automation_id}/preview": {
      "post": {
        "description": "Runs the stored graph, or an optional unsaved graph, in a rollback sandbox. Nothing is posted or persisted. Feed and AI steps still make real outbound requests and can spend AI tokens.",
        "operationId": "preview_automation_automations__automation_id__preview_post",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/AutomationPreviewIn"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationPreviewOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview Automation",
        "tags": [
          "automations"
        ]
      }
    },
    "/automations/{automation_id}/resume": {
      "post": {
        "operationId": "resume_automation_automations__automation_id__resume_post",
        "parameters": [
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Automation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AutomationOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Resume Automation",
        "tags": [
          "automations"
        ],
        "x-api-key-scope": "automation_pause"
      }
    },
    "/channel-groups": {
      "get": {
        "operationId": "list_groups_channel_groups_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_ChannelGroupOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Groups",
        "tags": [
          "channel-groups"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "operationId": "create_group_channel_groups_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelGroupCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ChannelGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Group",
        "tags": [
          "channel-groups"
        ]
      }
    },
    "/channel-groups/{group_id}": {
      "delete": {
        "operationId": "delete_group_channel_groups__group_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Group",
        "tags": [
          "channel-groups"
        ]
      },
      "get": {
        "operationId": "get_group_channel_groups__group_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ChannelGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Group",
        "tags": [
          "channel-groups"
        ],
        "x-api-key-scope": "read"
      },
      "patch": {
        "operationId": "update_group_channel_groups__group_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelGroupUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ChannelGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Group",
        "tags": [
          "channel-groups"
        ]
      }
    },
    "/channel-groups/{group_id}/channels": {
      "put": {
        "operationId": "set_group_channels_channel_groups__group_id__channels_put",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelGroupSetChannelsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ChannelGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set Group Channels",
        "tags": [
          "channel-groups"
        ]
      }
    },
    "/channels": {
      "get": {
        "operationId": "list_channels_channels_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_ChannelOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Channels",
        "tags": [
          "channels"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/channels/connect": {
      "post": {
        "operationId": "connect_channel_channels_connect_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ConnectResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Connect Channel",
        "tags": [
          "channels"
        ]
      }
    },
    "/channels/connect/app-return": {
      "post": {
        "description": "Answers whether a provider callback state belongs to a pending, unexpired app connection. A yes is given once. It takes only the state: the provider's other callback parameters go to the app, which finalizes the connection.",
        "operationId": "return_to_app_channels_connect_app_return_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelAppReturnRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelAppReturnResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Check a callback state for an app connection",
        "tags": [
          "channels"
        ]
      }
    },
    "/channels/connect/{session_id}/finalize": {
      "post": {
        "operationId": "finalize_connect_channels_connect__session_id__finalize_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinalizeConnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinalizeConnectEnvelope"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Finalize Connect",
        "tags": [
          "channels"
        ]
      }
    },
    "/channels/{channel_id}": {
      "delete": {
        "operationId": "disconnect_channel_channels__channel_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Disconnect Channel",
        "tags": [
          "channels"
        ]
      },
      "get": {
        "operationId": "get_channel_channels__channel_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ChannelOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Channel",
        "tags": [
          "channels"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/channels/{channel_id}/health": {
      "get": {
        "operationId": "channel_health_channels__channel_id__health_get",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ChannelHealthOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Channel Health",
        "tags": [
          "channels"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/channels/{channel_id}/publish-options": {
      "get": {
        "description": "What this channel's settings sheet can choose from, read live from its platform.\n\nYouTube's assignable categories for the channel's region, titled in\n`language` and cached a day per channel and language. A TikTok channel\ngets its creator info, read now and never cached, and whether direct\nposting can be offered. Every other platform answers with both blocks null.",
        "operationId": "publish_options_channels__channel_id__publish_options_get",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "description": "The language category titles are in.",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Locale",
              "default": "en",
              "description": "The language category titles are in."
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PublishOptionsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Publish Options",
        "tags": [
          "channels"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/channels/{channel_id}/remove": {
      "post": {
        "description": "Take a channel off every list, keeping it for history.\n\nThe other half of `DELETE /channels/{id}`, which disconnects and leaves the\nchannel visible with a way back. Removal is not a `DELETE` because nothing is\ndeleted: the row stays so the posts that name it still resolve, which is the\nsame reason disconnecting never deleted it either. An action route, like\n`POST /posts/{id}/publish`.",
        "operationId": "remove_channel_channels__channel_id__remove_post",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Channel",
        "tags": [
          "channels"
        ]
      }
    },
    "/channels/{channel_id}/stats": {
      "get": {
        "operationId": "channel_stats_channels__channel_id__stats_get",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ChannelStatsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Channel Stats",
        "tags": [
          "channels"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/connected-apps": {
      "get": {
        "description": "The apps still connected by signing in, newest first: the caller's own, or with `view=everyone` every member's (admins only).",
        "operationId": "list_connected_apps_connected_apps_get",
        "parameters": [
          {
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConnectedAppsView"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_ConnectedAppOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Connected Apps",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/connected-apps/disconnect-all": {
      "post": {
        "description": "Disconnect every app in the workspace. Admins only.",
        "operationId": "disconnect_all_apps_connected_apps_disconnect_all_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_DisconnectedOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Disconnect All Apps",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/connected-apps/{app_id}/disconnect": {
      "post": {
        "description": "Disconnect an app: its next call is refused. Members disconnect their own apps; admins anyone's.",
        "operationId": "disconnect_app_connected_apps__app_id__disconnect_post",
        "parameters": [
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "App Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Disconnect App",
        "tags": [
          "api-keys"
        ]
      }
    },
    "/consents": {
      "get": {
        "description": "The latest answer per document for the signed-in person, and per category for `analytics_cookies` (the category follows the policy version, such as `2026-11-06:replay`; a bare version is the analytics answer from before categories). Documents they have never answered are absent rather than reported as refused.",
        "operationId": "get_consents_consents_get",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ConsentStatusOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Consents",
        "tags": [
          "consents"
        ]
      },
      "post": {
        "description": "Append one batch of acceptances or withdrawals and return the resulting state. Nothing is replaced: a second answer for a document is a new record, and a withdrawal is a record with `granted` false. The acceptance time, IP address and user agent are taken from this request and cannot be supplied in the body. A cookie banner answer equal to the latest one for the same document and version is not recorded again. Each document has its surfaces (422 `consent_method_not_allowed` otherwise): terms and privacy the gate's (`signup_checkbox`, `reacceptance_prompt`), marketing email `settings_toggle`, analytics `cookie_banner`. Limited per person. Terms and privacy can only be accepted, and only in the current version (422 `consent_version_not_current` otherwise); the sign-up method is accepted for them only within minutes of the account's creation (422 `signup_acceptance_expired`).",
        "operationId": "record_consents_consents_post",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordConsentsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ConsentStatusOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Record Consents",
        "tags": [
          "consents"
        ]
      }
    },
    "/dashboard/summary": {
      "get": {
        "description": "Omit `timezone` to read the day grid in the workspace's own zone.\n\nThat is the zone the goal and the streak always use, so the default keeps\nthe grid and the streak on one calendar; naming a zone moves the grid only.",
        "operationId": "get_summary_dashboard_summary_get",
        "parameters": [
          {
            "in": "query",
            "name": "timezone",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Timezone"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_DashboardSummary_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Summary",
        "tags": [
          "dashboard"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/designs": {
      "get": {
        "operationId": "list_designs_designs_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_DesignOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Designs",
        "tags": [
          "designs"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "operationId": "create_design_designs_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DesignCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_DesignOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Design",
        "tags": [
          "designs"
        ]
      }
    },
    "/designs/{design_id}": {
      "delete": {
        "operationId": "delete_design_designs__design_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "design_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Design Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Design",
        "tags": [
          "designs"
        ]
      },
      "get": {
        "operationId": "get_design_designs__design_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "design_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Design Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_DesignOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Design",
        "tags": [
          "designs"
        ],
        "x-api-key-scope": "read"
      },
      "patch": {
        "operationId": "update_design_designs__design_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "design_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Design Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DesignUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_DesignOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Design",
        "tags": [
          "designs"
        ]
      }
    },
    "/designs/{design_id}/renders": {
      "post": {
        "description": "Ask for a design with a clip in it to be rendered as an MP4.\n\n202, not 201: the row exists but the file does not, and the client polls\n`GET /designs/{id}/renders/{render_id}` until it does. The encode happens in\nthe worker because every connected platform accepts only `video/mp4` and a\nbrowser cannot reliably produce one.\n\nThe design is fetched first so a render can never be queued against another\nworkspace's design; `get_design` is already workspace-scoped and 404s\notherwise.\n\nIts own rate-limit bucket, because 202 is a cheap answer to an expensive\nrequest: nothing here waits for the encode, so a client that loops this\nroute hands the worker an unbounded backlog and every accepted row holds a\nslot for minutes. The budget is per workspace, like every other bucket.",
        "operationId": "create_render_designs__design_id__renders_post",
        "parameters": [
          {
            "in": "path",
            "name": "design_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Design Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DesignRenderCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_DesignRenderOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Render",
        "tags": [
          "designs"
        ]
      }
    },
    "/designs/{design_id}/renders/{render_id}": {
      "get": {
        "operationId": "get_render_designs__design_id__renders__render_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "design_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Design Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "render_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Render Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_DesignRenderOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Render",
        "tags": [
          "designs"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/designs/{design_id}/variation-sets": {
      "get": {
        "description": "Every variation set built from this design, newest first.",
        "operationId": "list_variation_sets_designs__design_id__variation_sets_get",
        "parameters": [
          {
            "in": "path",
            "name": "design_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Design Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_VariationSetOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Variation Sets",
        "tags": [
          "designs"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "description": "Build a set of video variations from one design. Each variant is created as its own design and rendered separately, so the finished videos are separate gallery assets. Nothing is queued by this call: the worker feeds variants into the render queue at a rate the workspace can absorb, and progress is read from GET /designs/{design_id}/variation-sets/{set_id}.",
        "operationId": "create_variation_set_designs__design_id__variation_sets_post",
        "parameters": [
          {
            "in": "path",
            "name": "design_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Design Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VariationSetCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_VariationSetOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Variation Set",
        "tags": [
          "designs"
        ]
      }
    },
    "/designs/{design_id}/variation-sets/{set_id}": {
      "get": {
        "description": "How a variation set is going: which variants are waiting, running, done, or failed, and why. Poll this until finished is true.",
        "operationId": "get_variation_set_designs__design_id__variation_sets__set_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "design_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Design Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Set Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_VariationSetOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Variation Set",
        "tags": [
          "designs"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/designs/{design_id}/variation-sets/{set_id}/retry": {
      "post": {
        "description": "Put every failed variant in a set back in the queue. Variants that succeeded are left alone: re-rendering one would replace a file that may already be attached to a post.",
        "operationId": "retry_variation_set_designs__design_id__variation_sets__set_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "design_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Design Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "set_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Set Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_VariationSetOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Retry Variation Set",
        "tags": [
          "designs"
        ]
      }
    },
    "/email/unsubscribe": {
      "get": {
        "description": "Which notification email an unsubscribe link switches off, and whether it is on. Changes nothing.",
        "operationId": "describe_unsubscribe_email_unsubscribe_get",
        "parameters": [
          {
            "description": "The token from the email's link.",
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "description": "The token from the email's link.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_UnsubscribeOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Describe Unsubscribe",
        "tags": [
          "email"
        ]
      },
      "post": {
        "description": "Switch off the notification email an unsubscribe link names. Idempotent, and the target of the one-click `List-Unsubscribe-Post` header every notification email carries.",
        "operationId": "unsubscribe_email_unsubscribe_post",
        "parameters": [
          {
            "description": "The token from the email's link.",
            "in": "query",
            "name": "token",
            "required": true,
            "schema": {
              "description": "The token from the email's link.",
              "maxLength": 256,
              "minLength": 1,
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_UnsubscribeOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Unsubscribe",
        "tags": [
          "email"
        ]
      }
    },
    "/health": {
      "get": {
        "description": "Proves the process itself is up. Opens no DB session, no gateway call.",
        "operationId": "liveness_health_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Liveness Health Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Liveness",
        "tags": [
          "health"
        ]
      }
    },
    "/health/": {
      "get": {
        "description": "Proves the process itself is up. Opens no DB session, no gateway call.",
        "operationId": "liveness_health__get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Liveness Health  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Liveness",
        "tags": [
          "health"
        ]
      }
    },
    "/health/db": {
      "get": {
        "description": "`SELECT 1` through the injected session. Never leaks the DSN/exception.",
        "operationId": "database_health_health_db_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Database Health Health Db Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Database Health",
        "tags": [
          "health"
        ]
      }
    },
    "/health/integrations": {
      "get": {
        "description": "Operator-only: can automations read from Notion, Slack, or Google Drive.\n\nThis answers a configuration question, not a reachability one, and the\ndifference is deliberate. Publedia holds no credential of its own for these\nsystems: every token is per workspace and encrypted at rest, so a probe that\nproved a remote server was up would first have to decrypt a customer's\ncredential and spend their rate limit. `services/integration_health` records\nthe full reasoning.\n\nWhat it does report is the configuration that decides whether the feature can\nwork at all: whether the token-encryption key is loadable, which key versions\nthis process holds, and whether any stored row was written under a version\nthat has since been dropped from the keyring. That last one is the failure\nworth having a route for, because a rotation that retires a key too early\nleaves rows that are silently unreadable until somebody runs an automation.\n\nReports no workspace data. The only query reads `token_key_version` across\nevery row and returns a set of integers, so there is no tenant identity in\nthe response to leak.",
        "operationId": "integrations_health_health_integrations_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-Health-Token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Health-Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Integrations Health Health Integrations Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Integrations Health",
        "tags": [
          "health"
        ]
      }
    },
    "/health/media": {
      "get": {
        "description": "Operator-only: why the status page says what it says about Media.\n\n`/health/summary` publishes a component id and a coarse level, and nothing\nelse, which is what makes it safe without a token. The cost is that a red\n\"Media: Down\" carries no reason at all, and the reason is the whole of what an\noperator needs: a missing bucket, a revoked S3 access key and a wrong\n`STORAGE_S3_REGION` all classify identically and need different fixes. The\nworker's probe already writes that detail into the snapshot row. Until this\nroute existed nothing read it back, so the detail was written and discarded.\n\nTwo views, matching `/health/publishing`:\n\n- `backend`/`detail` describe what *this API process* built, answering the\n  first question worth asking, which is whether it is configured at all. A\n  hardened deployment reporting `null` here has found its problem.\n- `snapshot` is the durable reading the worker's `health.dependency_probe`\n  task last wrote, and is `null` before its first run.\n\nThe two can legitimately disagree, and that is a diagnosis rather than a bug:\nthe probe runs in the worker, so an API that is configured while the snapshot\nsays misconfigured means the two processes were given different environments.\n\nReports no credential. Not the endpoint URL either -- it embeds the Supabase\nproject ref, and the backend kind answers the question without it. Reads no\nworkspace-scoped table: the only query is the single `HealthSnapshot` row for\nthis target.\n\nAlways 200, for the reason `/health/publishing` records: a non-2xx would page\nwhoever owns the API about a diagnostic that worked correctly.",
        "operationId": "media_health_health_media_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-Health-Token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Health-Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Media Health Health Media Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Media Health",
        "tags": [
          "health"
        ]
      }
    },
    "/health/publishing": {
      "get": {
        "description": "Operator-only: configured gateway + cached gateway health classification.\n\nNamed for the capability, not the implementation: it answers \"can this\ndeployment publish\", which stays the question if a second gateway is added\nor the gateway is replaced. `.docs/conventions/domain-glossary.md` records why\nthe thing being probed is a gateway rather than an adapter or a provider.\n\nNever reports secrets, tokens, or account ids -- only the gateway kind and\na health classification/latency/detail string.\n\nIncludes two views of gateway health: `gateway_status`/`latency_ms`/\n`checked_at`/`detail` (this process's own short-TTL cache, via\n`get_gateway_health`) and `snapshot` (the durable classification the\nworker's periodic `health.dependency_probe` job last wrote,\nvia `get_cached_gateway_snapshot` -- `null` if that job hasn't run yet\nfor this gateway). Neither ever mutates or reads any `ConnectedChannel`\nrow.",
        "operationId": "publishing_health_health_publishing_get",
        "parameters": [
          {
            "in": "header",
            "name": "X-Health-Token",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Health-Token"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Publishing Health Health Publishing Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Publishing Health",
        "tags": [
          "health"
        ]
      }
    },
    "/health/summary": {
      "get": {
        "description": "Public component-level status, for the `/status` page. No token.\n\nUnauthenticated on purpose: the page exists to be readable when nothing else\nabout Publedia is, which rules out anything a signed-out visitor cannot\npresent. What makes that safe is the payload, not the caller -- it carries\nfour component names and four coarse levels, and nothing else. No latency, no\ngateway detail string, no gateway identity, no workspace data. The operator\nviews that do report those stay behind `X-Health-Token`.\n\nAlways 200, including when a component is down. The route describes an\noutage; it is not having one. A non-2xx here would page whoever monitors this\nendpoint about the status page rather than about the thing it reports on,\nwhich is the same reasoning `/health/publishing` records.",
        "operationId": "status_summary_health_summary_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Status Summary Health Summary Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Status Summary",
        "tags": [
          "health"
        ]
      }
    },
    "/inbox/auto-answer-suggestion": {
      "get": {
        "operationId": "auto_answer_suggestion_inbox_auto_answer_suggestion_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Union_AutoAnswerSuggestionOut__NoneType__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Auto Answer Suggestion",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/inbox/comments": {
      "get": {
        "description": "One page of top-level comments with single-level nested replies, latest activity first.\n\nA thread's activity is its newest comment, so one answered again sorts above\none that has been quiet since it was posted. A new reply from somebody other\nthan the workspace reopens a handled thread.",
        "operationId": "list_comments_inbox_comments_get",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/InboxCommentStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Platform"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            }
          },
          {
            "in": "query",
            "name": "channel_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Channel Id"
            }
          },
          {
            "in": "query",
            "name": "post_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Post Id"
            }
          },
          {
            "description": "True for only the threads with an open comment an inbox rule flagged, the top-level comment or a reply under it; false for the rest.",
            "in": "query",
            "name": "flagged",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "True for only the threads with an open comment an inbox rule flagged, the top-level comment or a reply under it; false for the rest.",
              "title": "Flagged"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Page_InboxCommentOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Comments",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/inbox/comments/{comment_id}/hide": {
      "post": {
        "description": "Hide one comment on the remote platform.",
        "operationId": "hide_comment_inbox_comments__comment_id__hide_post",
        "parameters": [
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Comment Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_InboxCommentOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Hide Comment",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "inbox_reply"
      }
    },
    "/inbox/comments/{comment_id}/reply": {
      "post": {
        "description": "Send a public reply or direct message in answer to one comment.",
        "operationId": "reply_to_comment_inbox_comments__comment_id__reply_post",
        "parameters": [
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Comment Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentReplyIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_InboxCommentOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reply To Comment",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "inbox_reply"
      }
    },
    "/inbox/comments/{comment_id}/status": {
      "post": {
        "description": "Mark a comment handled or reopen it for triage.",
        "operationId": "update_comment_status_inbox_comments__comment_id__status_post",
        "parameters": [
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Comment Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommentStatusUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_InboxCommentOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Comment Status",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "inbox_reply"
      }
    },
    "/inbox/comments/{comment_id}/suggested-reply": {
      "post": {
        "description": "Drafts a reply to one comment in the brand's voice, for a person to edit before sending. Sends nothing. Makes a real model call and can spend AI credits.",
        "operationId": "suggest_reply_inbox_comments__comment_id__suggested_reply_post",
        "parameters": [
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Comment Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_SuggestedReplyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Suggest Reply",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "inbox_reply"
      }
    },
    "/inbox/comments/{comment_id}/unhide": {
      "post": {
        "description": "Unhide one previously hidden comment on the remote platform.",
        "operationId": "unhide_comment_inbox_comments__comment_id__unhide_post",
        "parameters": [
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Comment Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_InboxCommentOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Unhide Comment",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "inbox_reply"
      }
    },
    "/inbox/conversations": {
      "get": {
        "description": "One page of direct message conversations, newest message first.\n\nA conversation is open while any message from the contact is open, and a\nnew one from them reopens it. Not available to API keys.",
        "operationId": "list_conversations_inbox_conversations_get",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/InboxCommentStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Platform"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Platform"
            }
          },
          {
            "in": "query",
            "name": "channel_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Channel Id"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Page_InboxConversationOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Conversations",
        "tags": [
          "inbox"
        ]
      }
    },
    "/inbox/conversations/{conversation_id}/messages": {
      "get": {
        "description": "One conversation's messages, oldest first. Not available to API keys.",
        "operationId": "list_conversation_messages_inbox_conversations__conversation_id__messages_get",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_InboxMessageOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Conversation Messages",
        "tags": [
          "inbox"
        ]
      }
    },
    "/inbox/conversations/{conversation_id}/reply": {
      "post": {
        "description": "Send a direct message to the contact, within 24 hours of their last message.\n\nRefused with `reply_window_closed` after that, and with\n`channel_cannot_message` when the channel cannot send direct messages.\nNot available to API keys.",
        "operationId": "reply_to_conversation_inbox_conversations__conversation_id__reply_post",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationReplyIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ConversationReplyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reply To Conversation",
        "tags": [
          "inbox"
        ]
      }
    },
    "/inbox/conversations/{conversation_id}/status": {
      "post": {
        "description": "Mark a conversation handled, or open it again. Not available to API keys.",
        "operationId": "update_conversation_status_inbox_conversations__conversation_id__status_post",
        "parameters": [
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Conversation Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationStatusIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_InboxConversationOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Conversation Status",
        "tags": [
          "inbox"
        ]
      }
    },
    "/inbox/saved-replies": {
      "get": {
        "description": "Every saved reply in this workspace, by name. Placeholders such as {username} are returned as typed; the reply box fills them in.",
        "operationId": "list_saved_replies_inbox_saved_replies_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_SavedReplyOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Saved Replies",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "description": "Save a reply for reuse. Names are unique per workspace, case-insensitively. Saving sends nothing.",
        "operationId": "create_saved_reply_inbox_saved_replies_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedReplyCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_SavedReplyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Saved Reply",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "inbox_reply"
      }
    },
    "/inbox/saved-replies/{saved_reply_id}": {
      "delete": {
        "description": "Delete a saved reply. Replies already sent with it are not affected.",
        "operationId": "delete_saved_reply_inbox_saved_replies__saved_reply_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "saved_reply_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Saved Reply Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Saved Reply",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "inbox_reply"
      },
      "patch": {
        "description": "Rename or rewrite a saved reply. Partial: an omitted field keeps its value.",
        "operationId": "update_saved_reply_inbox_saved_replies__saved_reply_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "saved_reply_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Saved Reply Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedReplyUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_SavedReplyOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Saved Reply",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "inbox_reply"
      }
    },
    "/inbox/summary": {
      "get": {
        "description": "Open top-level comments and open conversations, for the workspace and per channel.\n\nTop-level only, the same rows `list_comments` pages through: replies are\nstored open too, and counting them made the Open badge say five where the\nOpen list showed three. `total_open` stays comments alone; conversations\nare counted beside it in `conversations_open`.",
        "operationId": "get_summary_inbox_summary_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_InboxSummaryOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Summary",
        "tags": [
          "inbox"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/integrations/lundot": {
      "delete": {
        "description": "Stop every call to Lundot at once, then revoke the connection at Lundot. When Lundot does not confirm, the status is `disconnect_pending` and the revocation is retried; it is never reported as done early. Markers already sent stay in Lundot as history. Requires integration_manage.",
        "operationId": "disconnect_lundot_integrations_lundot_delete",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_LundotConnectionOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Disconnect Lundot",
        "tags": [
          "integrations"
        ]
      },
      "get": {
        "description": "This workspace's Lundot connection: its status, the Lundot workspace it reaches, the granted scopes and each site with its sign-up goal and tagging switch. No token is returned by any route.",
        "operationId": "get_lundot_integrations_lundot_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_LundotConnectionOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Lundot",
        "tags": [
          "integrations"
        ],
        "x-api-key-scope": "read"
      },
      "patch": {
        "description": "Set the sign-up goal and the tagging switch of connected sites. Requires integration_manage.",
        "operationId": "update_lundot_integrations_lundot_patch",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LundotConnectionPatchIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_LundotConnectionOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Lundot",
        "tags": [
          "integrations"
        ]
      }
    },
    "/integrations/lundot/callback": {
      "get": {
        "description": "Where Lundot returns the browser. The state is checked against the person and workspace that started, the code is exchanged here and the tokens are stored encrypted; the browser is then sent to the settings page with `lundot=connected`, or with the reason it did not connect.",
        "operationId": "lundot_callback_integrations_lundot_callback_get",
        "parameters": [
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "in": "query",
            "name": "error",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error"
            }
          },
          {
            "in": "query",
            "name": "error_description",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error Description"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Back to the settings page"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Lundot Callback",
        "tags": [
          "integrations"
        ]
      }
    },
    "/integrations/lundot/connect": {
      "post": {
        "description": "Start connecting Lundot. The state and the PKCE verifier are kept on the server for ten minutes, tied to the caller and this workspace; the answer is only the address to send the browser to. Requires integration_manage, and a signed-in person: an API key cannot connect.",
        "operationId": "connect_lundot_integrations_lundot_connect_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LundotConnectIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_LundotConnectOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Connect Lundot",
        "tags": [
          "integrations"
        ]
      }
    },
    "/me": {
      "get": {
        "operationId": "get_me_me_get",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_MeOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Me",
        "tags": [
          "account"
        ]
      }
    },
    "/media": {
      "get": {
        "operationId": "list_media_media_get",
        "parameters": [
          {
            "in": "query",
            "name": "album_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Album Id"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_MediaAssetOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Media",
        "tags": [
          "media"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/media/confirm": {
      "post": {
        "description": "Finish an upload: checks the stored file and adds it to the media library.",
        "operationId": "confirm_media_media_confirm_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaConfirmRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_MediaAssetOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Confirm Media",
        "tags": [
          "media"
        ],
        "x-api-key-scope": "media_upload"
      }
    },
    "/media/upload-intent": {
      "post": {
        "description": "Start an upload: returns the object key and the URL to send the file to by PUT.",
        "operationId": "create_upload_intent_media_upload_intent_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadIntentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_UploadIntentResponse_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Upload Intent",
        "tags": [
          "media"
        ],
        "x-api-key-scope": "media_upload"
      }
    },
    "/media/{media_id}": {
      "delete": {
        "description": "Remove a gallery item, and then the file behind it.\n\nIn that order, and the order is the point: the service only flushes the row\ndeletion, this commits it, and the bytes go afterwards. Deleting the object\nfirst meant a commit that failed left the asset restored and its file gone,\nwhich nothing can undo. The same rule the replace route follows.",
        "operationId": "delete_media_media__media_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "media_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Media Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Media",
        "tags": [
          "media"
        ]
      }
    },
    "/media/{media_id}/file": {
      "put": {
        "description": "Swap the file behind a design's export, keeping its id.\n\nThe image editor's re-export path, and only that: the asset has to be the\ncurrent export of a design in this workspace. A design maps to one gallery\nitem, and the id has to survive the swap because a post's media is a list of\nasset ids: minting a new asset and deleting the old one would break any post\nalready scheduled with the previous export.\n\nAn omitted dimension is left as it was rather than nulled, so a caller that\nhas nothing to say about `duration_seconds` does not erase it. Sending an\nexplicit `null` still clears the field.\n\nThe id surviving is half the story: a post stores the `object_key` it was\ncomposed with, so the service also carries the references of every post still\nto publish over to the new key, in the same transaction as the swap.",
        "operationId": "replace_media_file_media__media_id__file_put",
        "parameters": [
          {
            "in": "path",
            "name": "media_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Media Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaReplaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_MediaAssetOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Media File",
        "tags": [
          "media"
        ]
      }
    },
    "/notifications": {
      "get": {
        "description": "What this workspace has to hear about: failed posts, channels that stopped authenticating, runs waiting for approval, and the past week of posts published and members joined. Filtered by the caller's own in-app notification settings. Nothing is stored, so nothing is marked read; every item is true at `generated_at`.",
        "operationId": "get_notifications_notifications_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_NotificationFeed_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Notifications",
        "tags": [
          "notifications"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/oauth/bluesky/client-metadata.json": {
      "get": {
        "description": "AT Protocol OAuth 2.0 client metadata document.\n\nPer AT Protocol spec, this document describes the client's capabilities\nand the URLs it uses. The document's own URL serves as the client_id.\n\nThe client is confidential (uses private_key_jwt) and DPoP-bound, per RFC 9449.\n\nThe document itself is built by the Bluesky client's `clientMetadata`,\nwhich the Bluesky gateway hands to the SDK unchanged. Both readers have to\nagree on it, so neither of them owns a copy; see that module for why each\nfield reads the way it does.",
        "operationId": "get_bluesky_client_metadata_oauth_bluesky_client_metadata_json_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Bluesky Client Metadata",
        "tags": [
          "oauth"
        ]
      }
    },
    "/oauth/bluesky/jwks.json": {
      "get": {
        "description": "JSON Web Key Set for AT Protocol OAuth client assertions and DPoP proofs.\n\nServes the public key used to sign client assertions and validate DPoP proofs.\nThe authorization server uses this to verify the client's signatures without\nprior registration of a client secret.\n\nIf the deployment's Bluesky client private key is not configured, returns an\nempty key set rather than raising, so an unconfigured deployment degrades\ngracefully (no Bluesky connections available, but the service stays up).",
        "operationId": "get_bluesky_jwks_oauth_bluesky_jwks_json_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Get Bluesky Jwks",
        "tags": [
          "oauth"
        ]
      }
    },
    "/posting-schedules": {
      "get": {
        "description": "Every channel in this workspace that has posting times, with the week it posts on and the next instant that week produces. A channel with no posting times is absent: no row is how 'this channel has no queue' is spelled.",
        "operationId": "list_posting_schedules_posting_schedules_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_PostingScheduleOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Posting Schedules",
        "tags": [
          "queue"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/posting-schedules/{channel_id}": {
      "delete": {
        "description": "Remove a channel's posting times, so it has no queue. Idempotent: deleting times a channel does not have is not an error. Posts already scheduled keep their instants.",
        "operationId": "delete_posting_schedule_posting_schedules__channel_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Posting Schedule",
        "tags": [
          "queue"
        ],
        "x-api-key-scope": "post_schedule"
      },
      "get": {
        "description": "One channel's posting times, or null when it has none. Null rather than a 404, because a channel with no queue is a normal state the editor has to render.",
        "operationId": "get_posting_schedule_posting_schedules__channel_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Union_PostingScheduleOut__NoneType__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Posting Schedule",
        "tags": [
          "queue"
        ],
        "x-api-key-scope": "read"
      },
      "put": {
        "description": "Replace a channel's posting times. The whole week, upserted on the channel: there is no per-slot endpoint because there is no per-slot row. Changing the week does not move posts that are already scheduled.",
        "operationId": "replace_posting_schedule_posting_schedules__channel_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostingScheduleIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostingScheduleOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Posting Schedule",
        "tags": [
          "queue"
        ],
        "x-api-key-scope": "post_schedule"
      }
    },
    "/posting-schedules/{channel_id}/slots": {
      "get": {
        "description": "The next slots this channel's week produces, each marked free or carrying the post that occupies it. Occupancy is why this is a server read rather than a client projection: the client can compute the instants and cannot know which are taken.",
        "operationId": "list_upcoming_slots_posting_schedules__channel_id__slots_get",
        "parameters": [
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "count",
            "required": false,
            "schema": {
              "default": 10,
              "maximum": 50,
              "minimum": 1,
              "title": "Count",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_QueueSlotOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Upcoming Slots",
        "tags": [
          "queue"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/posts": {
      "get": {
        "description": "One page of post groups, newest first unless `sort` says otherwise. `status` may be repeated and matches a group whose derived status is any of the given ones. `tag_id` may be repeated and matches a group carrying any of the given tags; it narrows the server query, so the page and the total both count only matching groups. `scheduled_from` is inclusive and `scheduled_to` is exclusive, and a group matches when any of its posts falls in the window, so two adjacent periods never both claim the same post. Posts with no `scheduled_at` are in no window. `object_key` narrows to groups with a post composed around that file. `channel_id` may be repeated and matches a group with a post going to any of the given channels; the group keeps all of its posts. `has_failed_post` narrows to groups with a post that failed on any channel, whatever the group's own status. `search` matches a group title or a caption on any of its posts that contains the text, ignoring case. `include_ideas` adds ideas, groups with no channel yet, which read as drafts, match `search`, `tag_id` and `object_key`, sort by their last edit, and never match a channel or a time window. `sort` is `newest` (the default) or `oldest` by the date its row shows (published, else due, else last edited, from the group's first post), or `soonest`: groups still going out first, by their earliest scheduled channel, then the rest newest first.",
        "operationId": "list_posts_posts_get",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "$ref": "#/components/schemas/PostGroupStatus"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "tag_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag Id"
            }
          },
          {
            "in": "query",
            "name": "channel_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "format": "uuid",
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Channel Id"
            }
          },
          {
            "in": "query",
            "name": "scheduled_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Scheduled From"
            }
          },
          {
            "in": "query",
            "name": "scheduled_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Scheduled To"
            }
          },
          {
            "in": "query",
            "name": "object_key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Object Key"
            }
          },
          {
            "in": "query",
            "name": "has_failed_post",
            "required": false,
            "schema": {
              "default": false,
              "title": "Has Failed Post",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "include_ideas",
            "required": false,
            "schema": {
              "default": false,
              "title": "Include Ideas",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PostListSort",
              "default": "newest"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 200,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Page_PostGroupOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Posts",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "operationId": "create_post_posts_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/posts/groups/{group_id}": {
      "delete": {
        "description": "Delete an idea with its tags. A group with channels answers 409 `group_has_channels`: cancel its posts instead.",
        "operationId": "delete_idea_posts_groups__group_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Idea",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_draft"
      },
      "get": {
        "description": "One post group: an idea with its caption and files, or a post with its channels.",
        "operationId": "get_group_posts_groups__group_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Group",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "read"
      },
      "patch": {
        "description": "Edit an idea's title, caption or files. An idea keeps some text or a file. A group with channels answers 409 `group_has_channels`: edit its posts instead.",
        "operationId": "update_idea_posts_groups__group_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostGroupUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Idea",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/posts/groups/{group_id}/channels": {
      "post": {
        "operationId": "add_group_channel_posts_groups__group_id__channels_post",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostGroupAddChannelIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Add Group Channel",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/posts/groups/{group_id}/channels/{channel_id}": {
      "delete": {
        "description": "Take one channel's post out of the group. Removing the last channel of a plain draft (a caption and files, nothing only a channel can hold) turns the group back into an idea that keeps that text and those files. Any other post still answers 409 `last_channel_in_group`: cancel it instead.",
        "operationId": "remove_group_channel_posts_groups__group_id__channels__channel_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Channel Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Group Channel",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/posts/tags": {
      "post": {
        "description": "Add and remove tags across a selection of posts in one request. Refused whole if any group or tag is not in this workspace, so a bulk call cannot half-succeed. Adding a tag a post already has is a no-op. The response is every affected group, so the client writes them all into its caches in one pass.",
        "operationId": "apply_post_tags_posts_tags_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostTagsApplyIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_PostGroupOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Apply Post Tags",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/posts/{post_id}": {
      "get": {
        "description": "One post, its group, its events, and its evergreen provenance: which category published it, and which categories are recycling it.",
        "operationId": "get_post_posts__post_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostDetailOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "read"
      },
      "patch": {
        "operationId": "update_post_posts__post_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/posts/{post_id}/cancel": {
      "post": {
        "operationId": "cancel_post_posts__post_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PostActionScope",
              "default": "group"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cancel Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_cancel"
      }
    },
    "/posts/{post_id}/duplicate": {
      "post": {
        "description": "Copy the whole post, every channel it went to, into new drafts with no time. Channels removed since are left out; refused with 409 `channel_not_found` when that leaves none.",
        "operationId": "duplicate_post_posts__post_id__duplicate_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Duplicate Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/posts/{post_id}/mark-posted": {
      "post": {
        "description": "Record that the owner posted a failed X post themselves: it becomes published with `delivery_mode` manual and is never sent. On a post recorded without a link, a `permalink` adds it. 409 `post_claimed` while it is being sent, 409 `not_postable_by_hand`, 422 `invalid_permalink`.",
        "operationId": "mark_posted_posts__post_id__mark_posted_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkPostedIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Mark Posted",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_retry"
      }
    },
    "/posts/{post_id}/post-by-hand": {
      "post": {
        "description": "Stop a failed X post's automatic retry so its owner can post it on X without it going out twice. The post stays failed. 409 `post_claimed` while it is being sent, 409 `not_postable_by_hand` when it may not be posted by hand.",
        "operationId": "hold_for_hand_posts__post_id__post_by_hand_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Take Post Off Retry",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_retry"
      }
    },
    "/posts/{post_id}/publish": {
      "post": {
        "description": "Publish each post in scope now. With `hold_seconds`, the posts are due that many seconds from now instead, so the request can be taken back with `/unschedule` until a worker claims them; they go out on time whether or not the caller is still there.",
        "operationId": "publish_post_posts__post_id__publish_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PostActionScope",
              "default": "group"
            }
          },
          {
            "in": "query",
            "name": "hold_seconds",
            "required": false,
            "schema": {
              "default": 0,
              "maximum": 60,
              "minimum": 0,
              "title": "Hold Seconds",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Publish Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_publish"
      }
    },
    "/posts/{post_id}/queue": {
      "post": {
        "description": "Put each draft in scope on the queue. With no body, or no `slot_at`, a queued post has a status and no `scheduled_at`, so nothing will publish it until it is scheduled or published by hand. With `slot_at`, that slot of the channels' posting times is booked and the post is scheduled for it, or refused with 409 `queue_slot_taken` or `queue_slot_invalid`. Draft only, like `/schedule`.",
        "operationId": "queue_post_posts__post_id__queue_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PostActionScope",
              "default": "group"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/QueueIn"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Queue Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_schedule"
      }
    },
    "/posts/{post_id}/reschedule": {
      "post": {
        "operationId": "reschedule_post_posts__post_id__reschedule_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PostActionScope",
              "default": "group"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RescheduleIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Reschedule Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_schedule"
      }
    },
    "/posts/{post_id}/retry": {
      "post": {
        "operationId": "retry_post_posts__post_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PostActionScope",
              "default": "group"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostRetryOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Retry Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_retry"
      }
    },
    "/posts/{post_id}/schedule": {
      "post": {
        "operationId": "schedule_post_posts__post_id__schedule_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PostActionScope",
              "default": "group"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Schedule Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_schedule"
      }
    },
    "/posts/{post_id}/unschedule": {
      "post": {
        "description": "Put each scheduled or queued post in scope back to draft, with no time. Refused with 409 `post_claimed` once a worker has claimed any of them. Unmetered, like `/cancel`: it gives quota back rather than spending it.",
        "operationId": "unschedule_post_posts__post_id__unschedule_post",
        "parameters": [
          {
            "in": "path",
            "name": "post_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Post Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PostActionScope",
              "default": "group"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PostGroupOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Unschedule Post",
        "tags": [
          "posts"
        ],
        "x-api-key-scope": "post_schedule"
      }
    },
    "/public/streak-shares/{token}": {
      "get": {
        "description": "The streak behind a public link: the weekly goal, the current and best streak, and the recent weeks' results. No sign-in; never names a post.",
        "operationId": "read_public_streak_public_streak_shares__token__get",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "maxLength": 64,
              "minLength": 8,
              "pattern": "^[A-Za-z0-9_-]+$",
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PublicStreakOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Read Public Streak",
        "tags": [
          "streak-shares"
        ]
      }
    },
    "/push/devices": {
      "post": {
        "description": "Store this phone's push token for the caller, bound to the current sign-in session, or refresh it. Pushes stop when that session ends. Send it at every sign-in and app start: a token already held by another account moves to the caller, since a phone belongs to whoever signed in on it last. Works while push is off on the server, so turning it on later reaches the phones already registered.",
        "operationId": "register_push_device_push_devices_post",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PushDeviceIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PushDeviceOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Register Push Device",
        "tags": [
          "push"
        ]
      }
    },
    "/push/devices/{token}": {
      "delete": {
        "description": "Stop pushing to this phone, at sign-out. A token the caller does not hold, or one already removed, is not an error.",
        "operationId": "remove_push_device_push_devices__token__delete",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "maxLength": 400,
              "title": "Token",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Push Device",
        "tags": [
          "push"
        ]
      }
    },
    "/referral-codes/{code}": {
      "get": {
        "description": "Who a referral link belongs to, by first name, and what signing up through it gives. Public. An unknown code is a 404.",
        "operationId": "preview_referral_code_referral_codes__code__get",
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "title": "Code",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_ReferralInviteOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Preview Referral Code",
        "tags": [
          "referrals"
        ]
      }
    },
    "/referral-codes/{code}/opens": {
      "post": {
        "description": "Count one browser opening a referral link. Public. Counted once per visitor a day; the count is shown to the referrer and earns nothing.",
        "operationId": "record_referral_open_referral_codes__code__opens_post",
        "parameters": [
          {
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "title": "Code",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Record Referral Open",
        "tags": [
          "referrals"
        ]
      }
    },
    "/repurpose/clips/{clip_id}": {
      "patch": {
        "description": "Move the in and out points, rewrite the hook, accept or reject.\n\nAll four in one request because the review gesture is usually more than one\nof them at once, and two round trips is two chances for the boundary and the\ndecision to disagree about which clip was approved.",
        "operationId": "update_clip_repurpose_clips__clip_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "clip_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Clip Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepurposeClipUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_RepurposeClipOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Clip",
        "tags": [
          "repurpose"
        ]
      }
    },
    "/repurpose/jobs": {
      "get": {
        "description": "This workspace's repurpose jobs, newest first, one page at a time.",
        "operationId": "list_jobs_repurpose_jobs_get",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 20,
              "maximum": 100,
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Page_RepurposeJobOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Jobs",
        "tags": [
          "repurpose"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "description": "Ask for a long video to be turned into candidate clips.\n\n202, not 201: the row exists but the transcript does not, and the client\npolls the job until it is waiting for review.\n\nIts own rate-limit bucket, because 202 is a cheap answer to a very expensive\nrequest: nothing here waits, and one accepted job is an hour of audio, a\ncouple of dozen model calls on the workspace's own token budget, and a\nworker slot held for the duration.",
        "operationId": "create_job_repurpose_jobs_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RepurposeJobCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_RepurposeJobOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Job",
        "tags": [
          "repurpose"
        ]
      }
    },
    "/repurpose/jobs/{job_id}": {
      "delete": {
        "description": "Forget the job. Clips already cut stay in the gallery.\n\nAlso how a video is freed to be repurposed a second time, since only one\nopen job per video is allowed.",
        "operationId": "delete_job_repurpose_jobs__job_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Job",
        "tags": [
          "repurpose"
        ]
      },
      "get": {
        "operationId": "get_job_repurpose_jobs__job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_RepurposeJobDetailOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Job",
        "tags": [
          "repurpose"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/repurpose/jobs/{job_id}/cut": {
      "post": {
        "description": "Cut the clips that were accepted, and only those.\n\nRefused with a 400 when nothing has been accepted. Cutting the candidates\nnobody looked at would make the review step optional, and an automatic\nclipper with no review is the failure this design exists to avoid.",
        "operationId": "cut_accepted_repurpose_jobs__job_id__cut_post",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_RepurposeJobOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cut Accepted",
        "tags": [
          "repurpose"
        ]
      }
    },
    "/repurpose/jobs/{job_id}/retry": {
      "post": {
        "description": "Try the step that failed again, keeping the steps that worked.\n\nThe stage does not move: a transcript that stopped at its ninth window\ncarries on at the ninth, and a suggestion that failed does not re-transcribe\nthe video first.",
        "operationId": "retry_job_repurpose_jobs__job_id__retry_post",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_RepurposeJobOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Retry Job",
        "tags": [
          "repurpose"
        ]
      }
    },
    "/streak-share": {
      "delete": {
        "description": "Stop your public streak link working. Anyone opening it gets a 404, and the card image stops being served within a minute. Platforms that already fetched the image for a post may keep their copy.",
        "operationId": "revoke_streak_share_streak_share_delete",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke Streak Share",
        "tags": [
          "streak-shares"
        ]
      },
      "get": {
        "description": "Your public streak link in this workspace, or null when you have none.",
        "operationId": "get_streak_share_streak_share_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_Union_StreakShareOut__NoneType__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Streak Share",
        "tags": [
          "streak-shares"
        ]
      },
      "put": {
        "description": "Create your public streak link, or change the name it shows. The token stays the same across changes; revoke and share again for a new one.",
        "operationId": "save_streak_share_streak_share_put",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StreakShareIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_StreakShareOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Save Streak Share",
        "tags": [
          "streak-shares"
        ]
      }
    },
    "/tags": {
      "get": {
        "description": "Every tag in this workspace, by name, with how many posts carry each. Tags are the product's one grouping primitive for content: a campaign is a tag, and its date span is derived from the posts carrying it.",
        "operationId": "list_tags_tags_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_TagOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Tags",
        "tags": [
          "tags"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "description": "Create a tag. Names are unique per workspace, case-insensitively, and are stored with the case that was typed.",
        "operationId": "create_tag_tags_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_TagOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Tag",
        "tags": [
          "tags"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/tags/{tag_id}": {
      "delete": {
        "description": "Delete a tag. It is removed from every post carrying it; the posts themselves are not deleted.",
        "operationId": "delete_tag_tags__tag_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "tag_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tag Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Tag",
        "tags": [
          "tags"
        ],
        "x-api-key-scope": "post_draft"
      },
      "patch": {
        "description": "Rename or recolour a tag. Partial: an omitted field keeps its value. The posts carrying it are untouched.",
        "operationId": "update_tag_tags__tag_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "tag_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tag Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_TagOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Tag",
        "tags": [
          "tags"
        ],
        "x-api-key-scope": "post_draft"
      }
    },
    "/webhook-endpoints": {
      "get": {
        "description": "Every webhook in this workspace, newest first. Secrets are never returned.",
        "operationId": "list_webhook_endpoints_webhook_endpoints_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_WebhookEndpointOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Webhook Endpoints",
        "tags": [
          "webhook-endpoints"
        ]
      },
      "post": {
        "description": "Register a webhook. The signing secret is in this response and in no later one. The URL is resolved before it is stored, so an address that points inside a private network is refused here rather than failing silently in a worker.",
        "operationId": "create_webhook_endpoint_webhook_endpoints_post",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_IssuedWebhookEndpointOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Webhook Endpoint",
        "tags": [
          "webhook-endpoints"
        ]
      }
    },
    "/webhook-endpoints/events": {
      "get": {
        "description": "Every event a webhook can subscribe to, grouped and in display order. Served rather than published as a constant so a client cannot offer an event this deployment does not send.",
        "operationId": "list_webhook_events_webhook_endpoints_events_get",
        "parameters": [
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_WebhookEventGroupOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Webhook Events",
        "tags": [
          "webhook-endpoints"
        ]
      }
    },
    "/webhook-endpoints/{endpoint_id}": {
      "delete": {
        "description": "Remove a webhook and anything still queued for it.",
        "operationId": "delete_webhook_endpoint_webhook_endpoints__endpoint_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Endpoint Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Delete Webhook Endpoint",
        "tags": [
          "webhook-endpoints"
        ]
      },
      "get": {
        "description": "One webhook, without its secret.",
        "operationId": "get_webhook_endpoint_webhook_endpoints__endpoint_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Endpoint Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_WebhookEndpointOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Webhook Endpoint",
        "tags": [
          "webhook-endpoints"
        ]
      },
      "patch": {
        "description": "Change the URL, the events, the description, or whether the webhook is on. A field left out is left alone. Turning a webhook off drops what is queued for it rather than holding it, so a pause is not a delayed flood.",
        "operationId": "update_webhook_endpoint_webhook_endpoints__endpoint_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Endpoint Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_WebhookEndpointOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Webhook Endpoint",
        "tags": [
          "webhook-endpoints"
        ]
      }
    },
    "/webhook-endpoints/{endpoint_id}/deliveries": {
      "get": {
        "description": "What was sent to this webhook, newest first, with the body and the answer. This is the surface someone debugging their receiver reads.",
        "operationId": "list_webhook_deliveries_webhook_endpoints__endpoint_id__deliveries_get",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Endpoint Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_WebhookDeliveryOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Webhook Deliveries",
        "tags": [
          "webhook-endpoints"
        ]
      }
    },
    "/webhook-endpoints/{endpoint_id}/rotate-secret": {
      "post": {
        "description": "Issue a new signing secret and stop trusting the old one. Anything sent after this, including retries of events queued before it, is signed with the new secret.",
        "operationId": "rotate_webhook_secret_webhook_endpoints__endpoint_id__rotate_secret_post",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Endpoint Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Workspace Id"
            }
          },
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Workspace-Id"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_IssuedWebhookEndpointOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Rotate Webhook Secret",
        "tags": [
          "webhook-endpoints"
        ]
      }
    },
    "/webhooks/tiktok": {
      "post": {
        "description": "Verify one webhook TikTok delivered directly, and acknowledge it.\n\nDeclared above `POST /{gateway_kind}` on purpose: Hono matches in\nregistration order, and the parametrized route would otherwise swallow\n`/webhooks/tiktok` and answer `unknown_gateway`. Moving this below it is a\nsilent regression, which is why the two live in one file.\n\nNative TikTok deliveries are settled by polling, so a verified event is\nlogged and acknowledged; the 200 stops TikTok retrying it for 72 hours.\nSee `publishing.tiktok_webhooks`.\n\nNo database session: nothing is written. That also keeps the endpoint\nanswering while the database is down, which is the right trade for a caller\nthat treats a non-200 as something to send again.",
        "operationId": "receive_tiktok_webhook_webhooks_tiktok_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_dict_"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Receive Tiktok Webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{gateway_kind}": {
      "post": {
        "description": "Verify, normalize, and idempotently record one gateway webhook delivery.\n\nThe raw request body is read as bytes (never parsed before verification --\n`verify_webhook` needs the exact bytes the gateway signed) alongside the\nrequest headers. An invalid signature raises `GatewayCallError`, which is\ntranslated here into a 401, enveloped `BFFError` (never the gateway's raw\nerror detail, since this response is gateway-facing, not\nuser/browser-facing, but the envelope stays consistent with the rest of\nthe BFF).\n\n`verify_webhook` returns one of three models. A `DeliveryEvent` is about a\npost Publedia published and goes to `webhook_service`; a `CommentEvent` is\nabout a comment and goes to `inbox_service`; a `MessageEvent` is about a\ndirect message and goes to `inbox_message_service`. All remain\nunauthenticated by user session and derive every scrap of trust from the\nsignature: the comment and message paths in particular take their workspace\nfrom `connected_channels`, never from the payload.",
        "operationId": "receive_webhook_webhooks__gateway_kind__post",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_kind",
            "required": true,
            "schema": {
              "title": "Gateway Kind",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_dict_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Receive Webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/workspaces": {
      "get": {
        "operationId": "list_workspaces_workspaces_get",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_WorkspaceSummary__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Workspaces",
        "tags": [
          "account"
        ]
      },
      "post": {
        "operationId": "create_workspace_workspaces_post",
        "parameters": [
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkspaceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_WorkspaceSummary_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Workspace",
        "tags": [
          "account"
        ]
      }
    },
    "/workspaces/{workspace_id}/activate": {
      "post": {
        "operationId": "activate_workspace_workspaces__workspace_id__activate_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_MeOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Activate Workspace",
        "tags": [
          "account"
        ]
      }
    },
    "/workspaces/{workspace_id}/audit-events": {
      "get": {
        "description": "The workspace's audit log, newest first, one page at a time. `cursor` is the previous page's `next_cursor`. With `include_activity`, post events and assistant tool calls are listed beside it in the same shape. Admins only.",
        "operationId": "list_audit_events_workspaces__workspace_id__audit_events_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "format": "uuid",
              "title": "Actor Id",
              "type": "string"
            }
          },
          {
            "description": "An action or its prefix, such as `api_key.`.",
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "description": "An action or its prefix, such as `api_key.`.",
              "maxLength": 64,
              "title": "Action",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AuditCategory"
            }
          },
          {
            "in": "query",
            "name": "target_type",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AuditTargetType"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "title": "From",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "title": "To",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "exclude_reads",
            "required": false,
            "schema": {
              "title": "Exclude Reads",
              "type": "boolean"
            }
          },
          {
            "description": "Also list post events and assistant tool calls.",
            "in": "query",
            "name": "include_activity",
            "required": false,
            "schema": {
              "description": "Also list post events and assistant tool calls.",
              "title": "Include Activity",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "maxLength": 200,
              "title": "Cursor",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_AuditEventPage_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Audit Events",
        "tags": [
          "audit"
        ]
      }
    },
    "/workspaces/{workspace_id}/audit-events/export": {
      "get": {
        "description": "The filtered audit log as CSV, newest first, up to 10,000 rows. The export is itself recorded as `audit.exported`. Admins only.",
        "operationId": "export_audit_events_workspaces__workspace_id__audit_events_export_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "actor_id",
            "required": false,
            "schema": {
              "format": "uuid",
              "title": "Actor Id",
              "type": "string"
            }
          },
          {
            "description": "An action or its prefix, such as `api_key.`.",
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "description": "An action or its prefix, such as `api_key.`.",
              "maxLength": 64,
              "title": "Action",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AuditCategory"
            }
          },
          {
            "in": "query",
            "name": "target_type",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/AuditTargetType"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "title": "From",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "title": "To",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "exclude_reads",
            "required": false,
            "schema": {
              "title": "Exclude Reads",
              "type": "boolean"
            }
          },
          {
            "description": "Also list post events and assistant tool calls.",
            "in": "query",
            "name": "include_activity",
            "required": false,
            "schema": {
              "description": "Also list post events and assistant tool calls.",
              "title": "Include Activity",
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Export Audit Events",
        "tags": [
          "audit"
        ]
      }
    },
    "/workspaces/{workspace_id}/brand": {
      "get": {
        "description": "The brand this workspace posts as: name, kind, category, description, website, logo, colour, and tone. Any member may read it, because the same facts are what the caption generator writes from.",
        "operationId": "get_brand_workspaces__workspace_id__brand_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_BrandOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Brand",
        "tags": [
          "workspace-settings"
        ],
        "x-api-key-scope": "read"
      },
      "patch": {
        "description": "Update the brand. Partial: an omitted field keeps its value, an explicit null clears it. The colour must be a six-digit hex value. Requires workspace_manage, since the brand is what every generated caption is written from.",
        "operationId": "update_brand_workspaces__workspace_id__brand_patch",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_BrandOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Brand",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/brand/logo": {
      "delete": {
        "description": "Stop using a logo. The file stays in the Brand album, because an ex-logo is still a brand asset. Requires workspace_manage.",
        "operationId": "clear_brand_logo_workspaces__workspace_id__brand_logo_delete",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_BrandOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Clear Brand Logo",
        "tags": [
          "workspace-settings"
        ]
      },
      "post": {
        "description": "File an uploaded image into this workspace's Brand album and make it the logo, in one transaction, for an API client that has already put bytes behind an upload intent from /media/upload-intent. The product's own screens never call this route: MediaPickerModal always confirms an upload through /media/confirm before it hands a picked file back, so every path through the app ends at PUT with an asset id already in the gallery. Requires workspace_manage.",
        "operationId": "set_brand_logo_from_upload_workspaces__workspace_id__brand_logo_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandLogoUploadIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_BrandOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set Brand Logo From Upload",
        "tags": [
          "workspace-settings"
        ]
      },
      "put": {
        "description": "Make an image already in this workspace's gallery the logo, moving it into the Brand album if it is filed elsewhere. Requires workspace_manage.",
        "operationId": "set_brand_logo_from_gallery_workspaces__workspace_id__brand_logo_put",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandLogoSelectIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_BrandOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set Brand Logo From Gallery",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/deletion": {
      "delete": {
        "description": "Cancel a scheduled deletion and resume publishing and automations. Posts whose time passed while it was paused return to drafts. Idempotent. Refused with `workspace_deletion_in_progress` once the deletion date has passed.",
        "operationId": "cancel_workspace_deletion_workspaces__workspace_id__deletion_delete",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_WorkspaceDeletionOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Cancel Workspace Deletion",
        "tags": [
          "workspace-settings"
        ]
      },
      "get": {
        "description": "Whether this workspace is scheduled for deletion and when, whether asking would delete it at once (it holds nothing) or schedule it, and whether the caller may ask or cancel.",
        "operationId": "get_workspace_deletion_workspaces__workspace_id__deletion_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_WorkspaceDeletionOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Workspace Deletion",
        "tags": [
          "workspace-settings"
        ],
        "x-api-key-scope": "read"
      },
      "post": {
        "description": "Delete this workspace. One that holds nothing is deleted now; any other is scheduled for deletion after the grace period, with publishing and automations paused until then. `confirm_name` must match the workspace's name, and `expect_immediate` must match what the request would do, or it is refused with `deletion_outcome_changed`. Only the workspace's creator may ask, and never with an API key.",
        "operationId": "request_workspace_deletion_workspaces__workspace_id__deletion_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceDeletionIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_WorkspaceDeletionResultOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Request Workspace Deletion",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/feature-preferences": {
      "get": {
        "description": "Which optional feature groups this workspace shows. Always the complete set with defaults applied, so the rail and the settings page render one stable list. A group that is off is collapsed and not revoked: its data is untouched, its route still loads, and anything already scheduled or configured keeps running. The assistant's answer is the same value the AI settings page writes, not a second copy of it.",
        "operationId": "get_feature_preferences_workspaces__workspace_id__feature_preferences_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_FeaturePreferencesOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Feature Preferences",
        "tags": [
          "workspace-settings"
        ],
        "x-api-key-scope": "read"
      },
      "put": {
        "description": "Replace which feature groups this workspace shows. A full replacement rather than a merge, so a stale tab cannot bring back a group somebody collapsed; an omitted group falls back to its default. Requires workspace_manage, because the choice changes the navigation for everyone in the workspace.",
        "operationId": "replace_feature_preferences_workspaces__workspace_id__feature_preferences_put",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeaturePreferencesIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_FeaturePreferencesOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Feature Preferences",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/gateway-apps": {
      "get": {
        "description": "Every platform this workspace may publish on an app of its own, and whether it brought one. `configured` false means Publedia's app, and on X that means posts count against the plan's X allowance; true means the workspace's own, which is billed to its own account and is therefore uncapped. The client ID is returned because it travels in the authorize URL anyway. The client secret is never returned by any read.",
        "operationId": "list_gateway_apps_workspaces__workspace_id__gateway_apps_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_GatewayAppOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Gateway Apps",
        "tags": [
          "workspace-settings"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/workspaces/{workspace_id}/gateway-apps/{gateway_kind}": {
      "delete": {
        "description": "Go back to publishing on Publedia's app for this gateway, and on X back to the plan's X allowance. The stored credentials are deleted. Every channel on this gateway is marked as needing a fresh authorization, for the same reason setting one does. Idempotent: clearing an app the workspace does not have succeeds. Requires workspace_manage.",
        "operationId": "clear_gateway_app_workspaces__workspace_id__gateway_apps__gateway_kind__delete",
        "parameters": [
          {
            "description": "The gateway to configure. Only gateways that take an app of your own are accepted; anything else is a 404, because a gateway whose credentials are managed for you has no form to fill in.",
            "in": "path",
            "name": "gateway_kind",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/GatewayKind",
              "description": "The gateway to configure. Only gateways that take an app of your own are accepted; anything else is a 404, because a gateway whose credentials are managed for you has no form to fill in."
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_GatewayAppOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Clear Gateway App",
        "tags": [
          "workspace-settings"
        ]
      },
      "put": {
        "description": "Publish this workspace's posts on this gateway through an app of your own. Both halves are sent together, and a rotated secret is the same request as a first entry. The pair is checked against the platform before anything is stored, so a credential that does not work is refused here rather than failing on a scheduled post hours later. Every channel already connected through this gateway is marked as needing a fresh authorization, because a refresh token is minted by one OAuth client and is worthless to another. Requires workspace_manage.",
        "operationId": "set_gateway_app_workspaces__workspace_id__gateway_apps__gateway_kind__put",
        "parameters": [
          {
            "description": "The gateway to configure. Only gateways that take an app of your own are accepted; anything else is a 404, because a gateway whose credentials are managed for you has no form to fill in.",
            "in": "path",
            "name": "gateway_kind",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/GatewayKind",
              "description": "The gateway to configure. Only gateways that take an app of your own are accepted; anything else is a 404, because a gateway whose credentials are managed for you has no form to fill in."
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayAppIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_GatewayAppOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Set Gateway App",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/invites": {
      "get": {
        "description": "Every invitation this workspace has issued, newest first. Accepted and revoked ones stay listed so the record of who was asked in survives. Tokens are never returned.",
        "operationId": "list_invites_workspaces__workspace_id__invites_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_list_InviteOut__"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Invites",
        "tags": [
          "workspace-settings"
        ]
      },
      "post": {
        "description": "Invite someone by email and mail them the link. The response carries the token and the accept path on the web app, and says whether the email went out. The token is in this response and nowhere else. Re-inviting an address that already has a live invitation revokes the old one and issues a new link.",
        "operationId": "create_invite_workspaces__workspace_id__invites_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteCreateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_IssuedInviteOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Create Invite",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/invites/{invite_id}": {
      "delete": {
        "description": "Withdraw an invitation. The link stops working immediately. Refused for one that was already accepted, since the way to undo that is to remove the member.",
        "operationId": "revoke_invite_workspaces__workspace_id__invites__invite_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "invite_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invite Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_InviteOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Revoke Invite",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/leave": {
      "post": {
        "description": "Leave this workspace, whatever the caller's role, with the same effects as being removed. Refused for the person who created it and for the only admin, and never with an API key.",
        "operationId": "leave_workspace_workspaces__workspace_id__leave_post",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_MemberOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Leave Workspace",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/members": {
      "get": {
        "description": "Everyone in this workspace, oldest membership first. Email addresses come from the sign-in records rather than from Publedia's own schema, so directory_available reports whether they could be read at all: false means the addresses are missing, not that the members have none.",
        "operationId": "list_members_workspaces__workspace_id__members_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_MembersOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "List Members",
        "tags": [
          "workspace-settings"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/workspaces/{workspace_id}/members/{membership_id}": {
      "delete": {
        "description": "Remove someone from this workspace, along with their notification settings for it. The person who created the workspace can never be removed, and removal is refused when the target would be the only admin. Their posts and audit records stay, so past activity remains attributable.",
        "operationId": "remove_member_workspaces__workspace_id__members__membership_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "membership_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Membership Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_MemberOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Remove Member",
        "tags": [
          "workspace-settings"
        ]
      },
      "patch": {
        "description": "Change one member's role. Refused when it would leave the workspace with no admin, including when an admin demotes themselves: nobody left could undo it.",
        "operationId": "update_member_role_workspaces__workspace_id__members__membership_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "membership_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Membership Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberRoleUpdateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_MemberOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Member Role",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/notification-preferences": {
      "get": {
        "description": "What the caller wants to hear about in this workspace. Always the complete set of events with defaults applied, so the page renders one stable list. `email_available` says which events are ever emailed; the email choice on the rest is recorded and not acted on.",
        "operationId": "get_notification_preferences_workspaces__workspace_id__notification_preferences_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_NotificationPreferencesOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Notification Preferences",
        "tags": [
          "workspace-settings"
        ],
        "x-api-key-scope": "read"
      },
      "put": {
        "description": "Replace the caller's notification settings for this workspace. A full replacement rather than a merge, so a stale tab cannot resurrect a switch that was turned off; an omitted event falls back to its default. A member can only write their own settings.",
        "operationId": "replace_notification_preferences_workspaces__workspace_id__notification_preferences_put",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationPreferencesIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_NotificationPreferencesOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Replace Notification Preferences",
        "tags": [
          "workspace-settings"
        ],
        "x-api-key-scope": "read"
      }
    },
    "/workspaces/{workspace_id}/settings": {
      "get": {
        "description": "Workspace-wide settings that are not brand facts: the timezone every posting week is read in, plus what setup was told this workspace is for and what it starts from. The last two may be null, which means the question was skipped or never asked. Any member may read them, because every screen that draws a time needs the zone and the get-started checklist needs the other two.",
        "operationId": "get_workspace_settings_workspaces__workspace_id__settings_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_WorkspaceSettingsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Workspace Settings",
        "tags": [
          "workspace-settings"
        ],
        "x-api-key-scope": "read"
      },
      "patch": {
        "description": "Update workspace settings. Partial: an omitted field keeps its value. The timezone must be an IANA zone name. An explicit null on either declared-intent answer sets it back to unanswered, which is what the settings page sends when someone clears their choice. Requires workspace_manage, matching the brand, because moving the workspace moves every posting week with it.",
        "operationId": "update_workspace_settings_workspaces__workspace_id__settings_patch",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceSettingsIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_WorkspaceSettingsOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Update Workspace Settings",
        "tags": [
          "workspace-settings"
        ]
      }
    },
    "/workspaces/{workspace_id}/usage": {
      "get": {
        "description": "What this workspace is using against the plan it is on: connected accounts, seats, posts published this month, media storage in bytes, and automations. `limits` carries the ceilings the same workspace may use, with `null` for unlimited, so one read answers both halves of a meter. `READ`, because reading your own workspace's usage needs no more authority than reading the workspace.",
        "operationId": "get_usage_workspaces__workspace_id__usage_get",
        "parameters": [
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Workspace Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Authorization"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope_PlanUsageOut_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Get Usage",
        "tags": [
          "workspace-settings"
        ],
        "x-api-key-scope": "read"
      }
    }
  }
}
