{
  "openapi": "3.1.0",
  "info": {
    "title": "Schedchie API",
    "version": "1.0.0",
    "summary": "Schedule, review and measure social posts from your own code.",
    "description": "The Schedchie API is a REST API over your workspace: posts, approvals, media,\nnotes and analytics. It is included in the Ultra and Ultra+ plans.\n\n**Base URL:** `https://api.schedchie.com/v1`. The same routes also answer on\n`https://mcp.schedchie.com/v1`.\n\n**Authentication:** every request carries an API key as\n`Authorization: Bearer schedchie_api_…`. Keys are created in the Schedchie\ndashboard under AI assistants, shown once, and become available after the\nworkspace's first paid invoice. A key acts only in its own workspace and\nonly within the permission groups it was granted; a read-only key is\nrefused on every write.\n\n**Format:** JSON both ways (`application/json; charset=utf-8`), request\nbodies up to 8 MiB. Field names are camelCase. A single resource is the\nobject itself; a list is `{ \"data\": [...], \"nextCursor\": \"…\" | null }`.\nCreates answer `201`.\n\n**Errors:** one envelope, `{ \"error\": { \"status\", \"code\", \"message\",\n\"requestId\" } }`, with `details` on a `422 validation_failed`. Every\nresponse carries `X-Request-Id`; quote it when you write to support.\n\n**Limits:** 120 calls a minute and 1,200 an hour per key, and the same\nnumbers once more for the whole workspace, so more keys never mean more\ncalls (Ultra+: 3,600 an hour). Every response carries `RateLimit-Limit`,\n`RateLimit-Remaining` and `RateLimit-Reset`; a `429` adds `Retry-After`.\nLive reads (the analytics overview and account routes, which reach a social\nplatform) are cached for 300 s per workspace and counted against 60\nuncached reads an hour (Ultra+: 120); `X-Schedchie-Cache: hit` marks a\ncached answer.\n\n**Pagination:** `GET /posts` pages with `cursor` and `limit` (default 25,\nmax 100) and answers `nextCursor` (`null` on the last page). The other\nlists return everything with `nextCursor: null`; `limit` is accepted and\nreserved so paging can be added without a version bump.\n\n**Idempotency:** `POST /posts` takes an `Idempotency-Key` header (1 to 255\ncharacters of your choice). A repeat with the same key and the same API\nkey answers the post already made with `200` and\n`Idempotent-Replayed: true`, never a second post. Keys are unique forever\nper API key. No other route is idempotent by header; `DELETE` routes are\nnaturally idempotent (the second call answers `404`).\n\n**Versioning:** the version is in the path. Additive changes (new routes,\nnew optional fields, new enum values) do not bump it. A breaking change\nships as `/v2`; `/v1` keeps answering for at least six months after `/v2`\nis announced, with `Deprecation` and `Sunset` headers (RFC 9745, RFC 8594)\non every `/v1` response and a changelog entry. A single route marked\n`deprecated` in this document carries a `Deprecation` header from the day\nof the notice and is removed only in the next major version.\n\n**Destructive routes:** `DELETE` is the confirmation. There is no\nconfirmation header on REST routes.\n\n**Advanced: calling a tool directly.** The same keys reach every MCP tool\nover HTTPS: `GET /v1/tools` lists the tools a key may call and\n`POST /v1/tools/{name}` runs one with its arguments as the JSON body. That\nsurface is documented by the tool descriptions themselves and is the\nescape hatch for what this reference does not wrap. Destructive tools need\n`X-Confirm-Destructive: true` there.\n",
    "termsOfService": "https://www.schedchie.com/terms",
    "license": {
      "name": "Schedchie terms of service",
      "url": "https://www.schedchie.com/terms"
    },
    "contact": {
      "name": "Schedchie support",
      "url": "https://www.schedchie.com/contact",
      "email": "simon@schedchie.com"
    }
  },
  "servers": [
    {
      "url": "https://api.schedchie.com/v1",
      "description": "Production"
    },
    {
      "url": "https://mcp.schedchie.com/v1",
      "description": "The same server on the MCP host (the CLI and SDK default)"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "workspace",
      "description": "The key's own workspace and its connected social accounts."
    },
    {
      "name": "posts",
      "description": "Scheduled and published posts. Permission group `posts`."
    },
    {
      "name": "approvals",
      "description": "Posts waiting for the workspace owner. Permission group `team`."
    },
    {
      "name": "members",
      "description": "Workspace members, read only in v1. Permission group `team`."
    },
    {
      "name": "media",
      "description": "Upload links, upload status and imports by URL. Permission group `media`."
    },
    {
      "name": "notes",
      "description": "Notes in the library. Permission group `library`."
    },
    {
      "name": "analytics",
      "description": "Account and workspace analytics. Permission group `analytics`."
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "tags": [
          "workspace"
        ],
        "operationId": "getMe",
        "summary": "Check the key and see its workspace",
        "description": "Answers the account the key acts as. The first call to make with a new\nkey: a `200` means the key works.\n",
        "x-schedchie-tool": "whoami",
        "x-schedchie-scope": "any",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "responses": {
          "200": {
            "description": "The key's workspace.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                },
                "examples": {
                  "owner": {
                    "value": {
                      "userId": "6650a0c0ffee00000000c0de",
                      "email": "owner@example.com",
                      "notifyFailedPosts": true,
                      "memberOfWorkspaces": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/me \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/me\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst me = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/me\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\nme = r.json()"
          }
        ]
      }
    },
    "/accounts": {
      "get": {
        "tags": [
          "workspace"
        ],
        "operationId": "listAccounts",
        "summary": "List the connected social accounts",
        "description": "Every connected account with its group, connection state and token\nexpiry. Use `accountId` values from here in `POST /posts` and in the\nanalytics routes. The whole list is returned; `nextCursor` is always\n`null` in v1.\n",
        "x-schedchie-tool": "list_accounts",
        "x-schedchie-scope": "any",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "$ref": "#/components/parameters/ReservedLimit"
          }
        ],
        "responses": {
          "200": {
            "description": "The accounts.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountList"
                },
                "examples": {
                  "two-accounts": {
                    "value": {
                      "data": [
                        {
                          "accountId": "64a1f0e2b3c4d5e6f7a8b9c0",
                          "platform": "instagram",
                          "username": "brand.ig",
                          "connected": true,
                          "tokenExpiry": {
                            "kind": "renews",
                            "expiresAt": "2027-01-01T00:00:00.000Z"
                          },
                          "health": {
                            "status": "active",
                            "code": null,
                            "reason": null,
                            "detectedAt": null
                          },
                          "publishBlocked": false,
                          "group": {
                            "id": "64b000000000000000000001",
                            "name": "Brand"
                          }
                        },
                        {
                          "accountId": "64a1f0e2b3c4d5e6f7a8b9c1",
                          "platform": "linkedin",
                          "username": "Brand Co",
                          "connected": true,
                          "tokenExpiry": {
                            "kind": "fixed",
                            "expiresAt": "2026-12-20T00:00:00.000Z"
                          },
                          "health": {
                            "status": "active",
                            "code": null,
                            "reason": null,
                            "detectedAt": null
                          },
                          "publishBlocked": false,
                          "group": {
                            "id": "64b000000000000000000001",
                            "name": "Brand"
                          }
                        }
                      ],
                      "nextCursor": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/accounts \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/accounts\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst accounts = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/accounts\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\naccounts = r.json()"
          }
        ]
      }
    },
    "/posts": {
      "get": {
        "tags": [
          "posts"
        ],
        "operationId": "listPosts",
        "summary": "List posts",
        "description": "Posts of the workspace, newest first, as summaries. Filter by status,\nplatform and scheduled time. Page with `cursor` and `limit`: the answer\ncarries `nextCursor` while there are more, `null` on the last page.\n",
        "x-schedchie-tool": "list_posts",
        "x-schedchie-scope": "posts",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only posts in this processing status.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "processing",
                "completed",
                "failed",
                "pending_approval"
              ]
            },
            "example": "pending"
          },
          {
            "name": "platform",
            "in": "query",
            "description": "Only posts targeting at least one account on this platform.",
            "schema": {
              "$ref": "#/components/schemas/Platform"
            }
          },
          {
            "name": "dateFrom",
            "in": "query",
            "description": "Only posts scheduled at or after this time (ISO 8601, UTC).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "description": "Only posts scheduled at or before this time (ISO 8601, UTC). A date alone means the end of that day.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of posts.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostList"
                },
                "examples": {
                  "one-page": {
                    "value": {
                      "data": [
                        {
                          "id": "65c000000000000000000001",
                          "contentPreview": "Launch day",
                          "hashtags": [
                            "launch"
                          ],
                          "accounts": [
                            {
                              "platform": "instagram",
                              "name": "brand.ig",
                              "accountId": "64a1f0e2b3c4d5e6f7a8b9c0"
                            }
                          ],
                          "mediaCount": 1,
                          "publishedCount": 1,
                          "failures": [],
                          "status": "completed",
                          "isPublished": true,
                          "scheduledTime": "2026-05-01T10:00:00.000Z",
                          "createdAt": "2026-04-30T09:00:00.000Z"
                        }
                      ],
                      "nextCursor": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/posts?status=pending \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/posts?status=pending\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst posts = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/posts?status=pending\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\nposts = r.json()"
          }
        ]
      },
      "post": {
        "tags": [
          "posts"
        ],
        "operationId": "createPost",
        "summary": "Schedule a post",
        "description": "Schedules one post to one or more accounts. `scheduledTime` is UTC; a\ntime in the past publishes within a minute. Platforms that need media\n(Instagram, TikTok, YouTube, Pinterest) refuse a text-only post with a\n`422 tool_error` that names the account. Media comes from\n`POST /media/uploads` (then confirm) or `POST /media`, as the returned\n`media` object or its `gcsObjectName`. Per-account overrides go in\n`platformSpecificContent`, keyed by `accountId`, with platform-prefixed\nfields such as `youtube_title`, `tiktok_privacyStatus` or\n`instagram_first_comment`.\n\nSend an `Idempotency-Key` to make the call safe to retry: a repeat with\nthe same key answers the post already made with `200` and\n`Idempotent-Replayed: true`.\n",
        "x-schedchie-tool": "schedule_post",
        "x-schedchie-scope": "posts",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": true,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePost"
              },
              "examples": {
                "text-post": {
                  "value": {
                    "text": "Launch day. The new collection is live.",
                    "accountIds": [
                      "64a1f0e2b3c4d5e6f7a8b9c1"
                    ],
                    "scheduledTime": "2026-12-01T09:00:00.000Z",
                    "hashtags": [
                      "launch",
                      "newcollection"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replayed. The same `Idempotency-Key` was used before; this is the post made then.",
            "headers": {
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/Idempotent-Replayed"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledPost"
                },
                "examples": {
                  "replayed": {
                    "value": {
                      "postId": "65c000000000000000000010",
                      "processingStatus": "pending",
                      "message": "Post already scheduled.",
                      "duplicate": true,
                      "scheduledFor": "2026-12-01T09:00:00.000Z",
                      "accounts": [
                        "linkedin:Brand Co"
                      ]
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "The post was scheduled.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduledPost"
                },
                "examples": {
                  "scheduled": {
                    "value": {
                      "postId": "65c000000000000000000010",
                      "processingStatus": "pending",
                      "message": "Post scheduled for 1 Dec 2026, 09:00 UTC.",
                      "scheduledFor": "2026-12-01T09:00:00.000Z",
                      "accounts": [
                        "linkedin:Brand Co"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X POST https://api.schedchie.com/v1/posts \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Idempotency-Key: launch-2026-12-01-ig-li\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\":\"Launch day. The new collection is live.\",\"accountIds\":[\"64a1f0e2b3c4d5e6f7a8b9c1\"],\"scheduledTime\":\"2026-12-01T09:00:00.000Z\",\"hashtags\":[\"launch\",\"newcollection\"]}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/posts\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Idempotency-Key\": \"launch-2026-12-01-ig-li\",\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"text\": \"Launch day. The new collection is live.\",\n    \"accountIds\": [\n      \"64a1f0e2b3c4d5e6f7a8b9c1\"\n    ],\n    \"scheduledTime\": \"2026-12-01T09:00:00.000Z\",\n    \"hashtags\": [\n      \"launch\",\n      \"newcollection\"\n    ]\n  }),\n});\nconst post = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.post(\"https://api.schedchie.com/v1/posts\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\", \"Idempotency-Key\": \"launch-2026-12-01-ig-li\"}, json={\n  \"text\": \"Launch day. The new collection is live.\",\n  \"accountIds\": [\n    \"64a1f0e2b3c4d5e6f7a8b9c1\"\n  ],\n  \"scheduledTime\": \"2026-12-01T09:00:00.000Z\",\n  \"hashtags\": [\n    \"launch\",\n    \"newcollection\"\n  ]\n})\nr.raise_for_status()\npost = r.json()"
          }
        ]
      }
    },
    "/posts/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PostId"
        }
      ],
      "get": {
        "tags": [
          "posts"
        ],
        "operationId": "getPost",
        "summary": "Get a post",
        "description": "The stored post with its per-account publish results. `rejectionReason`\nand `rejectionNote` are present when an approver rejected it.\n",
        "x-schedchie-tool": "get_post",
        "x-schedchie-scope": "posts",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "responses": {
          "200": {
            "description": "The post.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDetail"
                },
                "examples": {
                  "published": {
                    "value": {
                      "_id": "65c000000000000000000001",
                      "universalContent": "Launch day",
                      "universalHashtags": [
                        "launch"
                      ],
                      "accountPlatformsAndNames": [
                        {
                          "accountId": "64a1f0e2b3c4d5e6f7a8b9c0",
                          "platform": "instagram",
                          "name": "brand.ig"
                        }
                      ],
                      "processingStatus": "completed",
                      "isPublished": true,
                      "scheduledTime": "2026-05-01T10:00:00.000Z",
                      "createdAt": "2026-04-30T09:00:00.000Z",
                      "media": [
                        {
                          "gcsObjectName": "uploads/launch.mp4",
                          "mimeType": "video/mp4"
                        }
                      ],
                      "publishResults": [
                        {
                          "accountId": "64a1f0e2b3c4d5e6f7a8b9c0",
                          "platform": "instagram",
                          "success": true,
                          "publicUrl": "https://www.instagram.com/p/abc123/"
                        }
                      ],
                      "recurrence": null,
                      "successCount": 1,
                      "failureCount": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/posts/65c000000000000000000001 \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/posts/65c000000000000000000001\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst post = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/posts/65c000000000000000000001\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\npost = r.json()"
          }
        ]
      },
      "patch": {
        "tags": [
          "posts"
        ],
        "operationId": "updatePost",
        "summary": "Edit a scheduled post",
        "description": "Changes a post that has not published yet. Each field you send\nreplaces the stored value whole (`hashtags`, `accountIds`, `media` and\n`platformSpecificContent` are replaced as lists, not merged).\n",
        "x-schedchie-tool": "edit_post",
        "x-schedchie-scope": "posts",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePost"
              },
              "examples": {
                "new-text": {
                  "value": {
                    "text": "Launch day, revised. The new collection is live now."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post was changed.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostChange"
                },
                "examples": {
                  "changed": {
                    "value": {
                      "message": "Post updated",
                      "post": {
                        "id": "65c000000000000000000001",
                        "contentPreview": "Launch day, revised. The new collection is live now.",
                        "hashtags": [
                          "launch"
                        ],
                        "accounts": [
                          {
                            "platform": "instagram",
                            "name": "brand.ig",
                            "accountId": "64a1f0e2b3c4d5e6f7a8b9c0"
                          }
                        ],
                        "mediaCount": 1,
                        "publishedCount": 0,
                        "failures": [],
                        "status": "pending",
                        "isPublished": false,
                        "scheduledTime": "2026-12-01T09:00:00.000Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X PATCH https://api.schedchie.com/v1/posts/65c000000000000000000001 \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\":\"Launch day, revised. The new collection is live now.\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/posts/65c000000000000000000001\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"text\": \"Launch day, revised. The new collection is live now.\"\n  }),\n});\nconst post = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.patch(\"https://api.schedchie.com/v1/posts/65c000000000000000000001\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"}, json={\n  \"text\": \"Launch day, revised. The new collection is live now.\"\n})\nr.raise_for_status()\npost = r.json()"
          }
        ]
      },
      "delete": {
        "tags": [
          "posts"
        ],
        "operationId": "deletePost",
        "summary": "Delete a post",
        "description": "Removes the post from Schedchie. A published post is removed from the\ncalendar only; nothing is deleted on the social platforms. The method\nis the confirmation. A second call answers `404`.\n",
        "x-schedchie-tool": "delete_post",
        "x-schedchie-scope": "posts",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": true,
        "responses": {
          "200": {
            "description": "The post was deleted.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                },
                "examples": {
                  "deleted": {
                    "value": {
                      "message": "Post removed"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X DELETE https://api.schedchie.com/v1/posts/65c000000000000000000001 \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/posts/65c000000000000000000001\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nif (!res.ok) throw new Error((await res.json()).error.message);"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.delete(\"https://api.schedchie.com/v1/posts/65c000000000000000000001\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()"
          }
        ]
      }
    },
    "/posts/{id}/reschedule": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PostId"
        }
      ],
      "post": {
        "tags": [
          "posts"
        ],
        "operationId": "reschedulePost",
        "summary": "Move a post to another time",
        "x-schedchie-tool": "reschedule_post",
        "x-schedchie-scope": "posts",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReschedulePost"
              },
              "examples": {
                "next-week": {
                  "value": {
                    "scheduledTime": "2026-12-08T09:00:00.000Z"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post was moved.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostChange"
                },
                "examples": {
                  "moved": {
                    "value": {
                      "message": "Schedule updated successfully",
                      "post": {
                        "id": "65c000000000000000000001",
                        "contentPreview": "Launch day",
                        "hashtags": [
                          "launch"
                        ],
                        "accounts": [
                          {
                            "platform": "instagram",
                            "name": "brand.ig",
                            "accountId": "64a1f0e2b3c4d5e6f7a8b9c0"
                          }
                        ],
                        "mediaCount": 1,
                        "publishedCount": 0,
                        "failures": [],
                        "status": "pending",
                        "isPublished": false,
                        "scheduledTime": "2026-12-08T09:00:00.000Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X POST https://api.schedchie.com/v1/posts/65c000000000000000000001/reschedule \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"scheduledTime\":\"2026-12-08T09:00:00.000Z\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/posts/65c000000000000000000001/reschedule\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"scheduledTime\": \"2026-12-08T09:00:00.000Z\"\n  }),\n});\nconst post = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.post(\"https://api.schedchie.com/v1/posts/65c000000000000000000001/reschedule\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"}, json={\n  \"scheduledTime\": \"2026-12-08T09:00:00.000Z\"\n})\nr.raise_for_status()\npost = r.json()"
          }
        ]
      }
    },
    "/posts/{id}/retry": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PostId"
        }
      ],
      "post": {
        "tags": [
          "posts"
        ],
        "operationId": "retryPost",
        "summary": "Retry a failed post",
        "description": "Queues a failed post again, now or at `scheduledTime`. A post that\nneeds approval goes back to the owner instead. An empty body is fine.\n",
        "x-schedchie-tool": "retry_post",
        "x-schedchie-scope": "posts",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RetryPost"
              },
              "examples": {
                "now": {
                  "value": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post was queued again.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostChange"
                },
                "examples": {
                  "queued": {
                    "value": {
                      "message": "Post queued for retry",
                      "post": {
                        "id": "65c000000000000000000001",
                        "contentPreview": "Launch day",
                        "hashtags": [
                          "launch"
                        ],
                        "accounts": [
                          {
                            "platform": "instagram",
                            "name": "brand.ig",
                            "accountId": "64a1f0e2b3c4d5e6f7a8b9c0"
                          }
                        ],
                        "mediaCount": 1,
                        "publishedCount": 0,
                        "failures": [],
                        "status": "pending",
                        "isPublished": false
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X POST https://api.schedchie.com/v1/posts/65c000000000000000000001/retry \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/posts/65c000000000000000000001/retry\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({}),\n});\nconst post = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.post(\"https://api.schedchie.com/v1/posts/65c000000000000000000001/retry\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"}, json={})\nr.raise_for_status()\npost = r.json()"
          }
        ]
      }
    },
    "/approvals": {
      "get": {
        "tags": [
          "approvals"
        ],
        "operationId": "listApprovals",
        "summary": "List posts waiting for approval",
        "description": "Posts members scheduled that wait for the owner. Approve or reject\neach with `POST /posts/{id}/approve` or `/reject`. The whole list is\nreturned; `nextCursor` is always `null` in v1.\n",
        "x-schedchie-tool": "list_pending_approvals",
        "x-schedchie-scope": "team",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "$ref": "#/components/parameters/ReservedLimit"
          }
        ],
        "responses": {
          "200": {
            "description": "The held posts.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalList"
                },
                "examples": {
                  "one-waiting": {
                    "value": {
                      "data": [
                        {
                          "postId": "65c000000000000000000020",
                          "contentPreview": "Needs a look",
                          "scheduledTime": "2026-12-10T10:00:00.000Z",
                          "accounts": [
                            {
                              "platform": "instagram",
                              "name": "brand.ig"
                            }
                          ],
                          "mediaCount": 0,
                          "createdBy": "ed@example.com",
                          "createdAt": "2026-11-01T00:00:00.000Z"
                        }
                      ],
                      "nextCursor": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/approvals \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/approvals\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst approvals = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/approvals\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\napprovals = r.json()"
          }
        ]
      }
    },
    "/posts/{id}/approve": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PostId"
        }
      ],
      "post": {
        "tags": [
          "approvals"
        ],
        "operationId": "approvePost",
        "summary": "Approve a held post",
        "description": "Releases the post to its scheduled time, or publishes it now when that time has passed.",
        "x-schedchie-tool": "approve_post",
        "x-schedchie-scope": "team",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "responses": {
          "200": {
            "description": "The post was approved.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalDecision"
                },
                "examples": {
                  "approved": {
                    "value": {
                      "ok": true,
                      "publishesImmediately": false,
                      "post": {
                        "_id": "65c000000000000000000020",
                        "universalContent": "Needs a look",
                        "processingStatus": "pending",
                        "isPublished": false,
                        "needsApproval": false,
                        "scheduledTime": "2026-12-10T10:00:00.000Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X POST https://api.schedchie.com/v1/posts/65c000000000000000000001/approve \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/posts/65c000000000000000000001/approve\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst post = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.post(\"https://api.schedchie.com/v1/posts/65c000000000000000000001/approve\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\npost = r.json()"
          }
        ]
      }
    },
    "/posts/{id}/reject": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PostId"
        }
      ],
      "post": {
        "tags": [
          "approvals"
        ],
        "operationId": "rejectPost",
        "summary": "Reject a held post",
        "description": "Sends the post back to the member who scheduled it, with an optional reason they will see.",
        "x-schedchie-tool": "reject_post",
        "x-schedchie-scope": "team",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RejectPost"
              },
              "examples": {
                "with-reason": {
                  "value": {
                    "reason": "Off brand. Please use the approved product photo."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post was rejected.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalDecision"
                },
                "examples": {
                  "rejected": {
                    "value": {
                      "ok": true,
                      "post": {
                        "_id": "65c000000000000000000020",
                        "universalContent": "Needs a look",
                        "processingStatus": "failed",
                        "isPublished": false,
                        "needsApproval": true,
                        "rejectionReason": "Off brand. Please use the approved product photo."
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X POST https://api.schedchie.com/v1/posts/65c000000000000000000001/reject \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"reason\":\"Off brand. Please use the approved product photo.\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/posts/65c000000000000000000001/reject\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"reason\": \"Off brand. Please use the approved product photo.\"\n  }),\n});\nconst post = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.post(\"https://api.schedchie.com/v1/posts/65c000000000000000000001/reject\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"}, json={\n  \"reason\": \"Off brand. Please use the approved product photo.\"\n})\nr.raise_for_status()\npost = r.json()"
          }
        ]
      }
    },
    "/members": {
      "get": {
        "tags": [
          "members"
        ],
        "operationId": "listMembers",
        "summary": "List workspace members",
        "description": "The workspace's members and open invitations. Read only in v1: members\nare invited, changed and removed in the dashboard. The whole list is\nreturned; `nextCursor` is always `null`.\n",
        "x-schedchie-tool": "list_members",
        "x-schedchie-scope": "team",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "$ref": "#/components/parameters/ReservedLimit"
          }
        ],
        "responses": {
          "200": {
            "description": "The members.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberList"
                },
                "examples": {
                  "one-member": {
                    "value": {
                      "data": [
                        {
                          "membershipId": "66d000000000000000000001",
                          "email": "ed@example.com",
                          "status": "active",
                          "allGroups": false,
                          "groups": [
                            {
                              "id": "64b000000000000000000001",
                              "name": "Brand"
                            }
                          ],
                          "needsPostApproval": true,
                          "invitedAt": "2026-04-01T00:00:00.000Z",
                          "acceptedAt": "2026-04-02T00:00:00.000Z"
                        }
                      ],
                      "nextCursor": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/members \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/members\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst members = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/members\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\nmembers = r.json()"
          }
        ]
      }
    },
    "/media/uploads": {
      "post": {
        "tags": [
          "media"
        ],
        "operationId": "createMediaUpload",
        "summary": "Create an upload link",
        "description": "Opens an upload slot and answers a page URL where a file up to 200 MB\ncan be uploaded within 15 minutes (hand it to a person, or open it\nfrom a browser). Then `POST /media/uploads/{slotId}/confirm` and use\nthe returned `media` in a post. To import a file your code already\nhosts, use `POST /media` instead.\n",
        "x-schedchie-tool": "request_media_upload",
        "x-schedchie-scope": "media",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUploadSlot"
              },
              "examples": {
                "video": {
                  "value": {
                    "filename": "launch-reel.mp4",
                    "mimeType": "video/mp4",
                    "size": 48213991
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The slot was created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadSlot"
                },
                "examples": {
                  "created": {
                    "value": {
                      "slotId": "slot_01hv3q8d7zk9",
                      "state": "awaiting_upload",
                      "uploaded": false,
                      "uploadPageUrl": "https://www.schedchie.com/upload/tok_01hv3q8d7zk9",
                      "linkExpiresAt": "2026-11-07T12:15:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X POST https://api.schedchie.com/v1/media/uploads \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"filename\":\"launch-reel.mp4\",\"mimeType\":\"video/mp4\",\"size\":48213991}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/media/uploads\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"filename\": \"launch-reel.mp4\",\n    \"mimeType\": \"video/mp4\",\n    \"size\": 48213991\n  }),\n});\nconst upload = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.post(\"https://api.schedchie.com/v1/media/uploads\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"}, json={\n  \"filename\": \"launch-reel.mp4\",\n  \"mimeType\": \"video/mp4\",\n  \"size\": 48213991\n})\nr.raise_for_status()\nupload = r.json()"
          }
        ]
      }
    },
    "/media/uploads/{slotId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SlotId"
        }
      ],
      "get": {
        "tags": [
          "media"
        ],
        "operationId": "getMediaUpload",
        "summary": "Get an upload's state",
        "description": "`awaiting_upload` until the file arrives, `processing` while it is\nchecked, `ready` with the `media` object to use in a post, or\n`quarantined`, `failed` or `revoked` with the reason.\n",
        "x-schedchie-tool": "get_media_status",
        "x-schedchie-scope": "media",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "responses": {
          "200": {
            "description": "The slot's state.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaStatus"
                },
                "examples": {
                  "ready": {
                    "value": {
                      "slotId": "slot_01hv3q8d7zk9",
                      "filename": "launch-reel.mp4",
                      "mimeType": "video/mp4",
                      "size": 48213991,
                      "state": "ready",
                      "uploaded": true,
                      "media": {
                        "gcsObjectName": "uploads/5c2f0b1e-9a8d-4a1b-9f3e-2b7c6d5e4f30.mp4",
                        "originalName": "launch-reel.mp4",
                        "mimeType": "video/mp4",
                        "size": 48213991,
                        "type": "video"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/media/uploads/slot_01hv3q8d7zk9 \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/media/uploads/slot_01hv3q8d7zk9\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst upload = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/media/uploads/slot_01hv3q8d7zk9\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\nupload = r.json()"
          }
        ]
      }
    },
    "/media/uploads/{slotId}/confirm": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SlotId"
        }
      ],
      "post": {
        "tags": [
          "media"
        ],
        "operationId": "confirmMediaUpload",
        "summary": "Confirm an upload",
        "description": "Tells Schedchie the file has been uploaded to the slot and answers the\n`media` object to put in a post. `size` is optional and checked\nagainst the stored file when given.\n",
        "x-schedchie-tool": "confirm_upload",
        "x-schedchie-scope": "media",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmUpload"
              },
              "examples": {
                "plain": {
                  "value": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The upload is confirmed.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadedMedia"
                },
                "examples": {
                  "confirmed": {
                    "value": {
                      "uploaded": true,
                      "media": {
                        "gcsObjectName": "uploads/5c2f0b1e-9a8d-4a1b-9f3e-2b7c6d5e4f30.mp4",
                        "originalName": "launch-reel.mp4",
                        "mimeType": "video/mp4",
                        "size": 48213991,
                        "type": "video"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X POST https://api.schedchie.com/v1/media/uploads/slot_01hv3q8d7zk9/confirm \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/media/uploads/slot_01hv3q8d7zk9/confirm\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({}),\n});\nconst upload = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.post(\"https://api.schedchie.com/v1/media/uploads/slot_01hv3q8d7zk9/confirm\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"}, json={})\nr.raise_for_status()\nupload = r.json()"
          }
        ]
      }
    },
    "/media": {
      "post": {
        "tags": [
          "media"
        ],
        "operationId": "importMedia",
        "summary": "Import media from a URL",
        "description": "Fetches a public `https` image or video (up to 200 MB; Google Drive\nshare links are accepted) and answers the `media` object to put in a\npost. Private addresses are refused. In v1 only a URL is accepted; use\nthe upload link for files on your side.\n",
        "x-schedchie-tool": "upload_media",
        "x-schedchie-scope": "media",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportMedia"
              },
              "examples": {
                "image": {
                  "value": {
                    "url": "https://cdn.example.com/launch/hero.jpg",
                    "filename": "hero.jpg"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The file was imported.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadedMedia"
                },
                "examples": {
                  "imported": {
                    "value": {
                      "uploaded": true,
                      "media": {
                        "gcsObjectName": "uploads/9b0d2e4f-6a7c-4d8e-b1f2-3c4d5e6f7a80.jpg",
                        "originalName": "hero.jpg",
                        "mimeType": "image/jpeg",
                        "size": 418230,
                        "type": "image",
                        "finalUrlAfterProcessing": "https://storage.schedchie.com/uploads/9b0d2e4f-6a7c-4d8e-b1f2-3c4d5e6f7a80.jpg"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X POST https://api.schedchie.com/v1/media \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\":\"https://cdn.example.com/launch/hero.jpg\",\"filename\":\"hero.jpg\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/media\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"url\": \"https://cdn.example.com/launch/hero.jpg\",\n    \"filename\": \"hero.jpg\"\n  }),\n});\nconst media = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.post(\"https://api.schedchie.com/v1/media\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"}, json={\n  \"url\": \"https://cdn.example.com/launch/hero.jpg\",\n  \"filename\": \"hero.jpg\"\n})\nr.raise_for_status()\nmedia = r.json()"
          }
        ]
      }
    },
    "/notes": {
      "get": {
        "tags": [
          "notes"
        ],
        "operationId": "listNotes",
        "summary": "List notes",
        "description": "Notes in the library, active ones by default. `limit` is the tool's own\nwindow (default 50, max 200); there is no cursor on this route in v1\nand `nextCursor` is always `null`.\n",
        "x-schedchie-tool": "list_notes",
        "x-schedchie-scope": "library",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Note status (default `active`).",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived",
                "converted"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Note type.",
            "schema": {
              "type": "string",
              "enum": [
                "note",
                "idea",
                "draft",
                "reminder"
              ]
            },
            "example": "idea"
          },
          {
            "name": "dateFrom",
            "in": "query",
            "description": "Only notes pinned to a calendar date at or after this (ISO 8601).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "description": "Only notes pinned to a calendar date at or before this (ISO 8601).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "Only notes with at least one of these tags, comma separated.",
            "schema": {
              "type": "string"
            },
            "example": "summer,launch"
          },
          {
            "name": "search",
            "in": "query",
            "description": "Case-insensitive search in title and content.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Notes to return (default 50, max 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The notes.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoteList"
                },
                "examples": {
                  "ideas": {
                    "value": {
                      "data": [
                        {
                          "id": "68f000000000000000000001",
                          "title": "Summer campaign",
                          "content": "Beach shoot",
                          "type": "idea",
                          "status": "active",
                          "tags": [
                            "summer"
                          ],
                          "accountGroups": [],
                          "linkedDate": null
                        }
                      ],
                      "nextCursor": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/notes?type=idea&tags=summer%2Claunch \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/notes?type=idea&tags=summer%2Claunch\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst notes = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/notes?type=idea&tags=summer%2Claunch\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\nnotes = r.json()"
          }
        ]
      },
      "post": {
        "tags": [
          "notes"
        ],
        "operationId": "createNote",
        "summary": "Create a note",
        "x-schedchie-tool": "save_note",
        "x-schedchie-scope": "library",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNote"
              },
              "examples": {
                "plan": {
                  "value": {
                    "title": "Q3 plan",
                    "content": "Three launches, one a month.",
                    "tags": [
                      "plan"
                    ],
                    "color": "blue"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The note was created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Note"
                },
                "examples": {
                  "created": {
                    "value": {
                      "id": "68f000000000000000000002",
                      "title": "Q3 plan",
                      "content": "Three launches, one a month.",
                      "type": "note",
                      "status": "active",
                      "tags": [
                        "plan"
                      ],
                      "color": "blue",
                      "accountGroups": [],
                      "linkedDate": null,
                      "createdAt": "2026-11-07T10:00:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X POST https://api.schedchie.com/v1/notes \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"title\":\"Q3 plan\",\"content\":\"Three launches, one a month.\",\"tags\":[\"plan\"],\"color\":\"blue\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/notes\", {\n  method: \"POST\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"title\": \"Q3 plan\",\n    \"content\": \"Three launches, one a month.\",\n    \"tags\": [\n      \"plan\"\n    ],\n    \"color\": \"blue\"\n  }),\n});\nconst note = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.post(\"https://api.schedchie.com/v1/notes\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"}, json={\n  \"title\": \"Q3 plan\",\n  \"content\": \"Three launches, one a month.\",\n  \"tags\": [\n    \"plan\"\n  ],\n  \"color\": \"blue\"\n})\nr.raise_for_status()\nnote = r.json()"
          }
        ]
      }
    },
    "/notes/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/NoteId"
        }
      ],
      "patch": {
        "tags": [
          "notes"
        ],
        "operationId": "updateNote",
        "summary": "Change a note",
        "description": "Changes the fields you send. `status: archived` archives the note and\n`status: active` restores it; `linkedDate: null` unpins it from the\ncalendar; `linkedLibraryItem: null` unlinks it. Sending the same change\ntwice is harmless.\n",
        "x-schedchie-tool": "save_note",
        "x-schedchie-scope": "library",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNote"
              },
              "examples": {
                "archive": {
                  "value": {
                    "status": "archived"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The note was changed.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Note"
                },
                "examples": {
                  "archived": {
                    "value": {
                      "id": "68f000000000000000000002",
                      "title": "Q3 plan",
                      "content": "Three launches, one a month.",
                      "type": "note",
                      "status": "archived",
                      "tags": [
                        "plan"
                      ],
                      "color": "blue",
                      "accountGroups": [],
                      "linkedDate": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X PATCH https://api.schedchie.com/v1/notes/68f000000000000000000002 \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"status\":\"archived\"}'"
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/notes/68f000000000000000000002\", {\n  method: \"PATCH\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n    \"Content-Type\": \"application/json\",\n  },\n  body: JSON.stringify({\n    \"status\": \"archived\"\n  }),\n});\nconst note = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.patch(\"https://api.schedchie.com/v1/notes/68f000000000000000000002\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"}, json={\n  \"status\": \"archived\"\n})\nr.raise_for_status()\nnote = r.json()"
          }
        ]
      },
      "delete": {
        "tags": [
          "notes"
        ],
        "operationId": "deleteNote",
        "summary": "Delete a note",
        "description": "Removes the note. The method is the confirmation; a second call answers `404`.",
        "x-schedchie-tool": "delete_note",
        "x-schedchie-scope": "library",
        "x-schedchie-read-only-key": false,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": true,
        "responses": {
          "200": {
            "description": "The note was deleted.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                },
                "examples": {
                  "deleted": {
                    "value": {
                      "message": "Note deleted successfully"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl -X DELETE https://api.schedchie.com/v1/notes/68f000000000000000000002 \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/notes/68f000000000000000000002\", {\n  method: \"DELETE\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nif (!res.ok) throw new Error((await res.json()).error.message);"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.delete(\"https://api.schedchie.com/v1/notes/68f000000000000000000002\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()"
          }
        ]
      }
    },
    "/analytics/summary": {
      "get": {
        "tags": [
          "analytics"
        ],
        "operationId": "getAnalyticsSummary",
        "summary": "Workspace summary",
        "description": "Followers and recent post counts per account, from Schedchie's own\nstore. Not a live read: it costs nothing against the live-read budget.\n",
        "x-schedchie-tool": "get_analytics_summary",
        "x-schedchie-scope": "analytics",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "$ref": "#/components/parameters/GroupId"
          }
        ],
        "responses": {
          "200": {
            "description": "The summary.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsSummary"
                },
                "examples": {
                  "one-group": {
                    "value": {
                      "windowDays": 30,
                      "groups": [
                        {
                          "groupId": "64b000000000000000000001",
                          "name": "Brand",
                          "accounts": [
                            {
                              "accountId": "64a1f0e2b3c4d5e6f7a8b9c0",
                              "platform": "instagram",
                              "followers": 1200,
                              "postsLast30Days": 9,
                              "providerState": "deep"
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/analytics/summary \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/analytics/summary\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst summary = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/analytics/summary\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\nsummary = r.json()"
          }
        ]
      }
    },
    "/analytics/overview": {
      "get": {
        "tags": [
          "analytics"
        ],
        "operationId": "getAnalyticsOverview",
        "summary": "Workspace overview for a period",
        "description": "Totals and per-account rows for a date range, read from the social\nplatforms. A live read: cached for 300 s per workspace and counted\nagainst the live-read budget; `X-Schedchie-Cache` says `hit` or `miss`.\n",
        "x-schedchie-tool": "get_analytics_overview",
        "x-schedchie-scope": "analytics",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": true,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "$ref": "#/components/parameters/From"
          },
          {
            "$ref": "#/components/parameters/To"
          },
          {
            "$ref": "#/components/parameters/Days"
          },
          {
            "$ref": "#/components/parameters/Compare"
          },
          {
            "$ref": "#/components/parameters/GroupId"
          }
        ],
        "responses": {
          "200": {
            "description": "The overview.",
            "headers": {
              "X-Schedchie-Cache": {
                "$ref": "#/components/headers/X-Schedchie-Cache"
              },
              "Age": {
                "$ref": "#/components/headers/Age"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsOverview"
                },
                "examples": {
                  "thirty-days": {
                    "value": {
                      "range": {
                        "from": "2026-10-08",
                        "to": "2026-11-07",
                        "days": 30
                      },
                      "totals": {
                        "published": 12,
                        "impressions": 5400,
                        "engagements": 320,
                        "engagementRate": 0.059
                      },
                      "accounts": [
                        {
                          "accountId": "64a1f0e2b3c4d5e6f7a8b9c0",
                          "platform": "instagram",
                          "username": "brand.ig",
                          "providerState": "deep",
                          "followers": 1200,
                          "published": 9,
                          "impressions": 4100,
                          "engagements": 260
                        }
                      ],
                      "notes": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/analytics/overview?days=30 \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/analytics/overview?days=30\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst overview = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/analytics/overview?days=30\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\noverview = r.json()"
          }
        ]
      }
    },
    "/analytics/accounts/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/AccountId"
        }
      ],
      "get": {
        "tags": [
          "analytics"
        ],
        "operationId": "getAccountAnalytics",
        "summary": "One account for a period",
        "description": "KPIs, series, top posts and audience for one account over a date range,\nread from its platform. A live read (see the overview). `compare: true`\nadds the previous period of the same length.\n",
        "x-schedchie-tool": "get_account_analytics",
        "x-schedchie-scope": "analytics",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": true,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "$ref": "#/components/parameters/From"
          },
          {
            "$ref": "#/components/parameters/To"
          },
          {
            "$ref": "#/components/parameters/Days"
          },
          {
            "$ref": "#/components/parameters/Compare"
          }
        ],
        "responses": {
          "200": {
            "description": "The account's analytics.",
            "headers": {
              "X-Schedchie-Cache": {
                "$ref": "#/components/headers/X-Schedchie-Cache"
              },
              "Age": {
                "$ref": "#/components/headers/Age"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountAnalytics"
                },
                "examples": {
                  "instagram": {
                    "value": {
                      "accountId": "64a1f0e2b3c4d5e6f7a8b9c0",
                      "platform": "instagram",
                      "username": "brand.ig",
                      "providerState": "deep",
                      "range": {
                        "from": "2026-10-08",
                        "to": "2026-11-07",
                        "days": 30
                      },
                      "kpis": [
                        {
                          "key": "followers",
                          "label": "Followers",
                          "value": 1200,
                          "change": 35
                        },
                        {
                          "key": "impressions",
                          "label": "Impressions",
                          "value": 4100
                        }
                      ],
                      "series": {
                        "impressions": [
                          {
                            "date": "2026-11-06",
                            "value": 140
                          },
                          {
                            "date": "2026-11-07",
                            "value": 155
                          }
                        ]
                      },
                      "posts": [
                        {
                          "id": 17895695668004550,
                          "publishedAt": "2026-11-05T09:00:00.000Z",
                          "impressions": 900,
                          "likes": 61
                        }
                      ],
                      "postMetricKeys": [
                        "impressions",
                        "likes",
                        "comments"
                      ],
                      "audience": [],
                      "notes": [],
                      "comingSoon": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/analytics/accounts/64a1f0e2b3c4d5e6f7a8b9c0?days=30 \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/analytics/accounts/64a1f0e2b3c4d5e6f7a8b9c0?days=30\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst analytics = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/analytics/accounts/64a1f0e2b3c4d5e6f7a8b9c0?days=30\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\nanalytics = r.json()"
          }
        ]
      }
    },
    "/analytics/accounts/{id}/history": {
      "parameters": [
        {
          "$ref": "#/components/parameters/AccountId"
        }
      ],
      "get": {
        "tags": [
          "analytics"
        ],
        "operationId": "getAccountHistory",
        "summary": "Follower history of an account",
        "description": "Daily snapshots Schedchie stored for the account (followers and the\nnumbers its platform exposes), for the last `days` days. Not a live\nread.\n",
        "x-schedchie-tool": "get_account_history",
        "x-schedchie-scope": "analytics",
        "x-schedchie-read-only-key": true,
        "x-schedchie-live-read": false,
        "x-schedchie-idempotency": false,
        "x-schedchie-destructive": false,
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "Window in days (default 90, max 365).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 90
            },
            "example": 7
          }
        ],
        "responses": {
          "200": {
            "description": "The snapshots.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountHistory"
                },
                "examples": {
                  "week": {
                    "value": {
                      "accountId": "64a1f0e2b3c4d5e6f7a8b9c0",
                      "days": 7,
                      "snapshots": [
                        {
                          "date": "2026-11-01",
                          "followers": 1190
                        },
                        {
                          "date": "2026-11-07",
                          "followers": 1200
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationFailed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/Internal"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "504": {
            "$ref": "#/components/responses/Timeout"
          }
        },
        "x-codeSamples": [
          {
            "lang": "shell",
            "label": "curl",
            "source": "curl https://api.schedchie.com/v1/analytics/accounts/64a1f0e2b3c4d5e6f7a8b9c0/history?days=7 \\\n  -H \"Authorization: Bearer $SCHEDCHIE_API_KEY\""
          },
          {
            "lang": "javascript",
            "label": "Node",
            "source": "const res = await fetch(\"https://api.schedchie.com/v1/analytics/accounts/64a1f0e2b3c4d5e6f7a8b9c0/history?days=7\", {\n  method: \"GET\",\n  headers: {\n    Authorization: `Bearer ${process.env.SCHEDCHIE_API_KEY}`,\n  },\n});\nconst history = await res.json();"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "import os\nimport requests\n\nr = requests.get(\"https://api.schedchie.com/v1/analytics/accounts/64a1f0e2b3c4d5e6f7a8b9c0/history?days=7\", headers={\"Authorization\": f\"Bearer {os.environ['SCHEDCHIE_API_KEY']}\"})\nr.raise_for_status()\nhistory = r.json()"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "schedchie_api_ followed by 64 hex characters",
        "description": "An API key from the Schedchie dashboard (AI assistants). Keys exist on\nUltra and Ultra+, after the first paid invoice; at most 5 active keys\nper workspace (Ultra+: 10). Each key is granted permission groups\n(`posts`, `media`, `analytics`, `team`, `library`, each read and write\nor read only) and acts only in its own workspace.\n"
      }
    },
    "headers": {
      "X-Request-Id": {
        "description": "The id of this request in Schedchie's logs. Quote it when writing to support.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Limit": {
        "description": "Calls allowed in the current minute for the ceiling that is closest to full (this key, or the workspace).",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Remaining": {
        "description": "Calls left in the current minute.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the minute resets.",
        "schema": {
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer"
        }
      },
      "X-Schedchie-Cache": {
        "description": "On live reads, `hit` when the answer came from the 300 s cache, `miss` when it was read from the platform.",
        "schema": {
          "type": "string",
          "enum": [
            "hit",
            "miss"
          ]
        }
      },
      "Age": {
        "description": "On a cache hit, the age of the answer in seconds.",
        "schema": {
          "type": "integer"
        }
      },
      "Idempotent-Replayed": {
        "description": "Present and `true` when the `Idempotency-Key` was seen before and the earlier post is returned.",
        "schema": {
          "type": "boolean"
        }
      },
      "Deprecation": {
        "description": "RFC 9745. Present on every response of a deprecated route or version, with the date the deprecation was announced. Not set on v1 today.",
        "schema": {
          "type": "string"
        }
      },
      "Sunset": {
        "description": "RFC 8594. Present with `Deprecation`, the date after which the route or version stops answering. Not set on v1 today.",
        "schema": {
          "type": "string"
        }
      }
    },
    "parameters": {
      "PostId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The post's id (`_id`, or `id` in list summaries).",
        "schema": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{24}$"
        },
        "example": "65c000000000000000000001"
      },
      "NoteId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The note's id.",
        "schema": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{24}$"
        },
        "example": "68f000000000000000000002"
      },
      "SlotId": {
        "name": "slotId",
        "in": "path",
        "required": true,
        "description": "The upload slot's id, from `POST /media/uploads`.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "example": "slot_01hv3q8d7zk9"
      },
      "AccountId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The social account's `accountId`, from `GET /accounts`.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "example": "64a1f0e2b3c4d5e6f7a8b9c0"
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "description": "The `nextCursor` of the previous page. Leave out for the first page.",
        "schema": {
          "type": "string",
          "maxLength": 200
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "Items per page (default 25, max 100).",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 25
        }
      },
      "ReservedLimit": {
        "name": "limit",
        "in": "query",
        "description": "Accepted and reserved for paging; this route returns the whole list in v1.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "A string of your choice, 1 to 255 characters, unique per post. Repeats\nwith the same key answer the existing post with `200` and\n`Idempotent-Replayed: true`. Keys never expire.\n",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        "example": "launch-2026-12-01-ig-li"
      },
      "From": {
        "name": "from",
        "in": "query",
        "description": "Range start, `YYYY-MM-DD` (UTC). Default is `days` before `to`.",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "To": {
        "name": "to",
        "in": "query",
        "description": "Range end, `YYYY-MM-DD` (UTC), inclusive. Default is today.",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "Days": {
        "name": "days",
        "in": "query",
        "description": "Range length in days when `from` is left out (default 30).",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 366,
          "default": 30
        },
        "example": 30
      },
      "Compare": {
        "name": "compare",
        "in": "query",
        "description": "Also return the previous period of the same length.",
        "schema": {
          "type": "boolean"
        }
      },
      "GroupId": {
        "name": "groupId",
        "in": "query",
        "description": "Narrow to one account group (`group.id` in `GET /accounts`).",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "`400`. `invalid_json`: the body is not JSON. `invalid_arguments`: the\ntool behind the route refused the values (an unknown account id, a\ntime in the wrong format, a caption over a platform's limit).\n`workspace_not_allowed`: a `workspace` field named another workspace.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "invalid-arguments": {
                "value": {
                  "error": {
                    "status": 400,
                    "code": "invalid_arguments",
                    "message": "Invalid arguments: `scheduledTime` must be an ISO 8601 date-time, got \"tomorrow\".",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "`401`. `missing_key`: no `Authorization: Bearer` header. `invalid_key`:\nnot a Schedchie API key, or unknown or revoked. `key_refused`: the key\nwas revoked during the call. The response carries\n`WWW-Authenticate: Bearer realm=\"schedchie-api\"`.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "missing-key": {
                "value": {
                  "error": {
                    "status": 401,
                    "code": "missing_key",
                    "message": "Send your API key as Authorization: Bearer schedchie_api_... Create one in Dashboard, AI assistants.",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "`403`. `not_permitted`: the key was not granted this route's group, is\nread only for it, or is bound to an employee seat that cannot use this\nroute. `plan_required`: the workspace left the Ultra plan.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "read-only-key": {
                "value": {
                  "error": {
                    "status": 403,
                    "code": "not_permitted",
                    "message": "This API key is read only for \"Posts\" (schedchie:posts), and schedule_post changes data. Create a key with Read and write for it.",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "`404`. `not_found`: no resource with that id in this workspace, or no\nsuch route under `/v1`.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "no-such-post": {
                "value": {
                  "error": {
                    "status": 404,
                    "code": "not_found",
                    "message": "No post with id 65c0000000000000000000ff in this workspace.",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "MethodNotAllowed": {
        "description": "`405`. `method_not_allowed`: the path exists, the method does not. `Allow` lists the methods that do.",
        "headers": {
          "Allow": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "wrong-method": {
                "value": {
                  "error": {
                    "status": 405,
                    "code": "method_not_allowed",
                    "message": "Use GET, POST on this route.",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "`413`. `body_too_large`: the request body is over 8 MiB.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "too-large": {
                "value": {
                  "error": {
                    "status": 413,
                    "code": "body_too_large",
                    "message": "The request body is over 8 MB.",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "ValidationFailed": {
        "description": "`422`. `validation_failed`: the body or the query did not match this\nroute's schema; `details` names each field. `tool_error`: the request\nwas well formed and Schedchie or the social platform refused it (a\ncaption too long for a platform, an account that needs reconnecting,\na file the platform does not accept).\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "validation-failed": {
                "value": {
                  "error": {
                    "status": 422,
                    "code": "validation_failed",
                    "message": "The request does not match the schema of POST /posts.",
                    "requestId": "7f3c9a2e5b1d4e8f",
                    "details": [
                      {
                        "field": "accountIds",
                        "message": "\"accountIds\" is a required property"
                      },
                      {
                        "field": "scheduledTime",
                        "message": "12 is not of type \"string\""
                      }
                    ]
                  }
                }
              },
              "tool-error": {
                "value": {
                  "error": {
                    "status": 422,
                    "code": "tool_error",
                    "message": "Instagram refused the post: a caption is limited to 2,200 characters.",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "`429`. `rate_limited`: over 120 calls this minute for this key or for\nthe workspace's keys together, or too many refused requests from one\naddress. `budget_exhausted`: the hour's calls are used up.\n`live_read_budget`: the workspace's uncached live reads this hour are\nused up. `Retry-After` says how long to wait.\n",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "minute": {
                "value": {
                  "error": {
                    "status": 429,
                    "code": "rate_limited",
                    "message": "Too many calls this minute for this key (limit 120 a minute). Retry in 23 s.",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "Internal": {
        "description": "`500`. `internal`: something failed on our side; the message carries a reference for support.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "internal": {
                "value": {
                  "error": {
                    "status": 500,
                    "code": "internal",
                    "message": "internal server error (ref 3f9c1b2a)",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "Unavailable": {
        "description": "`503`. `unavailable`: Schedchie could not verify the key or reach its own API right now. Retry after `Retry-After` seconds.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "unavailable": {
                "value": {
                  "error": {
                    "status": 503,
                    "code": "unavailable",
                    "message": "Schedchie could not verify this API key right now: retry shortly.",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      },
      "Timeout": {
        "description": "`504`. `timeout`: the call did not finish within 15 minutes and was stopped.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "timeout": {
                "value": {
                  "error": {
                    "status": 504,
                    "code": "timeout",
                    "message": "The tool call did not finish within 15 minutes and was stopped.",
                    "requestId": "7f3c9a2e5b1d4e8f"
                  }
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "The one error envelope.",
        "required": [
          "error"
        ],
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "status",
              "code",
              "message",
              "requestId"
            ],
            "additionalProperties": false,
            "properties": {
              "status": {
                "type": "integer",
                "description": "The HTTP status, repeated."
              },
              "code": {
                "type": "string",
                "description": "A stable machine-readable code.",
                "enum": [
                  "invalid_json",
                  "invalid_arguments",
                  "workspace_not_allowed",
                  "missing_key",
                  "invalid_key",
                  "key_refused",
                  "plan_required",
                  "not_permitted",
                  "not_found",
                  "method_not_allowed",
                  "body_too_large",
                  "validation_failed",
                  "tool_error",
                  "rate_limited",
                  "budget_exhausted",
                  "live_read_budget",
                  "unavailable",
                  "timeout",
                  "internal"
                ]
              },
              "message": {
                "type": "string",
                "description": "What went wrong and, where possible, how to fix it."
              },
              "requestId": {
                "type": "string",
                "description": "The same value as the `X-Request-Id` header."
              },
              "details": {
                "type": "array",
                "description": "On `validation_failed`, one entry per field that failed.",
                "items": {
                  "$ref": "#/components/schemas/ErrorDetail"
                }
              }
            }
          }
        }
      },
      "ErrorDetail": {
        "type": "object",
        "required": [
          "field",
          "message"
        ],
        "additionalProperties": false,
        "properties": {
          "field": {
            "type": "string",
            "description": "The field's path in the body (`accountIds`, `media/0/url`) or the query parameter's name; `body` for the whole body."
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Platform": {
        "type": "string",
        "description": "A social platform Schedchie publishes to.",
        "enum": [
          "youtube",
          "instagram",
          "tiktok",
          "facebook",
          "pinterest",
          "threads",
          "bluesky",
          "linkedin",
          "x",
          "googlebusiness",
          "mastodon",
          "telegram",
          "discord",
          "slack",
          "wordpress",
          "devto",
          "hashnode",
          "reddit",
          "dribbble",
          "tumblr",
          "whop",
          "twitch",
          "kick",
          "lemmy",
          "nostr",
          "listmonk",
          "ghost",
          "pixelfed"
        ]
      },
      "Me": {
        "type": "object",
        "description": "The account an API key acts as.",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The workspace owner's user id (the workspace's id)."
          },
          "email": {
            "type": "string"
          },
          "notifyFailedPosts": {
            "type": "boolean"
          },
          "memberOfWorkspaces": {
            "description": "Other workspaces this account is a member of; `null` when memberships are not available on the plan.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "ownerId": {
                  "type": "string"
                },
                "ownerEmail": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                }
              }
            }
          },
          "workspaceOwnerId": {
            "type": "string",
            "description": "For a key bound to an employee seat, the workspace it works in."
          },
          "employeeSeat": {
            "type": "string",
            "description": "For a key bound to an employee seat, the seat's name."
          },
          "seat": {
            "type": "object",
            "description": "For a key bound to an employee seat, the seat."
          }
        }
      },
      "Account": {
        "type": "object",
        "description": "A connected social account.",
        "required": [
          "accountId",
          "platform",
          "connected",
          "tokenExpiry",
          "health",
          "publishBlocked",
          "group"
        ],
        "properties": {
          "accountId": {
            "type": "string",
            "description": "Use this id in `POST /posts` and the analytics routes."
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "username": {
            "type": "string",
            "description": "The account's handle or page name."
          },
          "avatarUrl": {
            "type": "string"
          },
          "connected": {
            "type": "boolean",
            "description": "Whether Schedchie currently holds a working connection."
          },
          "tokenExpiry": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "renews",
                  "fixed",
                  "indefinite",
                  "unknown"
                ]
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              },
              "stale": {
                "type": "boolean"
              }
            }
          },
          "health": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "detectedAt": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "pausedUntil": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "publishBlocked": {
            "type": "boolean",
            "description": "Publishing to this account is paused; `blockedReason` says why."
          },
          "blockedReason": {
            "type": "string"
          },
          "group": {
            "type": "object",
            "description": "The account group the account sits in.",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          }
        }
      },
      "AccountList": {
        "type": "object",
        "required": [
          "data",
          "nextCursor"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            }
          },
          "nextCursor": {
            "type": "null",
            "description": "Always `null` in v1 (the whole list is returned)."
          }
        }
      },
      "PostAccount": {
        "type": "object",
        "description": "One account a post targets.",
        "required": [
          "platform"
        ],
        "properties": {
          "platform": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          }
        }
      },
      "PostFailure": {
        "type": "object",
        "required": [
          "account",
          "error"
        ],
        "properties": {
          "account": {
            "type": "string",
            "description": "`platform:name` of the account that failed."
          },
          "error": {
            "type": "string"
          }
        }
      },
      "PostSummary": {
        "type": "object",
        "description": "A post as the list routes and the change routes return it.",
        "required": [
          "id",
          "contentPreview",
          "hashtags",
          "accounts",
          "mediaCount",
          "publishedCount",
          "failures",
          "isPublished"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "contentPreview": {
            "type": "string",
            "description": "The first 140 characters of the text."
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAccount"
            }
          },
          "mediaCount": {
            "type": "integer"
          },
          "publishedCount": {
            "type": "integer"
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostFailure"
            }
          },
          "status": {
            "type": "string",
            "description": "`pending`, `processing`, `completed`, `failed` or `pending_approval`."
          },
          "isPublished": {
            "type": "boolean"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "needsApproval": {
            "type": "boolean"
          },
          "invalidationReason": {
            "type": "string"
          },
          "partialDelivery": {
            "type": "boolean"
          },
          "deliveryShortfalls": {
            "type": "array"
          },
          "deliveryShortfallNote": {
            "type": "string"
          },
          "storedStatus": {
            "type": "string"
          },
          "storedIsPublished": {
            "type": "boolean"
          },
          "flagCorrected": {
            "type": "boolean"
          },
          "flagCorrectionNote": {
            "type": "string"
          }
        }
      },
      "PostList": {
        "type": "object",
        "required": [
          "data",
          "nextCursor"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostSummary"
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` for the next page; `null` on the last page."
          }
        }
      },
      "PostDetail": {
        "description": "`GET /posts/{id}`: the stored post plus the counts Schedchie adds.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Post"
          },
          {
            "type": "object",
            "required": [
              "successCount",
              "failureCount",
              "recurrence"
            ]
          }
        ]
      },
      "Post": {
        "type": "object",
        "description": "The stored post. `_id` is the id used in paths. `publishResults` holds\none entry per account with `success`, the platform's `publicUrl` when\nit published, or `error` when it failed.\n",
        "required": [
          "_id"
        ],
        "properties": {
          "_id": {
            "type": "string"
          },
          "universalContent": {
            "type": "string",
            "description": "The text."
          },
          "universalHashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "accountPlatformsAndNames": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "accountId": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                }
              }
            }
          },
          "platformSpecificContent": {
            "type": "object",
            "description": "Per-account overrides keyed by `accountId`."
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaInputObject"
            }
          },
          "publishResults": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "accountId": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "success": {
                  "type": "boolean"
                },
                "publicUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "publicUrlNote": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "partial": {
                  "type": "boolean"
                }
              }
            }
          },
          "processingStatus": {
            "type": "string",
            "description": "`pending`, `processing`, `completed`, `failed` or `pending_approval`."
          },
          "isPublished": {
            "type": "boolean"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "needsApproval": {
            "type": "boolean"
          },
          "rejectionReason": {
            "type": "string"
          },
          "rejectionNote": {
            "type": "string"
          },
          "recurrence": {
            "type": [
              "object",
              "null"
            ]
          },
          "successCount": {
            "type": "integer"
          },
          "failureCount": {
            "type": "integer"
          },
          "partialDelivery": {
            "type": "boolean"
          },
          "partialDeliveryNote": {
            "type": "string"
          },
          "partialFailure": {
            "type": "boolean"
          },
          "partialFailureNote": {
            "type": "string"
          },
          "storedStatus": {
            "type": "string"
          },
          "storedIsPublished": {
            "type": "boolean"
          },
          "flagCorrected": {
            "type": "boolean"
          },
          "flagCorrectionNote": {
            "type": "string"
          }
        }
      },
      "MediaInputObject": {
        "type": "object",
        "description": "A media object as returned by the media routes (`gcsObjectName` is the one field that matters).",
        "required": [
          "gcsObjectName"
        ],
        "properties": {
          "gcsObjectName": {
            "type": "string"
          },
          "blobName": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "originalName": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ]
          },
          "finalUrlAfterProcessing": {
            "type": "string"
          },
          "cover": {
            "type": "object",
            "description": "A cover frame or image for a video.",
            "properties": {
              "gcsObjectName": {
                "type": "string"
              },
              "blobName": {
                "type": "string"
              },
              "offsetMs": {
                "type": "integer"
              }
            }
          }
        }
      },
      "MediaInput": {
        "description": "A `media` object from `POST /media`, `POST /media/uploads/{slotId}/confirm` or `GET /media/uploads/{slotId}`, or just its `gcsObjectName`.",
        "oneOf": [
          {
            "type": "string",
            "minLength": 1,
            "description": "The `gcsObjectName` alone."
          },
          {
            "$ref": "#/components/schemas/MediaInputObject"
          }
        ]
      },
      "CreatePost": {
        "type": "object",
        "required": [
          "text",
          "accountIds",
          "scheduledTime"
        ],
        "additionalProperties": false,
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "description": "The post's text, for every account unless overridden in `platformSpecificContent`."
          },
          "accountIds": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            },
            "description": "`accountId` values from `GET /accounts`."
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time",
            "description": "When to publish, ISO 8601 in UTC (`2026-12-01T09:00:00.000Z`). A time in the past publishes within a minute."
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Hashtags for every account, with or without `#`."
          },
          "platformSpecificContent": {
            "type": "object",
            "description": "Per-account overrides keyed by `accountId`. Fields are prefixed with\nthe platform: `youtube_title`, `youtube_privacyStatus`,\n`tiktok_privacyStatus`, `instagram_first_comment`,\n`linkedin_first_comment`, `pinterest_boardId`, and so on.\n",
            "additionalProperties": {
              "type": "object"
            }
          },
          "media": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/MediaInput"
            },
            "description": "Media for every selected account."
          }
        }
      },
      "ScheduledPost": {
        "type": "object",
        "description": "The acknowledgement of a scheduled post. Fetch the full post with `GET /posts/{postId}`.",
        "required": [
          "postId",
          "processingStatus",
          "scheduledFor",
          "accounts"
        ],
        "properties": {
          "postId": {
            "type": "string",
            "description": "The new post's id."
          },
          "processingStatus": {
            "type": "string",
            "description": "`pending`, or `pending_approval` when a member scheduled it and the owner must approve."
          },
          "message": {
            "type": "string"
          },
          "scheduledFor": {
            "type": "string",
            "format": "date-time",
            "description": "The `scheduledTime` as accepted."
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`platform:name` of every account the post targets."
          },
          "mediaCount": {
            "type": "integer"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "accountId": {
                  "type": "string"
                }
              }
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What Schedchie adjusted per platform (a trimmed title, a first comment moved)."
          },
          "duplicate": {
            "type": "boolean",
            "description": "`true` on a replayed `Idempotency-Key`: this is the post made by the earlier call."
          }
        }
      },
      "UpdatePost": {
        "type": "object",
        "minProperties": 1,
        "additionalProperties": false,
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "accountIds": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "platformSpecificContent": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaInput"
            }
          }
        }
      },
      "PostChange": {
        "type": "object",
        "description": "The result of a change to one post.",
        "additionalProperties": false,
        "properties": {
          "message": {
            "type": "string"
          },
          "post": {
            "$ref": "#/components/schemas/PostSummary"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ReschedulePost": {
        "type": "object",
        "required": [
          "scheduledTime"
        ],
        "additionalProperties": false,
        "properties": {
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RetryPost": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "scheduledTime": {
            "type": "string",
            "format": "date-time",
            "description": "When to publish; leave out to publish now."
          }
        }
      },
      "Deleted": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "Approval": {
        "type": "object",
        "description": "A post waiting for the owner.",
        "required": [
          "postId",
          "contentPreview",
          "accounts",
          "mediaCount"
        ],
        "properties": {
          "postId": {
            "type": "string"
          },
          "contentPreview": {
            "type": "string"
          },
          "scheduledTime": {
            "type": "string",
            "format": "date-time"
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "platform": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "mediaCount": {
            "type": "integer"
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "The email of the member who scheduled it."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApprovalList": {
        "type": "object",
        "required": [
          "data",
          "nextCursor"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Approval"
            }
          },
          "nextCursor": {
            "type": "null"
          }
        }
      },
      "RejectPost": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "description": "Shown to the member who scheduled the post."
          }
        }
      },
      "ApprovalDecision": {
        "type": "object",
        "required": [
          "ok",
          "post"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "post": {
            "$ref": "#/components/schemas/Post"
          },
          "publishesImmediately": {
            "type": "boolean",
            "description": "On approve, `true` when the scheduled time has passed and the post publishes now."
          }
        }
      },
      "Member": {
        "type": "object",
        "required": [
          "membershipId",
          "email",
          "status",
          "allGroups",
          "groups",
          "needsPostApproval"
        ],
        "properties": {
          "membershipId": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "invited",
              "active"
            ]
          },
          "allGroups": {
            "type": "boolean",
            "description": "The member sees every account group."
          },
          "groups": {
            "type": "array",
            "description": "The groups the member sees when `allGroups` is false.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "needsPostApproval": {
            "type": "boolean",
            "description": "The member's posts wait for the owner."
          },
          "canShareReviewLinks": {
            "type": "boolean"
          },
          "usable": {
            "type": "boolean"
          },
          "invitedAt": {
            "type": "string",
            "format": "date-time"
          },
          "acceptedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "MemberList": {
        "type": "object",
        "required": [
          "data",
          "nextCursor"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          },
          "nextCursor": {
            "type": "null"
          }
        }
      },
      "CreateUploadSlot": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "filename": {
            "type": "string",
            "description": "A hint; the file's own name is kept when it arrives."
          },
          "mimeType": {
            "type": "string",
            "description": "`image/*` or `video/*`."
          },
          "size": {
            "type": "integer",
            "minimum": 0,
            "description": "Byte count, when known."
          },
          "purpose": {
            "type": "string",
            "description": "Echoed back in the answer."
          }
        }
      },
      "UploadSlot": {
        "type": "object",
        "required": [
          "slotId",
          "state",
          "uploaded",
          "uploadPageUrl"
        ],
        "properties": {
          "slotId": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "awaiting_upload"
            ]
          },
          "uploaded": {
            "type": "boolean"
          },
          "uploadPageUrl": {
            "type": "string",
            "format": "uri",
            "description": "The page where the file is uploaded. Valid until `linkExpiresAt`."
          },
          "linkExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "purpose": {
            "type": "string"
          }
        }
      },
      "ConfirmUpload": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "size": {
            "type": "integer",
            "minimum": 0,
            "description": "The file's byte count, checked against the upload."
          }
        }
      },
      "Media": {
        "type": "object",
        "description": "A stored media file, ready to be put in a post as is.",
        "required": [
          "gcsObjectName",
          "mimeType"
        ],
        "properties": {
          "gcsObjectName": {
            "type": "string"
          },
          "originalName": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ]
          },
          "finalUrlAfterProcessing": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "UploadedMedia": {
        "type": "object",
        "required": [
          "uploaded",
          "media"
        ],
        "properties": {
          "uploaded": {
            "type": "boolean"
          },
          "media": {
            "$ref": "#/components/schemas/Media"
          }
        }
      },
      "MediaStatus": {
        "type": "object",
        "required": [
          "state",
          "uploaded"
        ],
        "properties": {
          "slotId": {
            "type": "string"
          },
          "filename": {
            "type": [
              "string",
              "null"
            ]
          },
          "mimeType": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "state": {
            "type": "string",
            "enum": [
              "awaiting_upload",
              "processing",
              "ready",
              "quarantined",
              "failed",
              "revoked"
            ]
          },
          "uploaded": {
            "type": "boolean",
            "description": "`true` only when `state` is `ready`."
          },
          "media": {
            "$ref": "#/components/schemas/Media"
          },
          "hint": {
            "type": "string"
          },
          "rejectReason": {
            "type": "string",
            "description": "When `quarantined`."
          },
          "message": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "description": "When `failed`."
          }
        }
      },
      "ImportMedia": {
        "type": "object",
        "required": [
          "url"
        ],
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "A public `https` URL of an image or video, up to 200 MB."
          },
          "filename": {
            "type": "string",
            "description": "The name to store the file under; the URL's last segment otherwise."
          },
          "mimeType": {
            "type": "string",
            "description": "`image/*` or `video/*`, when the server does not say."
          }
        }
      },
      "Note": {
        "type": "object",
        "required": [
          "id",
          "content",
          "tags",
          "accountGroups",
          "linkedDate"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "note",
              "idea",
              "draft",
              "reminder"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived",
              "converted"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "idea",
              "drafting",
              "done"
            ]
          },
          "order": {
            "type": "integer"
          },
          "pinned": {
            "type": "boolean"
          },
          "linkedDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "The calendar date the note is pinned to."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "color": {
            "type": "string",
            "enum": [
              "yellow",
              "blue",
              "green",
              "purple",
              "pink",
              "orange"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "accountGroups": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                }
              ]
            }
          },
          "linkedPost": {},
          "linkedLibraryItem": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "NoteList": {
        "type": "object",
        "required": [
          "data",
          "nextCursor"
        ],
        "additionalProperties": false,
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Note"
            }
          },
          "nextCursor": {
            "type": "null"
          }
        }
      },
      "CreateNote": {
        "type": "object",
        "required": [
          "title"
        ],
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "content": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "note",
              "idea",
              "draft",
              "reminder"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "idea",
              "drafting",
              "done"
            ]
          },
          "order": {
            "type": "integer",
            "minimum": 0
          },
          "pinned": {
            "type": "boolean"
          },
          "linkedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Pin the note to a calendar date."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "color": {
            "type": "string",
            "enum": [
              "yellow",
              "blue",
              "green",
              "purple",
              "pink",
              "orange"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "accountGroups": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Account group ids (`group.id` in `GET /accounts`)."
          },
          "linkedLibraryItem": {
            "type": "string"
          }
        }
      },
      "UpdateNote": {
        "type": "object",
        "minProperties": 1,
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "content": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "note",
              "idea",
              "draft",
              "reminder"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived",
              "converted"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "idea",
              "drafting",
              "done"
            ]
          },
          "order": {
            "type": "integer",
            "minimum": 0
          },
          "pinned": {
            "type": "boolean"
          },
          "linkedDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "`null` unpins the note from the calendar."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "color": {
            "type": "string",
            "enum": [
              "yellow",
              "blue",
              "green",
              "purple",
              "pink",
              "orange"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "accountGroups": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "linkedLibraryItem": {
            "type": [
              "string",
              "null"
            ],
            "description": "`null` unlinks the note from its library item."
          }
        }
      },
      "AnalyticsSummary": {
        "type": "object",
        "required": [
          "groups"
        ],
        "properties": {
          "windowDays": {
            "type": "integer"
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "groupId",
                "accounts"
              ],
              "properties": {
                "groupId": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "accounts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "accountId",
                      "platform"
                    ],
                    "properties": {
                      "accountId": {
                        "type": "string"
                      },
                      "platform": {
                        "type": "string"
                      },
                      "followers": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "postsLast30Days": {
                        "type": "integer"
                      },
                      "providerState": {
                        "type": "string",
                        "description": "`deep` (full platform metrics), `basic` or `activity_only`."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "AnalyticsRange": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "days": {
            "type": "integer"
          },
          "previous": {
            "type": "object",
            "description": "The comparison period, when `compare` was set."
          }
        }
      },
      "AnalyticsOverview": {
        "type": "object",
        "required": [
          "range",
          "totals",
          "accounts"
        ],
        "properties": {
          "range": {
            "$ref": "#/components/schemas/AnalyticsRange"
          },
          "totals": {
            "type": "object",
            "description": "Workspace totals for the period; keys depend on the connected platforms."
          },
          "accounts": {
            "type": "array",
            "description": "One row per account.",
            "items": {
              "type": "object",
              "properties": {
                "accountId": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                },
                "providerState": {
                  "type": "string"
                },
                "followers": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "published": {
                  "type": "integer"
                },
                "impressions": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "engagements": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              }
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AccountAnalytics": {
        "type": "object",
        "required": [
          "accountId",
          "platform"
        ],
        "properties": {
          "accountId": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "providerState": {
            "type": "string"
          },
          "range": {
            "$ref": "#/components/schemas/AnalyticsRange"
          },
          "kpis": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "value": {},
                "change": {}
              }
            }
          },
          "series": {
            "type": "object",
            "description": "Daily series keyed by metric."
          },
          "posts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "postMetricKeys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "audience": {
            "type": "array"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "comingSoon": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "access": {
            "type": "object",
            "description": "Why the platform's numbers are missing, when they are (`permissions_required`, `reconnect_required`, `unavailable`).",
            "properties": {
              "state": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "missingScopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "expectedState": {
            "type": "string"
          }
        }
      },
      "AccountHistory": {
        "type": "object",
        "required": [
          "accountId",
          "days",
          "snapshots"
        ],
        "properties": {
          "accountId": {
            "type": "string"
          },
          "days": {
            "type": "integer"
          },
          "snapshots": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "date"
              ],
              "properties": {
                "date": {
                  "type": "string"
                },
                "followers": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
