{
  "openapi": "3.1.0",
  "info": {
    "title": "SimplePost Self-hosted Server API",
    "version": "1.0.0",
    "description": "OpenAPI reference for the self-hosted SimplePost HTTP server."
  },
  "servers": [
    {
      "url": "http://localhost:3000",
      "description": "Self-hosted server"
    }
  ],
  "tags": [
    {
      "name": "OpenAPI",
      "description": "Generated API reference metadata."
    },
    {
      "name": "Health",
      "description": "Server health checks."
    },
    {
      "name": "Media",
      "description": "Public uploaded media serving."
    },
    {
      "name": "Accounts",
      "description": "Configured social account listing."
    },
    {
      "name": "Upload",
      "description": "Server-side media upload."
    },
    {
      "name": "Validation",
      "description": "Platform validation for draft posts."
    },
    {
      "name": "Posts",
      "description": "Immediate publishing through configured accounts."
    }
  ],
  "paths": {
    "/openapi.json": {
      "get": {
        "operationId": "getServerOpenApiDocument",
        "tags": [
          "OpenAPI"
        ],
        "summary": "Get the generated Server OpenAPI document",
        "responses": {
          "200": {
            "description": "Generated OpenAPI 3.1 document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerOpenApiDocument"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "getHealth",
        "tags": [
          "Health"
        ],
        "summary": "Check server health",
        "responses": {
          "200": {
            "description": "Server is healthy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/media/{filename}": {
      "get": {
        "operationId": "getUploadedMedia",
        "tags": [
          "Media"
        ],
        "summary": "Serve uploaded media",
        "description": "Public endpoint used by social platforms to fetch media returned by upload.",
        "parameters": [
          {
            "in": "path",
            "name": "filename",
            "schema": {
              "type": "string",
              "description": "Stored media filename."
            },
            "required": true,
            "description": "Stored media filename."
          }
        ],
        "responses": {
          "200": {
            "description": "Media bytes.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid filename.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "404": {
            "description": "File was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/accounts": {
      "get": {
        "operationId": "listConfiguredAccounts",
        "tags": [
          "Accounts"
        ],
        "summary": "List configured accounts",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Configured accounts without credentials.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerAccountsEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/upload": {
      "post": {
        "operationId": "uploadMedia",
        "tags": [
          "Upload"
        ],
        "summary": "Upload media",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Uploaded media reference.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerMediaFile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/upload/presign": {
      "post": {
        "operationId": "createServerPresignedUploadUrl",
        "tags": [
          "Upload"
        ],
        "summary": "Create a direct object-storage upload URL",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerPresignUploadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presigned upload request and ready-to-use media reference.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerPresignUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/validation": {
      "post": {
        "operationId": "validatePost",
        "tags": [
          "Validation"
        ],
        "summary": "Validate a draft post against configured accounts",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerValidationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validation result grouped by account/platform.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerValidationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/posts": {
      "post": {
        "operationId": "createPost",
        "tags": [
          "Posts"
        ],
        "summary": "Publish a post immediately",
        "description": "Publishes through configured accounts. The self-hosted server only supports postingMode: now; use the Scheduler app for scheduling.",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerCreatePostRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Published post record and per-account posting results.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerCreatePostResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/reposts": {
      "post": {
        "operationId": "repost",
        "tags": [
          "Posts"
        ],
        "summary": "Repost existing content",
        "description": "Reposts or reshares an existing platform post through configured accounts that support native reposting.",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServerRepostRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-account repost results.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerRepostResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ServerPresignUploadRequest": {
        "type": "object",
        "properties": {
          "filename": {
            "$ref": "#/components/schemas/__schema0"
          },
          "contentType": {
            "$ref": "#/components/schemas/__schema1"
          },
          "size": {
            "$ref": "#/components/schemas/__schema2"
          }
        },
        "required": [
          "filename",
          "contentType",
          "size"
        ]
      },
      "ServerValidationRequest": {
        "type": "object",
        "properties": {
          "imageFit": {
            "$ref": "#/components/schemas/__schema3"
          },
          "message": {
            "$ref": "#/components/schemas/__schema5"
          },
          "media": {
            "$ref": "#/components/schemas/__schema6"
          },
          "accountIds": {
            "$ref": "#/components/schemas/__schema8"
          },
          "accountOptions": {
            "$ref": "#/components/schemas/__schema10"
          },
          "accountOverrides": {
            "$ref": "#/components/schemas/__schema16"
          },
          "thread": {
            "$ref": "#/components/schemas/__schema20"
          }
        },
        "required": [
          "accountIds"
        ]
      },
      "ServerCreatePostRequest": {
        "type": "object",
        "properties": {
          "imageFit": {
            "$ref": "#/components/schemas/__schema21"
          },
          "message": {
            "$ref": "#/components/schemas/__schema22"
          },
          "accountIds": {
            "$ref": "#/components/schemas/__schema8"
          },
          "postingMode": {
            "$ref": "#/components/schemas/__schema23"
          },
          "scheduledFor": {
            "$ref": "#/components/schemas/__schema24"
          },
          "accountOptions": {
            "$ref": "#/components/schemas/__schema25"
          },
          "accountOverrides": {
            "$ref": "#/components/schemas/__schema26"
          },
          "repost": {
            "$ref": "#/components/schemas/__schema27"
          },
          "media": {
            "$ref": "#/components/schemas/__schema28"
          },
          "thread": {
            "$ref": "#/components/schemas/__schema29"
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/__schema30"
          }
        },
        "required": [
          "accountIds"
        ]
      },
      "ServerRepostRequest": {
        "type": "object",
        "properties": {
          "accountIds": {
            "$ref": "#/components/schemas/__schema32"
          },
          "target": {
            "$ref": "#/components/schemas/__schema33"
          },
          "accountTargets": {
            "$ref": "#/components/schemas/__schema35"
          },
          "accountOptions": {
            "$ref": "#/components/schemas/__schema36"
          }
        }
      },
      "__schema0": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255
      },
      "__schema1": {
        "type": "string",
        "minLength": 1
      },
      "__schema2": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 524288000
      },
      "__schema3": {
        "$ref": "#/components/schemas/__schema4"
      },
      "__schema4": {
        "type": "string",
        "enum": [
          "crop",
          "blur"
        ],
        "description": "Opt in to fitting incompatible images to all selected platforms. crop trims edges; blur preserves the full image over a blurred background. Converts to JPEG and compresses only when needed. Animated images that need fitting become still images. Omit to keep originals. If the user already asked to fit images, apply their chosen method without asking again; default to blur when no method was specified."
      },
      "__schema5": {
        "default": "",
        "type": "string"
      },
      "__schema6": {
        "default": [],
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/__schema7"
        }
      },
      "__schema7": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "thumbnailUrl": {
            "type": "string",
            "format": "uri"
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ]
          },
          "contentType": {
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "durationSec": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "id",
          "url",
          "type",
          "filename",
          "size"
        ]
      },
      "__schema8": {
        "minItems": 1,
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/__schema9"
        }
      },
      "__schema9": {
        "type": "string"
      },
      "__schema10": {
        "$ref": "#/components/schemas/__schema11"
      },
      "__schema11": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "object",
          "properties": {
            "replyToId": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "categoryId": {
              "type": "string"
            },
            "playlistId": {
              "description": "Temporarily unavailable for YouTube. Omit this field; add videos to playlists manually in YouTube Studio after publishing.",
              "$ref": "#/components/schemas/__schema12"
            },
            "thumbnailUrl": {
              "type": "string",
              "format": "uri"
            },
            "selfDeclaredMadeForKids": {
              "type": "boolean"
            },
            "publishAt": {
              "type": "string"
            },
            "privacyStatus": {
              "type": "string",
              "enum": [
                "public",
                "private",
                "unlisted"
              ]
            },
            "publishMode": {
              "description": "TikTok: public directly posts; draft uploads to the TikTok inbox for manual editing and publishing. Separate from SimplePost postingMode=draft.",
              "$ref": "#/components/schemas/__schema13"
            },
            "autoAddMusic": {
              "description": "TikTok photo Direct Post only: add TikTok-recommended music. MCP defaults to true for photos; false disables it.",
              "$ref": "#/components/schemas/__schema14"
            },
            "photoCoverIndex": {
              "description": "TikTok photo cover index, starting at 0.",
              "$ref": "#/components/schemas/__schema15"
            },
            "privacyLevel": {
              "type": "string",
              "enum": [
                "PUBLIC_TO_EVERYONE",
                "MUTUAL_FOLLOW_FRIENDS",
                "FOLLOWER_OF_CREATOR",
                "SELF_ONLY"
              ]
            },
            "visibility": {
              "type": "string",
              "enum": [
                "public",
                "friends",
                "private",
                "PUBLIC",
                "CONNECTIONS"
              ]
            },
            "allowComment": {
              "type": "boolean"
            },
            "allowDuet": {
              "type": "boolean"
            },
            "allowStitch": {
              "type": "boolean"
            },
            "commercialContentDisclosure": {
              "type": "boolean"
            },
            "discloseYourBrand": {
              "type": "boolean"
            },
            "discloseBrandedContent": {
              "type": "boolean"
            },
            "parseMode": {
              "type": "string",
              "enum": [
                "HTML",
                "Markdown",
                "MarkdownV2"
              ]
            },
            "boardId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "link": {
              "type": "string",
              "format": "uri"
            },
            "altText": {
              "type": "string"
            },
            "published": {
              "type": "boolean"
            },
            "series": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "canonicalUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organizationId": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": {}
        }
      },
      "__schema12": {
        "type": "string"
      },
      "__schema13": {
        "type": "string",
        "enum": [
          "draft",
          "public"
        ]
      },
      "__schema14": {
        "type": "boolean"
      },
      "__schema15": {
        "type": "integer",
        "minimum": 0,
        "maximum": 34
      },
      "__schema16": {
        "$ref": "#/components/schemas/__schema17"
      },
      "__schema17": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "object",
          "properties": {
            "message": {
              "type": "string"
            },
            "media": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/__schema7"
              }
            },
            "thread": {
              "$ref": "#/components/schemas/__schema18"
            }
          }
        }
      },
      "__schema18": {
        "maxItems": 24,
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/__schema19"
        }
      },
      "__schema19": {
        "type": "object",
        "properties": {
          "message": {
            "default": "",
            "type": "string"
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/__schema7"
            }
          }
        }
      },
      "__schema20": {
        "$ref": "#/components/schemas/__schema18"
      },
      "__schema21": {
        "$ref": "#/components/schemas/__schema4"
      },
      "__schema22": {
        "default": "",
        "type": "string"
      },
      "__schema23": {
        "default": "now",
        "type": "string",
        "const": "now"
      },
      "__schema24": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
      },
      "__schema25": {
        "$ref": "#/components/schemas/__schema11"
      },
      "__schema26": {
        "$ref": "#/components/schemas/__schema17"
      },
      "__schema27": {
        "type": "object",
        "properties": {
          "enabled": {
            "default": false,
            "type": "boolean"
          },
          "delayHours": {
            "default": 12,
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 720
          }
        }
      },
      "__schema28": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/__schema7"
        }
      },
      "__schema29": {
        "$ref": "#/components/schemas/__schema18"
      },
      "__schema30": {
        "description": "Optional client-supplied key making creation idempotent: retrying a request with the same key returns the originally created post instead of creating (and publishing) a duplicate.",
        "$ref": "#/components/schemas/__schema31"
      },
      "__schema31": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255
      },
      "__schema32": {
        "$ref": "#/components/schemas/__schema8"
      },
      "__schema33": {
        "$ref": "#/components/schemas/__schema34"
      },
      "__schema34": {
        "type": "object",
        "properties": {
          "postId": {
            "type": "string",
            "minLength": 1
          },
          "uri": {
            "type": "string"
          },
          "cid": {
            "type": "string"
          },
          "postUrl": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "postId"
        ]
      },
      "__schema35": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/__schema34"
        }
      },
      "__schema36": {
        "$ref": "#/components/schemas/__schema11"
      },
      "ServerOpenApiDocument": {
        "type": "object",
        "propertyNames": {
          "$ref": "#/components/schemas/__schema37"
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/__schema38"
        },
        "description": "Generated OpenAPI 3.1 document."
      },
      "HealthResponse": {
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/__schema39"
          },
          "timestamp": {
            "$ref": "#/components/schemas/__schema40"
          },
          "version": {
            "$ref": "#/components/schemas/__schema41"
          }
        },
        "required": [
          "status",
          "timestamp",
          "version"
        ],
        "additionalProperties": false
      },
      "ServerApiError": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/__schema42"
          },
          "code": {
            "$ref": "#/components/schemas/__schema43"
          },
          "details": {
            "$ref": "#/components/schemas/__schema44"
          },
          "message": {
            "$ref": "#/components/schemas/__schema45"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "ServerAccountsEnvelope": {
        "type": "object",
        "properties": {
          "accounts": {
            "$ref": "#/components/schemas/__schema46"
          }
        },
        "required": [
          "accounts"
        ],
        "additionalProperties": false
      },
      "ServerAccountSummary": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/__schema47"
          },
          "platform": {
            "$ref": "#/components/schemas/__schema48"
          },
          "label": {
            "$ref": "#/components/schemas/__schema49"
          },
          "username": {
            "$ref": "#/components/schemas/__schema50"
          },
          "platformAccountId": {
            "$ref": "#/components/schemas/__schema51"
          },
          "profilePicture": {
            "$ref": "#/components/schemas/__schema52"
          }
        },
        "required": [
          "id",
          "platform"
        ],
        "additionalProperties": false
      },
      "ServerMediaFile": {
        "$ref": "#/components/schemas/__schema61"
      },
      "ServerPresignUploadResponse": {
        "type": "object",
        "properties": {
          "uploadUrl": {
            "$ref": "#/components/schemas/__schema62"
          },
          "method": {
            "$ref": "#/components/schemas/__schema63"
          },
          "headers": {
            "$ref": "#/components/schemas/__schema64"
          },
          "expiresIn": {
            "$ref": "#/components/schemas/__schema65"
          },
          "key": {
            "$ref": "#/components/schemas/__schema66"
          },
          "media": {
            "$ref": "#/components/schemas/ServerMediaFile"
          }
        },
        "required": [
          "uploadUrl",
          "method",
          "headers",
          "expiresIn",
          "key",
          "media"
        ],
        "additionalProperties": false
      },
      "ServerValidationResponse": {
        "type": "object",
        "properties": {
          "fittedContent": {
            "$ref": "#/components/schemas/__schema67"
          },
          "platforms": {
            "$ref": "#/components/schemas/__schema77"
          },
          "results": {
            "$ref": "#/components/schemas/__schema79"
          },
          "summary": {
            "$ref": "#/components/schemas/__schema98"
          },
          "accounts": {
            "$ref": "#/components/schemas/__schema99"
          },
          "missingAccountIds": {
            "$ref": "#/components/schemas/__schema100"
          }
        },
        "required": [
          "platforms",
          "results",
          "summary",
          "accounts",
          "missingAccountIds"
        ],
        "additionalProperties": false
      },
      "ServerPlatformValidationResponse": {
        "type": "object",
        "properties": {
          "accountId": {
            "$ref": "#/components/schemas/__schema80"
          },
          "platform": {
            "$ref": "#/components/schemas/__schema78"
          },
          "rules": {
            "$ref": "#/components/schemas/ServerPlatformValidationRules"
          },
          "errors": {
            "$ref": "#/components/schemas/__schema86"
          },
          "warnings": {
            "$ref": "#/components/schemas/__schema95"
          },
          "isValid": {
            "$ref": "#/components/schemas/__schema96"
          },
          "usesCommonContent": {
            "$ref": "#/components/schemas/__schema97"
          }
        },
        "required": [
          "accountId",
          "platform",
          "rules",
          "errors",
          "warnings",
          "isValid",
          "usesCommonContent"
        ],
        "additionalProperties": false
      },
      "ServerPlatformValidationRules": {
        "type": "object",
        "properties": {
          "text": {
            "$ref": "#/components/schemas/__schema81"
          },
          "media": {
            "$ref": "#/components/schemas/__schema82"
          },
          "video": {
            "$ref": "#/components/schemas/__schema83"
          },
          "image": {
            "$ref": "#/components/schemas/__schema84"
          },
          "notes": {
            "$ref": "#/components/schemas/__schema85"
          }
        },
        "additionalProperties": false
      },
      "ServerValidationIssue": {
        "type": "object",
        "properties": {
          "platform": {
            "$ref": "#/components/schemas/__schema87"
          },
          "severity": {
            "$ref": "#/components/schemas/__schema88"
          },
          "code": {
            "$ref": "#/components/schemas/__schema89"
          },
          "message": {
            "$ref": "#/components/schemas/__schema90"
          },
          "field": {
            "$ref": "#/components/schemas/__schema91"
          },
          "limit": {
            "$ref": "#/components/schemas/__schema92"
          },
          "actual": {
            "$ref": "#/components/schemas/__schema93"
          },
          "meta": {
            "$ref": "#/components/schemas/__schema94"
          }
        },
        "required": [
          "platform",
          "severity",
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "ServerCreatePostResponse": {
        "type": "object",
        "properties": {
          "post": {
            "$ref": "#/components/schemas/ServerPost"
          },
          "postingResults": {
            "$ref": "#/components/schemas/__schema112"
          },
          "summary": {
            "$ref": "#/components/schemas/ServerPostingSummary"
          }
        },
        "required": [
          "post",
          "postingResults",
          "summary"
        ],
        "additionalProperties": false
      },
      "ServerPost": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/__schema101"
          },
          "message": {
            "$ref": "#/components/schemas/__schema102"
          },
          "accountIds": {
            "$ref": "#/components/schemas/__schema103"
          },
          "media": {
            "$ref": "#/components/schemas/__schema104"
          },
          "thread": {
            "$ref": "#/components/schemas/__schema105"
          },
          "scheduledFor": {
            "$ref": "#/components/schemas/__schema106"
          },
          "status": {
            "$ref": "#/components/schemas/__schema107"
          },
          "createdAt": {
            "$ref": "#/components/schemas/__schema108"
          },
          "publishedAt": {
            "$ref": "#/components/schemas/__schema109"
          },
          "accountOptions": {
            "$ref": "#/components/schemas/__schema110"
          },
          "accountOverrides": {
            "$ref": "#/components/schemas/__schema111"
          }
        },
        "required": [
          "id",
          "message",
          "accountIds",
          "media",
          "scheduledFor",
          "status",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "ServerPostingResult": {
        "type": "object",
        "properties": {
          "accountId": {
            "$ref": "#/components/schemas/__schema113"
          },
          "platform": {
            "$ref": "#/components/schemas/__schema114"
          },
          "success": {
            "$ref": "#/components/schemas/__schema115"
          },
          "error": {
            "$ref": "#/components/schemas/__schema116"
          },
          "message": {
            "$ref": "#/components/schemas/__schema117"
          },
          "postId": {
            "$ref": "#/components/schemas/__schema118"
          },
          "postUrl": {
            "$ref": "#/components/schemas/__schema119"
          },
          "details": {
            "$ref": "#/components/schemas/__schema120"
          },
          "threadResults": {
            "$ref": "#/components/schemas/__schema121"
          }
        },
        "required": [
          "accountId",
          "platform",
          "success"
        ],
        "additionalProperties": false
      },
      "ServerThreadSegmentResult": {
        "type": "object",
        "properties": {
          "index": {
            "$ref": "#/components/schemas/__schema122"
          },
          "success": {
            "$ref": "#/components/schemas/__schema123"
          },
          "postId": {
            "$ref": "#/components/schemas/__schema124"
          },
          "postUrl": {
            "$ref": "#/components/schemas/__schema125"
          },
          "error": {
            "$ref": "#/components/schemas/__schema126"
          },
          "message": {
            "$ref": "#/components/schemas/__schema127"
          },
          "details": {
            "$ref": "#/components/schemas/__schema128"
          }
        },
        "required": [
          "index",
          "success"
        ],
        "additionalProperties": false
      },
      "ServerPostingSummary": {
        "type": "object",
        "properties": {
          "successCount": {
            "$ref": "#/components/schemas/__schema129"
          },
          "failureCount": {
            "$ref": "#/components/schemas/__schema130"
          },
          "overallSuccess": {
            "$ref": "#/components/schemas/__schema131"
          }
        },
        "required": [
          "successCount",
          "failureCount",
          "overallSuccess"
        ],
        "additionalProperties": false
      },
      "ServerRepostResponse": {
        "type": "object",
        "properties": {
          "repostingResults": {
            "$ref": "#/components/schemas/__schema132"
          },
          "summary": {
            "$ref": "#/components/schemas/ServerPostingSummary"
          }
        },
        "required": [
          "repostingResults",
          "summary"
        ],
        "additionalProperties": false
      },
      "__schema37": {
        "type": "string"
      },
      "__schema38": {},
      "__schema39": {
        "type": "string",
        "const": "ok"
      },
      "__schema40": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
      },
      "__schema41": {
        "type": "string"
      },
      "__schema42": {
        "type": "string"
      },
      "__schema43": {
        "type": "string"
      },
      "__schema44": {
        "$ref": "#/components/schemas/__schema38"
      },
      "__schema45": {
        "type": "string"
      },
      "__schema46": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ServerAccountSummary"
        }
      },
      "__schema47": {
        "type": "string"
      },
      "__schema48": {
        "type": "string"
      },
      "__schema49": {
        "type": "string"
      },
      "__schema50": {
        "type": "string"
      },
      "__schema51": {
        "type": "string"
      },
      "__schema52": {
        "type": "string",
        "format": "uri"
      },
      "__schema53": {
        "type": "string"
      },
      "__schema54": {
        "type": "string",
        "format": "uri"
      },
      "__schema55": {
        "type": "string",
        "format": "uri"
      },
      "__schema56": {
        "type": "string",
        "enum": [
          "image",
          "video"
        ]
      },
      "__schema57": {
        "type": "string"
      },
      "__schema58": {
        "type": "string"
      },
      "__schema59": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      },
      "__schema60": {
        "type": "number",
        "minimum": 0
      },
      "__schema61": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/__schema53"
          },
          "url": {
            "$ref": "#/components/schemas/__schema54"
          },
          "thumbnailUrl": {
            "$ref": "#/components/schemas/__schema55"
          },
          "type": {
            "$ref": "#/components/schemas/__schema56"
          },
          "contentType": {
            "$ref": "#/components/schemas/__schema57"
          },
          "filename": {
            "$ref": "#/components/schemas/__schema58"
          },
          "size": {
            "$ref": "#/components/schemas/__schema59"
          },
          "durationSec": {
            "$ref": "#/components/schemas/__schema60"
          }
        },
        "required": [
          "id",
          "url",
          "type",
          "filename",
          "size"
        ],
        "additionalProperties": false
      },
      "__schema62": {
        "type": "string",
        "format": "uri"
      },
      "__schema63": {
        "type": "string",
        "const": "PUT"
      },
      "__schema64": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "string"
        }
      },
      "__schema65": {
        "type": "integer",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991
      },
      "__schema66": {
        "type": "string"
      },
      "__schema67": {
        "description": "Present when imageFit is requested. Use these reviewed media URLs and overrides when creating the post.",
        "$ref": "#/components/schemas/__schema68"
      },
      "__schema68": {
        "type": "object",
        "properties": {
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/__schema61"
            }
          },
          "accountOverrides": {
            "$ref": "#/components/schemas/__schema69"
          },
          "accountOptions": {
            "$ref": "#/components/schemas/__schema72"
          },
          "thread": {
            "$ref": "#/components/schemas/__schema70"
          }
        },
        "required": [
          "media"
        ],
        "additionalProperties": false
      },
      "__schema69": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "object",
          "properties": {
            "message": {
              "type": "string"
            },
            "media": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/__schema61"
              }
            },
            "thread": {
              "$ref": "#/components/schemas/__schema70"
            }
          },
          "additionalProperties": false
        }
      },
      "__schema70": {
        "maxItems": 24,
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/__schema71"
        }
      },
      "__schema71": {
        "type": "object",
        "properties": {
          "message": {
            "default": "",
            "type": "string"
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/__schema61"
            }
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false
      },
      "__schema72": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "object",
          "properties": {
            "replyToId": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "categoryId": {
              "type": "string"
            },
            "playlistId": {
              "description": "Temporarily unavailable for YouTube. Omit this field; add videos to playlists manually in YouTube Studio after publishing.",
              "$ref": "#/components/schemas/__schema73"
            },
            "thumbnailUrl": {
              "type": "string",
              "format": "uri"
            },
            "selfDeclaredMadeForKids": {
              "type": "boolean"
            },
            "publishAt": {
              "type": "string"
            },
            "privacyStatus": {
              "type": "string",
              "enum": [
                "public",
                "private",
                "unlisted"
              ]
            },
            "publishMode": {
              "description": "TikTok: public directly posts; draft uploads to the TikTok inbox for manual editing and publishing. Separate from SimplePost postingMode=draft.",
              "$ref": "#/components/schemas/__schema74"
            },
            "autoAddMusic": {
              "description": "TikTok photo Direct Post only: add TikTok-recommended music. MCP defaults to true for photos; false disables it.",
              "$ref": "#/components/schemas/__schema75"
            },
            "photoCoverIndex": {
              "description": "TikTok photo cover index, starting at 0.",
              "$ref": "#/components/schemas/__schema76"
            },
            "privacyLevel": {
              "type": "string",
              "enum": [
                "PUBLIC_TO_EVERYONE",
                "MUTUAL_FOLLOW_FRIENDS",
                "FOLLOWER_OF_CREATOR",
                "SELF_ONLY"
              ]
            },
            "visibility": {
              "type": "string",
              "enum": [
                "public",
                "friends",
                "private",
                "PUBLIC",
                "CONNECTIONS"
              ]
            },
            "allowComment": {
              "type": "boolean"
            },
            "allowDuet": {
              "type": "boolean"
            },
            "allowStitch": {
              "type": "boolean"
            },
            "commercialContentDisclosure": {
              "type": "boolean"
            },
            "discloseYourBrand": {
              "type": "boolean"
            },
            "discloseBrandedContent": {
              "type": "boolean"
            },
            "parseMode": {
              "type": "string",
              "enum": [
                "HTML",
                "Markdown",
                "MarkdownV2"
              ]
            },
            "boardId": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "link": {
              "type": "string",
              "format": "uri"
            },
            "altText": {
              "type": "string"
            },
            "published": {
              "type": "boolean"
            },
            "series": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "canonicalUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organizationId": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": {}
        }
      },
      "__schema73": {
        "type": "string"
      },
      "__schema74": {
        "type": "string",
        "enum": [
          "draft",
          "public"
        ]
      },
      "__schema75": {
        "type": "boolean"
      },
      "__schema76": {
        "type": "integer",
        "minimum": 0,
        "maximum": 34
      },
      "__schema77": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/__schema78"
        }
      },
      "__schema78": {
        "type": "string",
        "enum": [
          "x",
          "youtube",
          "telegram",
          "facebook",
          "instagram",
          "tiktok",
          "bluesky",
          "threads",
          "linkedin",
          "pinterest",
          "forem"
        ]
      },
      "__schema79": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ServerPlatformValidationResponse"
        }
      },
      "__schema80": {
        "type": "string"
      },
      "__schema81": {
        "type": "object",
        "properties": {
          "maxLength": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "standardMaxLength": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "maxCaptionLength": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "maxCaptionLengthByMediaType": {
            "type": "object",
            "properties": {
              "image": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "video": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "__schema82": {
        "type": "object",
        "properties": {
          "requiresMedia": {
            "type": "boolean"
          },
          "minCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "maxCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "maxImages": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "maxVideos": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "allowsMixed": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "__schema83": {
        "type": "object",
        "properties": {
          "requiresVideo": {
            "type": "boolean"
          },
          "maxSizeBytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "maxDurationSec": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "maxTitleLength": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "maxDescriptionLength": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "additionalProperties": false
      },
      "__schema84": {
        "type": "object",
        "properties": {
          "maxSizeBytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "additionalProperties": false
      },
      "__schema85": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "__schema86": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ServerValidationIssue"
        }
      },
      "__schema87": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/__schema78"
          },
          {
            "type": "string",
            "const": "common"
          }
        ]
      },
      "__schema88": {
        "type": "string",
        "enum": [
          "error",
          "warning"
        ]
      },
      "__schema89": {
        "type": "string"
      },
      "__schema90": {
        "type": "string"
      },
      "__schema91": {
        "type": "string"
      },
      "__schema92": {
        "type": "number"
      },
      "__schema93": {
        "type": "number"
      },
      "__schema94": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/__schema38"
        }
      },
      "__schema95": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ServerValidationIssue"
        }
      },
      "__schema96": {
        "type": "boolean"
      },
      "__schema97": {
        "type": "boolean"
      },
      "__schema98": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServerValidationIssue"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServerValidationIssue"
            }
          },
          "isValid": {
            "type": "boolean"
          }
        },
        "required": [
          "errors",
          "warnings",
          "isValid"
        ],
        "additionalProperties": false
      },
      "__schema99": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ServerAccountSummary"
        }
      },
      "__schema100": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "__schema101": {
        "type": "string"
      },
      "__schema102": {
        "type": "string"
      },
      "__schema103": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "__schema104": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ServerMediaFile"
        }
      },
      "__schema105": {
        "$ref": "#/components/schemas/__schema70"
      },
      "__schema106": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
      },
      "__schema107": {
        "type": "string",
        "enum": [
          "published",
          "failed"
        ]
      },
      "__schema108": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
      },
      "__schema109": {
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
      },
      "__schema110": {
        "$ref": "#/components/schemas/__schema72"
      },
      "__schema111": {
        "$ref": "#/components/schemas/__schema69"
      },
      "__schema112": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ServerPostingResult"
        }
      },
      "__schema113": {
        "type": "string"
      },
      "__schema114": {
        "type": "string"
      },
      "__schema115": {
        "type": "boolean"
      },
      "__schema116": {
        "type": "string"
      },
      "__schema117": {
        "type": "string"
      },
      "__schema118": {
        "type": "string"
      },
      "__schema119": {
        "type": "string",
        "format": "uri"
      },
      "__schema120": {
        "$ref": "#/components/schemas/__schema38"
      },
      "__schema121": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ServerThreadSegmentResult"
        }
      },
      "__schema122": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      },
      "__schema123": {
        "type": "boolean"
      },
      "__schema124": {
        "type": "string"
      },
      "__schema125": {
        "type": "string",
        "format": "uri"
      },
      "__schema126": {
        "type": "string"
      },
      "__schema127": {
        "type": "string"
      },
      "__schema128": {
        "$ref": "#/components/schemas/__schema38"
      },
      "__schema129": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      },
      "__schema130": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      },
      "__schema131": {
        "type": "boolean"
      },
      "__schema132": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ServerPostingResult"
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Shared API key configured with SIMPLE_POST_API_KEY."
      }
    }
  }
}
