{
  "openapi": "3.1.0",
  "info": {
    "title": "Postozo public API",
    "version": "1.0.0",
    "description": "Schedule social media posts. The same paths and bodies as the Postiz public API. Guide: https://postozo.com/docs/api/",
    "contact": {
      "name": "Postozo support",
      "email": "support@postozo.com",
      "url": "https://postozo.com/docs/"
    }
  },
  "servers": [
    {
      "url": "https://app.postozo.com/public/v1"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Account",
      "description": "Check your key."
    },
    {
      "name": "Channels and customers",
      "description": "The social accounts connected to your workspace, and the customers (clients) they belong to."
    },
    {
      "name": "Media",
      "description": "Upload images and videos to use in posts."
    },
    {
      "name": "Posts",
      "description": "Create, read, move, retry and delete posts."
    },
    {
      "name": "Analytics",
      "description": "Statistics for channels and published posts, where the network shares them."
    },
    {
      "name": "Notifications and networks",
      "description": "Workspace notifications and the rules of every network."
    }
  ],
  "paths": {
    "/is-connected": {
      "get": {
        "operationId": "isConnected",
        "summary": "Check that your key works",
        "description": "Answers {\"connected\": true} when the key is valid. Use it to test a new key or a connection in an automation tool.",
        "tags": [
          "Account"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Check that your key works",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connected": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "connected": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/integrations": {
      "get": {
        "operationId": "listIntegrations",
        "summary": "List connected channels",
        "description": "Every channel (a connected account, Page or profile) in the workspace. Use the id as the channel id in posts. customer is only there when the channel belongs to a customer.",
        "tags": [
          "Channels and customers"
        ],
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "Only channels of this customer id (Postiz calls customers \"groups\").",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "identifier is the network id (see GET /networks). refreshNeeded or inBetweenSteps true means the channel must be reconnected in the app before it can post. disabled true means it is switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "identifier": {
                        "type": "string"
                      },
                      "picture": {},
                      "disabled": {
                        "type": "boolean"
                      },
                      "refreshNeeded": {
                        "type": "boolean"
                      },
                      "inBetweenSteps": {
                        "type": "boolean"
                      },
                      "profile": {
                        "type": "string"
                      },
                      "customer": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "de53f029-255d-4104-b090-974efcca2c86",
                    "name": "acme",
                    "identifier": "demo",
                    "picture": null,
                    "disabled": false,
                    "refreshNeeded": false,
                    "inBetweenSteps": false,
                    "profile": "acme",
                    "customer": {
                      "id": "c62b4bac-2eac-4174-aeb3-2265c1355be7",
                      "name": "Bean There Cafe"
                    }
                  },
                  {
                    "id": "f451da5e-2cd3-4674-bbbb-dc6bc5e12b55",
                    "name": "acme-news",
                    "identifier": "demo",
                    "picture": null,
                    "disabled": false,
                    "refreshNeeded": false,
                    "inBetweenSteps": false,
                    "profile": "acme-news"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/groups": {
      "get": {
        "operationId": "listGroups",
        "summary": "List customers",
        "description": "Customers group channels, for example 1 customer per client of an agency. Sorted by name.",
        "tags": [
          "Channels and customers"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "List customers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "c62b4bac-2eac-4174-aeb3-2265c1355be7",
                    "name": "Bean There Cafe"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/integration-settings/{id}": {
      "get": {
        "operationId": "integrationSettings",
        "summary": "Rules and settings for 1 channel",
        "description": "The posting rules of the channel's network: the character limit, whether it needs media, how many files a post may have, whether follow-up comments work, the settings a post can carry (some are required, for example a title on YouTube) and the helper tools you can run with POST /integration-trigger/{id}. Read this before you post to a network for the first time.",
        "tags": [
          "Channels and customers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Channel id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "needs is null, \"media\" (at least 1 photo or video) or \"video\". settings is the text \"No additional settings required\" when the network has none. Each setting has a key to use in the post's settings, a type (text, select, toggle, date and others) and required when it must be filled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "output": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "string"
                        },
                        "maxLength": {
                          "type": "integer"
                        },
                        "needs": {},
                        "maxMedia": {
                          "type": "integer"
                        },
                        "comments": {
                          "type": "boolean"
                        },
                        "settings": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "options": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "help": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "methodName": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "dataSchema": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "output": {
                    "rules": "Demo network for testing. Max 1000 characters. Supports threads and media.",
                    "maxLength": 1000,
                    "needs": null,
                    "maxMedia": 10,
                    "comments": true,
                    "settings": [
                      {
                        "key": "audience",
                        "label": "Audience",
                        "type": "select",
                        "options": [
                          "Everyone",
                          "Followers"
                        ],
                        "help": "Only for testing settings."
                      }
                    ],
                    "tools": [
                      {
                        "methodName": "echo",
                        "description": "Returns what you send. For testing tool calls.",
                        "dataSchema": [
                          {
                            "key": "text",
                            "type": "string",
                            "description": "Any text"
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/integration-trigger/{id}": {
      "post": {
        "operationId": "integrationTrigger",
        "summary": "Run a network helper tool",
        "description": "Some settings need a value from the network, for example a Pinterest board or a Reddit flair. The tools for a channel are listed in GET /integration-settings/{id} under tools.",
        "tags": [
          "Channels and customers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Channel id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "output is whatever the tool returns, for example a list of boards.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "output": {
                      "type": "object",
                      "properties": {
                        "echo": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "output": {
                    "echo": "hi"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "methodName": {
                    "type": "string",
                    "description": "The tool name (methodName from the settings answer)."
                  },
                  "data": {
                    "type": "object",
                    "description": "Input for the tool, keys from its dataSchema."
                  }
                },
                "required": [
                  "methodName"
                ]
              },
              "example": {
                "methodName": "echo",
                "data": {
                  "text": "hi"
                }
              }
            }
          }
        }
      }
    },
    "/social/{integration}": {
      "get": {
        "operationId": "socialConnect",
        "summary": "Get a sign-in link to connect a channel",
        "description": "Returns the network's sign-in address. Open it in a browser, sign in to the network and allow access; the new channel then appears in the workspace. Only for networks that connect with a sign-in link. Networks that connect with a form (Bluesky, Mastodon, Telegram and others) return 400; connect those in the app. The link only works when the server has keys for that network. Without them the answer is 400 with a message that says which keys are missing.",
        "tags": [
          "Channels and customers"
        ],
        "parameters": [
          {
            "name": "integration",
            "in": "path",
            "required": true,
            "description": "Network id, for example x or linkedin-page (see GET /networks).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "Put the new channel under this customer id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "description": "Channel id to reconnect instead of adding a new channel.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a sign-in link to connect a channel",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "url": "https://x.com/i/oauth2/authorize?response_type=code&client_id=YOUR_X_CLIENT_ID&redirect_uri=https%3A%2F%2Fapp.postozo.com%2Fintegrations%2Fsocial%2Fx&scope=tweet.read+tweet.write+users.read+offline.access+media.write+like.read&state=OvsF9Xk5X4HuLRulFx90tuUx&code_challenge=SNCg1EXirhq2ueAp5gifrqkwsl9uVOy42lEiL1hxEFA&code_challenge_method=S256"
                }
              }
            }
          },
          "400": {
            "description": "A network that connects with a form",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A plain message."
                    },
                    "msg": {
                      "type": "string",
                      "description": "The same message (Postiz name)."
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "fix": {
                      "type": "string",
                      "description": "What to do, on some errors."
                    },
                    "code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error",
                    "msg"
                  ]
                },
                "example": {
                  "error": "This network connects with a form, not a link. Use the app to connect it.",
                  "msg": "This network connects with a form, not a link. Use the app to connect it."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/integrations/{id}": {
      "delete": {
        "operationId": "deleteIntegration",
        "summary": "Disconnect a channel",
        "description": "Removes the channel. Its drafts, queued, failed and unconfirmed posts are deleted too. Posts that are already live stay on the network. Needs an owner or admin key (the workspace API key counts as admin).",
        "tags": [
          "Channels and customers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Channel id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Disconnect a channel",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/upload": {
      "post": {
        "operationId": "upload",
        "summary": "Upload a file",
        "description": "Send 1 image or video as multipart form data in the field file. Accepted: JPG, PNG, GIF, WEBP, MP4, MOV and WEBM. The type is read from the file itself, not the name. Use the returned id (and path) in a post.",
        "tags": [
          "Media"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "path is the public address of the file. thumbnail is the same address for images and null for videos.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "originalName": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "thumbnail": {
                      "type": "string"
                    },
                    "alt": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d",
                  "name": "photo.png",
                  "originalName": "photo.png",
                  "path": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                  "thumbnail": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                  "alt": "",
                  "type": "image",
                  "status": "ready"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "The image or video.",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        }
      }
    },
    "/upload-from-url": {
      "post": {
        "operationId": "uploadFromUrl",
        "summary": "Import a file from a public URL",
        "description": "Downloads an image or video from a public http or https address into the media library. The address must open the file itself, not a page about it. Addresses on private networks are refused.",
        "tags": [
          "Media"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "The file name is taken from the last part of the address.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "originalName": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "thumbnail": {
                      "type": "string"
                    },
                    "alt": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "0b6914a1-8a0c-4d05-a4d6-1caacd698cbf",
                  "name": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                  "originalName": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                  "path": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                  "thumbnail": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                  "alt": "",
                  "type": "image",
                  "status": "ready"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Public address of the file."
                  }
                },
                "required": [
                  "url"
                ]
              },
              "example": {
                "url": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png"
              }
            }
          }
        }
      }
    },
    "/media": {
      "get": {
        "operationId": "listMedia",
        "summary": "List the media library",
        "description": "Files in the workspace library, newest first, 40 per page. Client members get an empty list.",
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number, starting at 1. Default 1.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Only files whose name or alt text contains this text.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "There is no total count. When a page has fewer than 40 files, it is the last page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "originalName": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      },
                      "thumbnail": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d",
                    "name": "photo.png",
                    "originalName": "photo.png",
                    "path": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                    "thumbnail": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                    "alt": "",
                    "type": "image",
                    "status": "ready"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/find-slot": {
      "get": {
        "operationId": "findSlot",
        "summary": "Next free time for any channel",
        "description": "The next free posting time across all channels. It uses the posting times set on each channel (9:00 when none are set). Posting times are times of day in local time: the tzOffsetMinutes you send, or else the time zone in the profile of the person the key belongs to (for the workspace API key: the owner; UTC when none is set; daylight saving time is followed). It skips times that already have a queued or draft post on those channels, starts at least 5 minutes from now and looks 90 days ahead. The MCP tool find_free_slot gives the same answer for the same input.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "tzOffsetMinutes",
            "in": "query",
            "required": false,
            "description": "Your time zone as minutes to add to UTC to get local time, from -840 to 840: 330 for India (UTC+5:30), -300 for New York in winter. Leave it out to use the profile time zone. Another value gives 400.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The date is UTC. In the example, a channel posting time of 9:00 in India (UTC+5:30) is 03:30 UTC.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "date": "2026-10-01T03:30:00.000Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/find-slot/{id}": {
      "get": {
        "operationId": "findSlotChannel",
        "summary": "Next free time for 1 channel",
        "description": "Same as GET /find-slot, for 1 channel.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Channel id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tzOffsetMinutes",
            "in": "query",
            "required": false,
            "description": "Minutes to add to UTC to get local time, as in GET /find-slot. Default: the profile time zone.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The example workspace has its profile time zone set to UTC, so 9:00 is 09:00 UTC.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "date": "2026-09-30T09:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "An id that is not an id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A plain message."
                    },
                    "msg": {
                      "type": "string",
                      "description": "The same message (Postiz name)."
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "fix": {
                      "type": "string",
                      "description": "What to do, on some errors."
                    },
                    "code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error",
                    "msg"
                  ]
                },
                "example": {
                  "error": "One of the ids is not valid.",
                  "msg": "One of the ids is not valid.",
                  "fix": "Check the id. Copy it again from the list it came from."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/posts": {
      "get": {
        "operationId": "listPosts",
        "summary": "List posts between 2 dates",
        "description": "Returns 1 row per channel for every post whose time falls between startDate and endDate, oldest first. Follow-up comments are not listed; read them with GET /posts/{id}. There is no paging: ask for a shorter date range to get fewer rows.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date. Default: 30 days ago.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date. Default: 30 days from now.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "Only posts on channels of this customer id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "state is the Postiz value: DRAFT, QUEUE (queued, publishing or waiting for the network), PUBLISHED or ERROR (failed or could not be confirmed). status is the exact state: draft, queued, publishing, pending, published, error or unconfirmed. error is { \"message\", \"fix\" } when the post failed. id is the per-channel post id and group the id of the whole post.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "content": {
                            "type": "string"
                          },
                          "publishDate": {
                            "type": "string"
                          },
                          "releaseURL": {},
                          "releaseId": {},
                          "state": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "error": {},
                          "intervalInDays": {},
                          "group": {
                            "type": "string"
                          },
                          "creationMethod": {
                            "type": "string"
                          },
                          "settings": {
                            "type": "object",
                            "properties": {
                              "__type": {
                                "type": "string"
                              },
                              "audience": {
                                "type": "string"
                              }
                            }
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "tag": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "color": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "image": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "path": {
                                  "type": "string"
                                },
                                "alt": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "integration": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "providerIdentifier": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "picture": {}
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "posts": [
                    {
                      "id": "5001b946-c142-4ab7-b376-188c71272521",
                      "content": "Main post",
                      "publishDate": "2026-10-01T09:30:00.000Z",
                      "releaseURL": null,
                      "releaseId": null,
                      "state": "QUEUE",
                      "status": "queued",
                      "error": null,
                      "intervalInDays": null,
                      "group": "98c49d36-7dfd-439b-a857-e9a8e7e3f4a2",
                      "creationMethod": "API",
                      "settings": {
                        "__type": "demo",
                        "audience": "Followers"
                      },
                      "tags": [
                        {
                          "tag": {
                            "id": "48bae191-d9eb-4adb-9ee0-be9c797a8f16",
                            "name": "Launch",
                            "color": "#612bd3"
                          }
                        }
                      ],
                      "image": [
                        {
                          "id": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d",
                          "path": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                          "alt": ""
                        }
                      ],
                      "integration": {
                        "id": "de53f029-255d-4104-b090-974efcca2c86",
                        "providerIdentifier": "demo",
                        "name": "acme",
                        "picture": null
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      },
      "post": {
        "operationId": "createPost",
        "summary": "Create or edit a post",
        "description": "Creates 1 post for 1 or more channels. The body is the Postiz body: 1 entry in posts per channel, each with its own text in value. The 1st item of value is the post, the next items are follow-up comments (a thread on X, Threads, Bluesky and Mastodon) posted after it, each delay minutes after the one before. HTML in content is turned into plain text. Every channel is checked against its network's rules before anything is saved; on a problem nothing is saved and the answer is 400 with a list in errors. To edit a post, send the same body with groupId (or group in a posts entry): channels that are already published or publishing are kept as they are. Limit: 90 requests an hour per workspace on this endpoint (replays with an Idempotency-Key count too); over it the answer is 429 with a Retry-After header. Idempotency-Key: the key is kept for 24 hours per workspace. The same key with the same body (the order of the JSON keys does not matter) returns the first answer. The same key with a different body is 409. While the first request is still running, a 2nd 1 with the same key is 409 \"A request with this Idempotency-Key is still running.\" Only answers that worked are kept: when the first request fails (for example 400), nothing is kept and you can fix the body and send the same key again. Without the header, 2 requests make 2 posts. A post is never sent twice to a network: if the network does not answer, the post is checked on the network or marked \"could not confirm\" instead of being sent again.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Any unique value up to 255 characters, for example a UUID. Send the same key again (same workspace, same body, within 24 hours) and you get the first answer again instead of a 2nd post. See the notes below.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "1 row per channel. postId is the per-channel post id, group the id of the whole post (use either in the other post endpoints), status the channel state (draft or queued), and previewUrl a link anyone can open to see the post and, for review posts, approve it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "postId": {
                        "type": "string"
                      },
                      "group": {
                        "type": "string"
                      },
                      "integration": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "previewUrl": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "postId": "5001b946-c142-4ab7-b376-188c71272521",
                    "group": "98c49d36-7dfd-439b-a857-e9a8e7e3f4a2",
                    "integration": "de53f029-255d-4104-b090-974efcca2c86",
                    "status": "queued",
                    "previewUrl": "https://app.postozo.com/p/98c49d36-7dfd-439b-a857-e9a8e7e3f4a2?t=662b7122e80a48658ffbc75ededf1efc"
                  }
                ]
              }
            }
          },
          "400": {
            "description": "A post that breaks a network rule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A plain message."
                    },
                    "msg": {
                      "type": "string",
                      "description": "The same message (Postiz name)."
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "fix": {
                      "type": "string",
                      "description": "What to do, on some errors."
                    },
                    "code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error",
                    "msg"
                  ]
                },
                "example": {
                  "error": "Please fix these before saving.",
                  "msg": "Please fix these before saving.",
                  "errors": [
                    {
                      "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                      "channelName": "acme (Demo)",
                      "message": "acme (Demo): the post is too long, 1200 of 1000 characters."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "409": {
            "description": "The same Idempotency-Key with a different body",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "A plain message."
                    },
                    "msg": {
                      "type": "string",
                      "description": "The same message (Postiz name)."
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "fix": {
                      "type": "string",
                      "description": "What to do, on some errors."
                    },
                    "code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error",
                    "msg"
                  ]
                },
                "example": {
                  "error": "This Idempotency-Key was already used with a different request body.",
                  "msg": "This Idempotency-Key was already used with a different request body.",
                  "code": "idempotency_key_reused",
                  "fix": "Use a new Idempotency-Key for a new post. Send the same key only to repeat the same request."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "draft (save only), schedule (publish at date), now (publish right away) or review (send to the client for approval first). Default schedule. Posts for a customer with approval turned on go to review even with schedule.",
                    "enum": [
                      "draft",
                      "schedule",
                      "now",
                      "review"
                    ]
                  },
                  "date": {
                    "type": "string",
                    "description": "When to publish, ISO 8601 with a time zone, for example 2026-10-01T09:30:00+05:30. Ignored for now. When left out, the current time is used. For schedule and review it cannot be more than 1 minute in the past."
                  },
                  "posts": {
                    "type": "array",
                    "description": "1 entry per channel.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "integration": {
                          "type": "object",
                          "description": "The channel: { \"id\": \"CHANNEL_ID\" }. channelId at the entry level also works.",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Channel id."
                            }
                          },
                          "required": [
                            "id"
                          ]
                        },
                        "value": {
                          "type": "array",
                          "description": "The post, then its follow-up comments, in order.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "content": {
                                "type": "string",
                                "description": "The text. HTML is turned into plain text."
                              },
                              "image": {
                                "type": "array",
                                "description": "Media from POST /upload: [{ \"id\": \"MEDIA_ID\" }]. path and alt are also read. media works too."
                              },
                              "delay": {
                                "type": "number",
                                "description": "Minutes to wait after the item before. Ignored on the 1st item."
                              }
                            },
                            "required": [
                              "content"
                            ]
                          }
                        },
                        "settings": {
                          "type": "object",
                          "description": "Network settings for this channel, keys from GET /integration-settings/{id}. __type is ignored."
                        },
                        "group": {
                          "type": "string",
                          "description": "Id of an existing post to edit."
                        }
                      },
                      "required": [
                        "integration",
                        "value"
                      ]
                    }
                  },
                  "tags": {
                    "type": "array",
                    "description": "Tags. A string is matched to an existing tag by id or name. An object like { \"value\": \"launch\", \"label\": \"Launch\" } is matched by value, and a tag named label is created when none matches."
                  },
                  "shortLink": {
                    "type": "boolean",
                    "description": "Replace links with short links that count clicks. Default false."
                  },
                  "inter": {
                    "type": "integer",
                    "description": "Repeat the post every N days (1 to 365). repeatDays also works."
                  },
                  "groupId": {
                    "type": "string",
                    "description": "Id of an existing post to edit."
                  },
                  "creationMethod": {
                    "type": "string",
                    "description": "Shown in the post history: api, cli, mcp or agent. Default: how you signed in."
                  }
                },
                "required": [
                  "posts"
                ]
              },
              "example": {
                "type": "schedule",
                "date": "2026-10-01T09:30:00.000Z",
                "shortLink": false,
                "tags": [
                  {
                    "value": "launch",
                    "label": "Launch"
                  }
                ],
                "posts": [
                  {
                    "integration": {
                      "id": "de53f029-255d-4104-b090-974efcca2c86"
                    },
                    "value": [
                      {
                        "content": "<p>Main post</p>",
                        "image": [
                          {
                            "id": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d"
                          }
                        ]
                      },
                      {
                        "content": "First comment",
                        "delay": 5
                      }
                    ],
                    "settings": {
                      "audience": "Followers"
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/posts/{id}": {
      "get": {
        "operationId": "getPost",
        "summary": "Get 1 post",
        "description": "The whole post: every channel with its text, media, settings, state, live link and error with a fix, the follow-up comments, the comments from your team and client, and the history. The id can be a per-channel post id or the group id.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post id or group id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "status is the state of the whole post: draft, review, scheduled, changes (the client asked for changes), published, partial (some channels published, some failed) or error. channels[].root.state is the state on 1 channel. held is set when publishing waits because of billing or a plan limit.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "approvalStatus": {},
                    "approvedBy": {},
                    "publishAt": {
                      "type": "string"
                    },
                    "repeatDays": {},
                    "shortLink": {
                      "type": "boolean"
                    },
                    "creationMethod": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "shareUrl": {
                      "type": "string"
                    },
                    "channels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "picture": {},
                          "username": {
                            "type": "string"
                          },
                          "root": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "position": {
                                "type": "integer"
                              },
                              "content": {
                                "type": "string"
                              },
                              "media": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "alt": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "mime": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "size": {
                                      "type": "integer"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "width": {
                                      "type": "integer"
                                    },
                                    "height": {
                                      "type": "integer"
                                    }
                                  }
                                }
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "audience": {
                                    "type": "string"
                                  }
                                }
                              },
                              "delay": {
                                "type": "integer"
                              },
                              "state": {
                                "type": "string"
                              },
                              "releaseId": {},
                              "releaseUrl": {},
                              "publishedAt": {},
                              "error": {},
                              "held": {},
                              "heldAt": {},
                              "attempts": {
                                "type": "integer"
                              }
                            }
                          },
                          "thread": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "channelId": {
                                  "type": "string"
                                },
                                "position": {
                                  "type": "integer"
                                },
                                "content": {
                                  "type": "string"
                                },
                                "media": {
                                  "type": "array",
                                  "items": {}
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {}
                                },
                                "delay": {
                                  "type": "integer"
                                },
                                "state": {
                                  "type": "string"
                                },
                                "releaseId": {},
                                "releaseUrl": {},
                                "publishedAt": {},
                                "error": {},
                                "held": {},
                                "heldAt": {},
                                "attempts": {
                                  "type": "integer"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "comments": {
                      "type": "array",
                      "items": {}
                    },
                    "activity": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "actor": {
                            "type": "string"
                          },
                          "action": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "98c49d36-7dfd-439b-a857-e9a8e7e3f4a2",
                  "status": "scheduled",
                  "approvalStatus": null,
                  "approvedBy": null,
                  "publishAt": "2026-10-01T09:30:00.000Z",
                  "repeatDays": null,
                  "shortLink": false,
                  "creationMethod": "api",
                  "createdAt": "2026-09-29T18:23:39.694Z",
                  "updatedAt": "2026-09-29T18:23:39.694Z",
                  "tags": [
                    {
                      "id": "48bae191-d9eb-4adb-9ee0-be9c797a8f16",
                      "name": "Launch",
                      "color": "#612bd3"
                    }
                  ],
                  "shareUrl": "https://app.postozo.com/p/98c49d36-7dfd-439b-a857-e9a8e7e3f4a2?t=662b7122e80a48658ffbc75ededf1efc",
                  "channels": [
                    {
                      "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                      "channelName": "acme",
                      "provider": "demo",
                      "picture": null,
                      "username": "acme",
                      "root": {
                        "id": "5001b946-c142-4ab7-b376-188c71272521",
                        "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                        "position": 0,
                        "content": "Main post",
                        "media": [
                          {
                            "id": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d",
                            "alt": "",
                            "url": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                            "mime": "image/png",
                            "name": "photo.png",
                            "size": 70,
                            "type": "image",
                            "width": 1,
                            "height": 1
                          }
                        ],
                        "settings": {
                          "audience": "Followers"
                        },
                        "delay": 0,
                        "state": "queued",
                        "releaseId": null,
                        "releaseUrl": null,
                        "publishedAt": null,
                        "error": null,
                        "held": null,
                        "heldAt": null,
                        "attempts": 0
                      },
                      "thread": [
                        {
                          "id": "de2b4583-65d9-4f69-8489-e9109664369a",
                          "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                          "position": 1,
                          "content": "First comment",
                          "media": [],
                          "settings": {},
                          "delay": 5,
                          "state": "queued",
                          "releaseId": null,
                          "releaseUrl": null,
                          "publishedAt": null,
                          "error": null,
                          "held": null,
                          "heldAt": null,
                          "attempts": 0
                        }
                      ]
                    }
                  ],
                  "comments": [],
                  "activity": [
                    {
                      "actor": "API",
                      "action": "created",
                      "detail": "schedule via api",
                      "created_at": "2026-09-29T18:23:39.700Z"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      },
      "delete": {
        "operationId": "deletePost",
        "summary": "Delete a post",
        "description": "Deletes the whole post from the calendar, on every channel, even when you send a per-channel post id. Queued channels will not publish. Posts already live stay on the network.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post id or group id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete a post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "boolean"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "error": false,
                  "success": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/posts/{id}/date": {
      "put": {
        "operationId": "changeDate",
        "summary": "Move a post",
        "description": "Moves every channel of the post that is a draft, queued or failed to a new time. Failed channels are queued again. Channels that are published stay as they are.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post id or group id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The whole post, as in GET /posts/{id}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "approvalStatus": {},
                    "approvedBy": {},
                    "publishAt": {
                      "type": "string"
                    },
                    "repeatDays": {},
                    "shortLink": {
                      "type": "boolean"
                    },
                    "creationMethod": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "shareUrl": {
                      "type": "string"
                    },
                    "channels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "picture": {},
                          "username": {
                            "type": "string"
                          },
                          "root": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "position": {
                                "type": "integer"
                              },
                              "content": {
                                "type": "string"
                              },
                              "media": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "alt": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "mime": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "size": {
                                      "type": "integer"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "width": {
                                      "type": "integer"
                                    },
                                    "height": {
                                      "type": "integer"
                                    }
                                  }
                                }
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "audience": {
                                    "type": "string"
                                  }
                                }
                              },
                              "delay": {
                                "type": "integer"
                              },
                              "state": {
                                "type": "string"
                              },
                              "releaseId": {},
                              "releaseUrl": {},
                              "publishedAt": {},
                              "error": {},
                              "held": {},
                              "heldAt": {},
                              "attempts": {
                                "type": "integer"
                              }
                            }
                          },
                          "thread": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "channelId": {
                                  "type": "string"
                                },
                                "position": {
                                  "type": "integer"
                                },
                                "content": {
                                  "type": "string"
                                },
                                "media": {
                                  "type": "array",
                                  "items": {}
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {}
                                },
                                "delay": {
                                  "type": "integer"
                                },
                                "state": {
                                  "type": "string"
                                },
                                "releaseId": {},
                                "releaseUrl": {},
                                "publishedAt": {},
                                "error": {},
                                "held": {},
                                "heldAt": {},
                                "attempts": {
                                  "type": "integer"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "comments": {
                      "type": "array",
                      "items": {}
                    },
                    "activity": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "actor": {
                            "type": "string"
                          },
                          "action": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "98c49d36-7dfd-439b-a857-e9a8e7e3f4a2",
                  "status": "scheduled",
                  "approvalStatus": null,
                  "approvedBy": null,
                  "publishAt": "2026-10-02T09:30:00.000Z",
                  "repeatDays": null,
                  "shortLink": false,
                  "creationMethod": "api",
                  "createdAt": "2026-09-29T18:23:39.694Z",
                  "updatedAt": "2026-09-29T18:23:39.694Z",
                  "tags": [
                    {
                      "id": "48bae191-d9eb-4adb-9ee0-be9c797a8f16",
                      "name": "Launch",
                      "color": "#612bd3"
                    }
                  ],
                  "shareUrl": "https://app.postozo.com/p/98c49d36-7dfd-439b-a857-e9a8e7e3f4a2?t=662b7122e80a48658ffbc75ededf1efc",
                  "channels": [
                    {
                      "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                      "channelName": "acme",
                      "provider": "demo",
                      "picture": null,
                      "username": "acme",
                      "root": {
                        "id": "5001b946-c142-4ab7-b376-188c71272521",
                        "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                        "position": 0,
                        "content": "Main post",
                        "media": [
                          {
                            "id": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d",
                            "alt": "",
                            "url": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                            "mime": "image/png",
                            "name": "photo.png",
                            "size": 70,
                            "type": "image",
                            "width": 1,
                            "height": 1
                          }
                        ],
                        "settings": {
                          "audience": "Followers"
                        },
                        "delay": 0,
                        "state": "queued",
                        "releaseId": null,
                        "releaseUrl": null,
                        "publishedAt": null,
                        "error": null,
                        "held": null,
                        "heldAt": null,
                        "attempts": 0
                      },
                      "thread": [
                        {
                          "id": "de2b4583-65d9-4f69-8489-e9109664369a",
                          "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                          "position": 1,
                          "content": "First comment",
                          "media": [],
                          "settings": {},
                          "delay": 5,
                          "state": "queued",
                          "releaseId": null,
                          "releaseUrl": null,
                          "publishedAt": null,
                          "error": null,
                          "held": null,
                          "heldAt": null,
                          "attempts": 0
                        }
                      ]
                    }
                  ],
                  "comments": [],
                  "activity": [
                    {
                      "actor": "API",
                      "action": "created",
                      "detail": "schedule via api",
                      "created_at": "2026-09-29T18:23:39.700Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "description": "New time, ISO 8601. Not more than 1 minute in the past."
                  }
                },
                "required": [
                  "date"
                ]
              },
              "example": {
                "date": "2026-10-02T09:30:00.000Z"
              }
            }
          }
        }
      }
    },
    "/posts/{id}/status": {
      "put": {
        "operationId": "changeStatus",
        "summary": "Switch between draft and scheduled",
        "description": "draft stops queued and failed channels and keeps them as drafts. schedule checks the drafts against the network rules and queues them for the post's time (or now, when that time has passed).",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post id or group id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The whole post, as in GET /posts/{id}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "approvalStatus": {},
                    "approvedBy": {},
                    "publishAt": {
                      "type": "string"
                    },
                    "repeatDays": {},
                    "shortLink": {
                      "type": "boolean"
                    },
                    "creationMethod": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "shareUrl": {
                      "type": "string"
                    },
                    "channels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "picture": {},
                          "username": {
                            "type": "string"
                          },
                          "root": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "position": {
                                "type": "integer"
                              },
                              "content": {
                                "type": "string"
                              },
                              "media": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "alt": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "mime": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "size": {
                                      "type": "integer"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "width": {
                                      "type": "integer"
                                    },
                                    "height": {
                                      "type": "integer"
                                    }
                                  }
                                }
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "audience": {
                                    "type": "string"
                                  }
                                }
                              },
                              "delay": {
                                "type": "integer"
                              },
                              "state": {
                                "type": "string"
                              },
                              "releaseId": {},
                              "releaseUrl": {},
                              "publishedAt": {},
                              "error": {},
                              "held": {},
                              "heldAt": {},
                              "attempts": {
                                "type": "integer"
                              }
                            }
                          },
                          "thread": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "channelId": {
                                  "type": "string"
                                },
                                "position": {
                                  "type": "integer"
                                },
                                "content": {
                                  "type": "string"
                                },
                                "media": {
                                  "type": "array",
                                  "items": {}
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {}
                                },
                                "delay": {
                                  "type": "integer"
                                },
                                "state": {
                                  "type": "string"
                                },
                                "releaseId": {},
                                "releaseUrl": {},
                                "publishedAt": {},
                                "error": {},
                                "held": {},
                                "heldAt": {},
                                "attempts": {
                                  "type": "integer"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "comments": {
                      "type": "array",
                      "items": {}
                    },
                    "activity": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "actor": {
                            "type": "string"
                          },
                          "action": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "5b76fde2-9551-494e-b9be-a4aebc2a984d",
                  "status": "scheduled",
                  "approvalStatus": null,
                  "approvedBy": null,
                  "publishAt": "2026-10-01T09:30:00.000Z",
                  "repeatDays": null,
                  "shortLink": false,
                  "creationMethod": "api",
                  "createdAt": "2026-09-29T18:23:39.694Z",
                  "updatedAt": "2026-09-29T18:23:39.694Z",
                  "tags": [
                    {
                      "id": "48bae191-d9eb-4adb-9ee0-be9c797a8f16",
                      "name": "Launch",
                      "color": "#612bd3"
                    }
                  ],
                  "shareUrl": "https://app.postozo.com/p/98c49d36-7dfd-439b-a857-e9a8e7e3f4a2?t=662b7122e80a48658ffbc75ededf1efc",
                  "channels": [
                    {
                      "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                      "channelName": "acme",
                      "provider": "demo",
                      "picture": null,
                      "username": "acme",
                      "root": {
                        "id": "5001b946-c142-4ab7-b376-188c71272521",
                        "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                        "position": 0,
                        "content": "Main post",
                        "media": [
                          {
                            "id": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d",
                            "alt": "",
                            "url": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                            "mime": "image/png",
                            "name": "photo.png",
                            "size": 70,
                            "type": "image",
                            "width": 1,
                            "height": 1
                          }
                        ],
                        "settings": {
                          "audience": "Followers"
                        },
                        "delay": 0,
                        "state": "queued",
                        "releaseId": null,
                        "releaseUrl": null,
                        "publishedAt": null,
                        "error": null,
                        "held": null,
                        "heldAt": null,
                        "attempts": 0
                      },
                      "thread": [
                        {
                          "id": "de2b4583-65d9-4f69-8489-e9109664369a",
                          "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                          "position": 1,
                          "content": "First comment",
                          "media": [],
                          "settings": {},
                          "delay": 5,
                          "state": "queued",
                          "releaseId": null,
                          "releaseUrl": null,
                          "publishedAt": null,
                          "error": null,
                          "held": null,
                          "heldAt": null,
                          "attempts": 0
                        }
                      ]
                    }
                  ],
                  "comments": [],
                  "activity": [
                    {
                      "actor": "API",
                      "action": "created",
                      "detail": "schedule via api",
                      "created_at": "2026-09-29T18:23:39.700Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "draft or schedule.",
                    "enum": [
                      "draft",
                      "schedule"
                    ]
                  }
                },
                "required": [
                  "status"
                ]
              },
              "example": {
                "status": "schedule"
              }
            }
          }
        }
      }
    },
    "/posts/{id}/settings": {
      "put": {
        "operationId": "changeSettings",
        "summary": "Change network settings of 1 channel",
        "description": "Merges new settings into 1 channel's post, for example a YouTube title. Only before it publishes. With a group id, the first channel of the post is changed, so send the per-channel post id when the post has more than 1 channel.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Per-channel post id (or group id).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The whole post, as in GET /posts/{id}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "approvalStatus": {},
                    "approvedBy": {},
                    "publishAt": {
                      "type": "string"
                    },
                    "repeatDays": {},
                    "shortLink": {
                      "type": "boolean"
                    },
                    "creationMethod": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "shareUrl": {
                      "type": "string"
                    },
                    "channels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "picture": {},
                          "username": {
                            "type": "string"
                          },
                          "root": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "position": {
                                "type": "integer"
                              },
                              "content": {
                                "type": "string"
                              },
                              "media": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "alt": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    },
                                    "mime": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "size": {
                                      "type": "integer"
                                    },
                                    "type": {
                                      "type": "string"
                                    },
                                    "width": {
                                      "type": "integer"
                                    },
                                    "height": {
                                      "type": "integer"
                                    }
                                  }
                                }
                              },
                              "settings": {
                                "type": "object",
                                "properties": {
                                  "audience": {
                                    "type": "string"
                                  }
                                }
                              },
                              "delay": {
                                "type": "integer"
                              },
                              "state": {
                                "type": "string"
                              },
                              "releaseId": {},
                              "releaseUrl": {},
                              "publishedAt": {},
                              "error": {},
                              "held": {},
                              "heldAt": {},
                              "attempts": {
                                "type": "integer"
                              }
                            }
                          },
                          "thread": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "channelId": {
                                  "type": "string"
                                },
                                "position": {
                                  "type": "integer"
                                },
                                "content": {
                                  "type": "string"
                                },
                                "media": {
                                  "type": "array",
                                  "items": {}
                                },
                                "settings": {
                                  "type": "object",
                                  "properties": {}
                                },
                                "delay": {
                                  "type": "integer"
                                },
                                "state": {
                                  "type": "string"
                                },
                                "releaseId": {},
                                "releaseUrl": {},
                                "publishedAt": {},
                                "error": {},
                                "held": {},
                                "heldAt": {},
                                "attempts": {
                                  "type": "integer"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "comments": {
                      "type": "array",
                      "items": {}
                    },
                    "activity": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "actor": {
                            "type": "string"
                          },
                          "action": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "98c49d36-7dfd-439b-a857-e9a8e7e3f4a2",
                  "status": "scheduled",
                  "approvalStatus": null,
                  "approvedBy": null,
                  "publishAt": "2026-10-01T09:30:00.000Z",
                  "repeatDays": null,
                  "shortLink": false,
                  "creationMethod": "api",
                  "createdAt": "2026-09-29T18:23:39.694Z",
                  "updatedAt": "2026-09-29T18:23:39.694Z",
                  "tags": [
                    {
                      "id": "48bae191-d9eb-4adb-9ee0-be9c797a8f16",
                      "name": "Launch",
                      "color": "#612bd3"
                    }
                  ],
                  "shareUrl": "https://app.postozo.com/p/98c49d36-7dfd-439b-a857-e9a8e7e3f4a2?t=662b7122e80a48658ffbc75ededf1efc",
                  "channels": [
                    {
                      "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                      "channelName": "acme",
                      "provider": "demo",
                      "picture": null,
                      "username": "acme",
                      "root": {
                        "id": "5001b946-c142-4ab7-b376-188c71272521",
                        "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                        "position": 0,
                        "content": "Main post",
                        "media": [
                          {
                            "id": "281e94f5-fe31-40ed-8718-8dd3d1fbcd6d",
                            "alt": "",
                            "url": "https://app.postozo.com/uploads/ee50beea-d095-49ff-a79c-cb7c6768b73d/2026-09/281e94f5-fe31-40ed-8718-8dd3d1fbcd6d.png",
                            "mime": "image/png",
                            "name": "photo.png",
                            "size": 70,
                            "type": "image",
                            "width": 1,
                            "height": 1
                          }
                        ],
                        "settings": {
                          "audience": "Everyone"
                        },
                        "delay": 0,
                        "state": "queued",
                        "releaseId": null,
                        "releaseUrl": null,
                        "publishedAt": null,
                        "error": null,
                        "held": null,
                        "heldAt": null,
                        "attempts": 0
                      },
                      "thread": [
                        {
                          "id": "de2b4583-65d9-4f69-8489-e9109664369a",
                          "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                          "position": 1,
                          "content": "First comment",
                          "media": [],
                          "settings": {},
                          "delay": 5,
                          "state": "queued",
                          "releaseId": null,
                          "releaseUrl": null,
                          "publishedAt": null,
                          "error": null,
                          "held": null,
                          "heldAt": null,
                          "attempts": 0
                        }
                      ]
                    }
                  ],
                  "comments": [],
                  "activity": [
                    {
                      "actor": "API",
                      "action": "created",
                      "detail": "schedule via api",
                      "created_at": "2026-09-29T18:23:39.700Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "settings": {
                    "type": "object",
                    "description": "Keys from GET /integration-settings/{id}. Keys you leave out keep their value."
                  }
                },
                "required": [
                  "settings"
                ]
              },
              "example": {
                "settings": {
                  "audience": "Everyone"
                }
              }
            }
          }
        }
      }
    },
    "/posts/{id}/retry": {
      "post": {
        "operationId": "retryPost",
        "summary": "Retry failed channels",
        "description": "Queues again, right now, every channel of the post that failed or could not be confirmed, and follow-up comments that failed. Only retry an \"unconfirmed\" channel after you checked the post is not already live on the network.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post id or group id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The whole post, as in GET /posts/{id}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "approvalStatus": {},
                    "approvedBy": {},
                    "publishAt": {
                      "type": "string"
                    },
                    "repeatDays": {},
                    "shortLink": {
                      "type": "boolean"
                    },
                    "creationMethod": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {}
                    },
                    "shareUrl": {
                      "type": "string"
                    },
                    "channels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "picture": {},
                          "username": {
                            "type": "string"
                          },
                          "root": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "position": {
                                "type": "integer"
                              },
                              "content": {
                                "type": "string"
                              },
                              "media": {
                                "type": "array",
                                "items": {}
                              },
                              "settings": {
                                "type": "object",
                                "properties": {}
                              },
                              "delay": {
                                "type": "integer"
                              },
                              "state": {
                                "type": "string"
                              },
                              "releaseId": {},
                              "releaseUrl": {},
                              "publishedAt": {},
                              "error": {},
                              "held": {},
                              "heldAt": {},
                              "attempts": {
                                "type": "integer"
                              }
                            }
                          },
                          "thread": {
                            "type": "array",
                            "items": {}
                          }
                        }
                      }
                    },
                    "comments": {
                      "type": "array",
                      "items": {}
                    },
                    "activity": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "actor": {
                            "type": "string"
                          },
                          "action": {
                            "type": "string"
                          },
                          "detail": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "374f5b42-c4e3-42ab-a357-99e1b5662d9e",
                  "status": "scheduled",
                  "approvalStatus": null,
                  "approvedBy": null,
                  "publishAt": "2026-09-29T18:23:45.838Z",
                  "repeatDays": null,
                  "shortLink": false,
                  "creationMethod": "api",
                  "createdAt": "2026-09-29T18:23:39.694Z",
                  "updatedAt": "2026-09-29T18:23:39.694Z",
                  "tags": [],
                  "shareUrl": "https://app.postozo.com/p/374f5b42-c4e3-42ab-a357-99e1b5662d9e?t=ea21f38108c04d4d8ed7841e6bde5563",
                  "channels": [
                    {
                      "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                      "channelName": "acme",
                      "provider": "demo",
                      "picture": null,
                      "username": "acme",
                      "root": {
                        "id": "d298b9c3-7588-4334-a924-141a451415d6",
                        "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                        "position": 0,
                        "content": "This will fail #fail",
                        "media": [],
                        "settings": {},
                        "delay": 0,
                        "state": "queued",
                        "releaseId": null,
                        "releaseUrl": null,
                        "publishedAt": null,
                        "error": null,
                        "held": null,
                        "heldAt": null,
                        "attempts": 0
                      },
                      "thread": []
                    }
                  ],
                  "comments": [],
                  "activity": [
                    {
                      "actor": "API",
                      "action": "created",
                      "detail": "now via api",
                      "created_at": "2026-09-29T18:23:42.807Z"
                    },
                    {
                      "actor": "System",
                      "action": "failed",
                      "detail": "acme: Demo network rejected the post (#fail in text).",
                      "created_at": "2026-09-29T18:23:42.813Z"
                    },
                    {
                      "actor": "API",
                      "action": "retried",
                      "detail": null,
                      "created_at": "2026-09-29T18:23:45.840Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/posts/{id}/missing": {
      "get": {
        "operationId": "missing",
        "summary": "Look for a post on the network",
        "description": "When a channel is \"unconfirmed\" (the network did not answer, so we do not know if the post went live), this asks the network for a recent post with the same text. Networks that cannot search return an empty list.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Per-channel post id (or group id).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list with 0 or 1 item: { \"id\", \"url\" } of the live post. Link it with PUT /posts/{id}/release-id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "id": "demo_22dd2fbd1580",
                    "url": "https://app.postozo.com/demo/demo_22dd2fbd1580"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/posts/{id}/release-id": {
      "put": {
        "operationId": "releaseId",
        "summary": "Link a live post you found yourself",
        "description": "Marks 1 channel's post as published with the id (and link) of the live post on the network. Use it after \"unconfirmed\" when you found the post yourself.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Per-channel post id (or group id).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The whole post, as in GET /posts/{id}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "approvalStatus": {},
                    "approvedBy": {},
                    "publishAt": {
                      "type": "string"
                    },
                    "repeatDays": {},
                    "shortLink": {
                      "type": "boolean"
                    },
                    "creationMethod": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {}
                    },
                    "shareUrl": {
                      "type": "string"
                    },
                    "channels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "channelId": {
                            "type": "string"
                          },
                          "channelName": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "picture": {},
                          "username": {
                            "type": "string"
                          },
                          "root": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "channelId": {
                                "type": "string"
                              },
                              "position": {
                                "type": "integer"
                              },
                              "content": {
                                "type": "string"
                              },
                              "media": {
                                "type": "array",
                                "items": {}
                              },
                              "settings": {
                                "type": "object",
                                "properties": {}
                              },
                              "delay": {
                                "type": "integer"
                              },
                              "state": {
                                "type": "string"
                              },
                              "releaseId": {
                                "type": "string"
                              },
                              "releaseUrl": {
                                "type": "string"
                              },
                              "publishedAt": {
                                "type": "string"
                              },
                              "error": {},
                              "held": {},
                              "heldAt": {},
                              "attempts": {
                                "type": "integer"
                              }
                            }
                          },
                          "thread": {
                            "type": "array",
                            "items": {}
                          }
                        }
                      }
                    },
                    "comments": {
                      "type": "array",
                      "items": {}
                    },
                    "activity": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "actor": {
                            "type": "string"
                          },
                          "action": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "389c32ac-8802-415b-8ca2-35bc29e5d881",
                  "status": "published",
                  "approvalStatus": null,
                  "approvedBy": null,
                  "publishAt": "2026-10-01T09:30:00.000Z",
                  "repeatDays": null,
                  "shortLink": false,
                  "creationMethod": "api",
                  "createdAt": "2026-09-29T18:23:39.694Z",
                  "updatedAt": "2026-09-29T18:23:39.694Z",
                  "tags": [],
                  "shareUrl": "https://app.postozo.com/p/389c32ac-8802-415b-8ca2-35bc29e5d881?t=0c1f6e0a7d3b4b0e9a4f5c2d8e7b6a19",
                  "channels": [
                    {
                      "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                      "channelName": "acme",
                      "provider": "demo",
                      "picture": null,
                      "username": "acme",
                      "root": {
                        "id": "56142ef7-01a9-45e2-99d8-024fceb76328",
                        "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                        "position": 0,
                        "content": "Found it myself",
                        "media": [],
                        "settings": {},
                        "delay": 0,
                        "state": "published",
                        "releaseId": "1839267162345",
                        "releaseUrl": "https://x.com/acme/status/1839267162345",
                        "publishedAt": "2026-09-29T18:40:12.410Z",
                        "error": null,
                        "held": null,
                        "heldAt": null,
                        "attempts": 0
                      },
                      "thread": []
                    }
                  ],
                  "comments": [],
                  "activity": [
                    {
                      "actor": "API",
                      "action": "created",
                      "detail": "schedule via api",
                      "created_at": "2026-09-29T18:35:02.930Z"
                    },
                    {
                      "actor": "API",
                      "action": "linked live post",
                      "detail": "1839267162345",
                      "created_at": "2026-09-29T18:40:12.410Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "releaseId": {
                    "type": "string",
                    "description": "Id of the live post on the network."
                  },
                  "releaseUrl": {
                    "type": "string",
                    "description": "Link to the live post."
                  }
                },
                "required": [
                  "releaseId"
                ]
              },
              "example": {
                "releaseId": "1839267162345",
                "releaseUrl": "https://x.com/acme/status/1839267162345"
              }
            }
          }
        }
      }
    },
    "/posts/group/{group}": {
      "delete": {
        "operationId": "deleteGroup",
        "summary": "Delete a post by group id",
        "description": "The Postiz path for deleting a post. Works the same as DELETE /posts/{id}.",
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "group",
            "in": "path",
            "required": true,
            "description": "Group id (a per-channel post id also works).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete a post by group id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "boolean"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "error": false,
                  "success": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/analytics/{integration}": {
      "get": {
        "operationId": "analyticsChannel",
        "summary": "Statistics for 1 channel",
        "description": "Daily numbers from the network for the last 7, 30 or 90 days. Networks only share the ranges they keep: a longer range than the network keeps falls back to the longest one it has. percentageChange compares with the period before when the network shares it, otherwise the 2nd half of the period with the 1st half.",
        "tags": [
          "Analytics"
        ],
        "parameters": [
          {
            "name": "integration",
            "in": "path",
            "required": true,
            "description": "Channel id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Days: 7, 30 or 90. Default 30.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The example is from the Demo network, whose numbers are made up. Real channels return the metrics their network shares.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "help": {
                        "type": "string"
                      },
                      "percentageChange": {
                        "type": "number"
                      },
                      "data": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer"
                            },
                            "date": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": [
                  {
                    "label": "Views",
                    "help": "How many times your posts were shown. Demo numbers.",
                    "percentageChange": 2.2,
                    "data": [
                      {
                        "total": 150,
                        "date": "2026-09-23"
                      },
                      {
                        "total": 132,
                        "date": "2026-09-24"
                      },
                      {
                        "total": 114,
                        "date": "2026-09-25"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/analytics/post/{postId}": {
      "get": {
        "operationId": "analyticsPost",
        "summary": "Statistics for 1 published post",
        "description": "The numbers the network shares for 1 live post, for example likes and views. Use the per-channel post id.",
        "tags": [
          "Analytics"
        ],
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Per-channel post id (or group id).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Each metric has 1 data point with today's date. percentageChange is always 0 here.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "percentageChange": {
                        "type": "integer"
                      },
                      "data": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer"
                            },
                            "date": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": [
                  {
                    "label": "Likes",
                    "percentageChange": 0,
                    "data": [
                      {
                        "total": 0,
                        "date": "2026-09-29"
                      }
                    ]
                  },
                  {
                    "label": "Views",
                    "percentageChange": 0,
                    "data": [
                      {
                        "total": 100,
                        "date": "2026-09-29"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/notifications": {
      "get": {
        "operationId": "notifications",
        "summary": "List notifications",
        "description": "Workspace notifications, newest first, 50 per page: published posts, failed posts, approvals, reconnect requests and billing news.",
        "tags": [
          "Notifications and networks"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number, starting at 1. Default 1.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "type is success, fail or info. link is a path in the app.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "body": {
                            "type": "string"
                          },
                          "link": {
                            "type": "string"
                          },
                          "created_at": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "page": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "notifications": [
                    {
                      "id": "0dcbb820-aebb-444d-beff-21b03d98dae7",
                      "type": "fail",
                      "title": "Post failed on Demo network for acme",
                      "body": "Demo network rejected the post (#fail in text). Remove #fail from the text and retry.",
                      "link": "/launches?post=374f5b42-c4e3-42ab-a357-99e1b5662d9e",
                      "created_at": "2026-09-29T18:23:45.850Z"
                    }
                  ],
                  "page": 1
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/networks": {
      "get": {
        "operationId": "networks",
        "summary": "List every network",
        "description": "Every network this server supports, with its id, limit, whether it takes follow-up comments and whether it needs media. Networks are listed even when the server has no keys for them yet.",
        "tags": [
          "Notifications and networks"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "List every network",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "identifier": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "maxLength": {
                        "type": "integer"
                      },
                      "comments": {
                        "type": "boolean"
                      },
                      "needs": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                },
                "example": [
                  {
                    "identifier": "gbp",
                    "name": "Google Business Profile",
                    "maxLength": 1500,
                    "comments": false,
                    "needs": null
                  },
                  {
                    "identifier": "instagram",
                    "name": "Instagram",
                    "maxLength": 2200,
                    "comments": true,
                    "needs": "media"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/rules/{identifier}": {
      "get": {
        "operationId": "rules",
        "summary": "Rules of 1 network",
        "description": "The rules and settings of a network, without a channel. Useful before you connect one.",
        "tags": [
          "Notifications and networks"
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "description": "Network id from GET /networks.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Rules of 1 network",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rules": {
                      "type": "string"
                    },
                    "maxLength": {
                      "type": "integer"
                    },
                    "settings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "rules": "Max 280 characters (links count as 23). Up to 4 images or 1 video. Follow-up comments become a thread.",
                  "maxLength": 280,
                  "settings": [
                    {
                      "key": "reply",
                      "label": "Who can reply",
                      "type": "select",
                      "options": [
                        "Everyone",
                        "Accounts you follow",
                        "Accounts you mention",
                        "Verified accounts",
                        "Subscribers"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentPaused"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Your API key (Settings, Developers), an OAuth token or a CLI token. \"Bearer <key>\" also works."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "No key, or the key is not valid. Also \"No subscription found\" (with a fix) when the workspace has no plan.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "description": "A plain message."
                },
                "msg": {
                  "type": "string",
                  "description": "The same message (Postiz name)."
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channelId": {
                        "type": "string"
                      },
                      "channelName": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    }
                  }
                },
                "fix": {
                  "type": "string",
                  "description": "What to do, on some errors."
                },
                "code": {
                  "type": "string"
                }
              },
              "required": [
                "error",
                "msg"
              ]
            },
            "example": {
              "error": "Invalid API key",
              "msg": "Invalid API key"
            }
          }
        }
      },
      "PaymentPaused": {
        "description": "Publishing is paused after a failed payment (the 7 day grace is over), or a plan limit was reached. Read fix.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "description": "A plain message."
                },
                "msg": {
                  "type": "string",
                  "description": "The same message (Postiz name)."
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channelId": {
                        "type": "string"
                      },
                      "channelName": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    }
                  }
                },
                "fix": {
                  "type": "string",
                  "description": "What to do, on some errors."
                },
                "code": {
                  "type": "string"
                }
              },
              "required": [
                "error",
                "msg"
              ]
            },
            "example": {
              "error": "Publishing is paused because the last payment failed.",
              "msg": "Publishing is paused because the last payment failed.",
              "code": "payment_failed",
              "fix": "The workspace owner should pay the open invoice on the Billing page of the app. Nothing was deleted, and posts go out again once it is paid."
            }
          }
        }
      },
      "ServerError": {
        "description": "Something went wrong on our side. Try again.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "description": "A plain message."
                },
                "msg": {
                  "type": "string",
                  "description": "The same message (Postiz name)."
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channelId": {
                        "type": "string"
                      },
                      "channelName": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    }
                  }
                },
                "fix": {
                  "type": "string",
                  "description": "What to do, on some errors."
                },
                "code": {
                  "type": "string"
                }
              },
              "required": [
                "error",
                "msg"
              ]
            },
            "example": {
              "error": "Something went wrong on our side. Try again. If it keeps happening, contact support.",
              "msg": "Something went wrong on our side. Try again. If it keeps happening, contact support.",
              "fix": "Try again in a minute. If it keeps happening, email support@postozo.com with the time of the request."
            }
          }
        }
      },
      "BadRequest": {
        "description": "The request cannot be done as sent. Read msg and errors.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "description": "A plain message."
                },
                "msg": {
                  "type": "string",
                  "description": "The same message (Postiz name)."
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channelId": {
                        "type": "string"
                      },
                      "channelName": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    }
                  }
                },
                "fix": {
                  "type": "string",
                  "description": "What to do, on some errors."
                },
                "code": {
                  "type": "string"
                }
              },
              "required": [
                "error",
                "msg"
              ]
            },
            "example": {
              "error": "Please fix these before saving.",
              "msg": "Please fix these before saving.",
              "errors": [
                {
                  "channelId": "de53f029-255d-4104-b090-974efcca2c86",
                  "channelName": "acme (Demo)",
                  "message": "acme (Demo): the post is too long, 1200 of 1000 characters."
                }
              ]
            }
          }
        }
      },
      "NotFound": {
        "description": "The object does not exist in this workspace.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "description": "A plain message."
                },
                "msg": {
                  "type": "string",
                  "description": "The same message (Postiz name)."
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channelId": {
                        "type": "string"
                      },
                      "channelName": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    }
                  }
                },
                "fix": {
                  "type": "string",
                  "description": "What to do, on some errors."
                },
                "code": {
                  "type": "string"
                }
              },
              "required": [
                "error",
                "msg"
              ]
            },
            "example": {
              "error": "Post not found",
              "msg": "Post not found"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "More than 90 post requests in the current hour for this workspace.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "description": "A plain message."
                },
                "msg": {
                  "type": "string",
                  "description": "The same message (Postiz name)."
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channelId": {
                        "type": "string"
                      },
                      "channelName": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    }
                  }
                },
                "fix": {
                  "type": "string",
                  "description": "What to do, on some errors."
                },
                "code": {
                  "type": "string"
                }
              },
              "required": [
                "error",
                "msg"
              ]
            },
            "example": {
              "error": "Too many requests. Try again in 42 minutes.",
              "msg": "Too many requests. Try again in 42 minutes."
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds until the limit window starts again.",
            "schema": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}
