{
  "openapi": "3.1.0",
  "info": {
    "title": "Postiz Public API",
    "description": "API for managing social media posts, integrations, and media uploads in Postiz.\n\n## Authentication\n\nAll endpoints require an API key passed in the `Authorization` header:\n\n```\nAuthorization: your-api-key\n```\n\nGet your API key from Postiz Settings.\n\n## Rate Limits\n\nThere is a limit of **30 requests per hour**.\n\n## Terminology\n\nThe UI uses `channel`, but the API uses `integration`. They refer to the same thing.\n\n## Supported Platforms (27)\n\n**Social Platforms:** X (Twitter), LinkedIn, LinkedIn Page, Facebook, Instagram, Instagram Standalone, Threads, Bluesky, Mastodon, Warpcast (Farcaster), Nostr, VK\n\n**Video Platforms:** YouTube, TikTok\n\n**Community Platforms:** Reddit, Lemmy, Discord, Slack, Telegram\n\n**Design Platforms:** Pinterest, Dribbble\n\n**Blogging Platforms:** Medium, Dev.to, Hashnode, WordPress\n\n**Business:** Google My Business (GMB), Listmonk (newsletters)",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.postiz.com/public/v1",
      "description": "Postiz Cloud"
    },
    {
      "url": "https://{your-domain}/api/public/v1",
      "description": "Self-hosted",
      "variables": {
        "your-domain": {
          "default": "localhost:5000",
          "description": "Your Postiz instance domain"
        }
      }
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Integrations",
      "description": "Manage connected social media channels"
    },
    {
      "name": "Posts",
      "description": "Create, list, and delete posts"
    },
    {
      "name": "Uploads",
      "description": "Upload media files"
    },
    {
      "name": "Notifications",
      "description": "View organization notifications"
    },
    {
      "name": "Analytics",
      "description": "View analytics for integrations and posts"
    },
    {
      "name": "Video Generation",
      "description": "Generate videos with AI"
    }
  ],
  "paths": {
    "/integrations": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "List all integrations",
        "description": "Returns all connected social media channels for your organization.",
        "operationId": "listIntegrations",
        "responses": {
          "200": {
            "description": "List of integrations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Integration"
                  }
                },
                "example": [
                  {
                    "id": "cm4ean69r0003w8w1cdomox9n",
                    "name": "Nevo David",
                    "identifier": "x",
                    "picture": "https://uploads.postiz.com/avatar.jpg",
                    "disabled": false,
                    "profile": "nevodavid",
                    "customer": {
                      "id": "customer-id",
                      "name": "My Company"
                    }
                  }
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": false,
            "description": "Filter integrations by customer (group) ID. Returns only channels assigned to the given group.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/groups": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "List all groups (customers)",
        "description": "Returns all customers (groups) for your organization. Use a group ID to filter the integrations list.",
        "operationId": "listGroups",
        "responses": {
          "200": {
            "description": "List of groups",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Group"
                  }
                },
                "example": [
                  {
                    "id": "customer-id",
                    "name": "My Company"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/integrations/{id}": {
      "delete": {
        "tags": [
          "Integrations"
        ],
        "summary": "Delete a channel",
        "description": "Delete a connected channel by its integration ID. Any scheduled posts associated with this channel will also be deleted.",
        "operationId": "deleteChannel",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Integration ID of the channel to delete",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "cm4ean69r0003w8w1cdomox9n"
                }
              }
            }
          },
          "404": {
            "description": "Channel not found"
          }
        }
      }
    },
    "/social/{integration}": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "Get OAuth URL for a channel",
        "description": "Generate an OAuth authorization URL for a given integration. Use this to connect a new social media channel. Only OAuth-based integrations are supported (integrations that require an external URL, such as Mastodon, are not available via this endpoint).",
        "operationId": "getIntegrationUrl",
        "parameters": [
          {
            "name": "integration",
            "in": "path",
            "required": true,
            "description": "The integration identifier (e.g. x, linkedin, facebook, instagram, youtube, tiktok, reddit, etc.)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "description": "Pass an existing integration ID to refresh its OAuth token instead of creating a new connection",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OAuth authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "The OAuth authorization URL to redirect the user to"
                    }
                  }
                },
                "example": {
                  "url": "https://twitter.com/i/oauth2/authorize?response_type=code&client_id=..."
                }
              }
            }
          },
          "400": {
            "description": "Integration not allowed or requires an external URL"
          }
        }
      }
    },
    "/integration-settings/{id}": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "Get integration settings and tools",
        "description": "Returns the posting rules, maximum content length, settings schema, and available provider tools for a connected channel. Use this to discover which tools can be executed with the trigger endpoint.",
        "operationId": "getIntegrationSettings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The integration ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Settings and tools for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "output": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "string",
                          "description": "Platform-specific posting rules"
                        },
                        "maxLength": {
                          "type": "number",
                          "description": "Maximum content length"
                        },
                        "settings": {
                          "description": "JSON schema of the provider settings, or a string when no settings are required"
                        },
                        "tools": {
                          "type": "array",
                          "description": "Provider tools that can be executed via the trigger endpoint",
                          "items": {
                            "type": "object",
                            "properties": {
                              "methodName": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "dataSchema": {
                                "type": "array",
                                "items": {
                                  "type": "object"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "output": {
                    "rules": "Instagram should have at least one attachment, if it's a story, it can have only one picture",
                    "maxLength": 2200,
                    "settings": {
                      "type": "object"
                    },
                    "tools": [
                      {
                        "methodName": "audioSearch",
                        "description": "Search audio (music or original sounds) to attach to a Reel via the \"audio\" setting, an empty query returns trending audio",
                        "dataSchema": [
                          {
                            "key": "q",
                            "type": "string",
                            "description": "Search query, leave empty for trending audio"
                          },
                          {
                            "key": "type",
                            "type": "string",
                            "description": "Either \"music\" or \"original_sound\", defaults to \"music\""
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "404": {
            "description": "Integration not found"
          }
        }
      }
    },
    "/integration-trigger/{id}": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "summary": "Trigger an integration tool",
        "description": "Executes a provider-specific tool on a connected channel, for example searching Instagram audio for Reels, listing Discord channels, or fetching Reddit flairs. Discover available tools with the integration settings endpoint.",
        "operationId": "triggerIntegrationTool",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The integration ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "methodName"
                ],
                "properties": {
                  "methodName": {
                    "type": "string",
                    "description": "The tool method name, as returned by the integration settings endpoint"
                  },
                  "data": {
                    "type": "object",
                    "description": "Key-value parameters for the tool",
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                }
              },
              "example": {
                "methodName": "audioSearch",
                "data": {
                  "q": "summer vibes",
                  "type": "music"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool executed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "output": {
                      "description": "The tool result, shape depends on the tool"
                    }
                  }
                },
                "example": {
                  "output": [
                    {
                      "id": "587784541076604",
                      "title": "Summer Vibes",
                      "artist": "Some Artist",
                      "image": "https://scontent.cdninstagram.com/cover.jpg",
                      "duration": 30000,
                      "previewUrl": "https://scontent.cdninstagram.com/preview.mp4"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Channel disconnected due to expired token"
          },
          "404": {
            "description": "Integration or tool not found"
          }
        }
      }
    },
    "/is-connected": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "Check connection status",
        "description": "Verify if your API key is valid and connected.",
        "operationId": "isConnected",
        "responses": {
          "200": {
            "description": "Connection status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connected": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "connected": true
                }
              }
            }
          }
        }
      }
    },
    "/find-slot/{id}": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "Find next available slot",
        "description": "Get the next available time slot for posting to a specific channel.",
        "operationId": "findSlot",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Integration ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Next available slot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "example": {
                  "date": "2025-01-15T10:00:00.000Z"
                }
              }
            }
          }
        }
      }
    },
    "/posts": {
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "List posts",
        "description": "Get posts within a date range.",
        "operationId": "listPosts",
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": true,
            "description": "Start date in UTC ISO format",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2024-12-01T00:00:00.000Z"
          },
          {
            "name": "endDate",
            "in": "query",
            "required": true,
            "description": "End date in UTC ISO format",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2024-12-31T23:59:59.000Z"
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "description": "Filter by customer ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of posts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostsResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Posts"
        ],
        "summary": "Create a post",
        "description": "Create or schedule a new post. Each social media platform has its own settings schema.",
        "operationId": "createPost",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePostRequest"
              },
              "examples": {
                "general": {
                  "summary": "General (Threads, Mastodon, Bluesky, Telegram, Nostr, VK, Kick)",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-integration-id"
                        },
                        "value": [
                          {
                            "content": "Hello world!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "bluesky"
                        }
                      }
                    ]
                  }
                },
                "x": {
                  "summary": "X (Twitter)",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-x-integration-id"
                        },
                        "value": [
                          {
                            "content": "Hello from the Postiz API!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "x",
                          "who_can_reply_post": "everyone",
                          "community": ""
                        }
                      }
                    ]
                  }
                },
                "linkedin": {
                  "summary": "LinkedIn",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-linkedin-integration-id"
                        },
                        "value": [
                          {
                            "content": "Check out our latest product showcase!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "linkedin",
                          "post_as_images_carousel": false
                        }
                      }
                    ]
                  }
                },
                "linkedin-page": {
                  "summary": "LinkedIn Page",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-linkedin-page-integration-id"
                        },
                        "value": [
                          {
                            "content": "Company update: We just launched a new feature!",
                            "image": [
                              {
                                "id": "img1",
                                "path": "https://uploads.postiz.com/1.png"
                              },
                              {
                                "id": "img2",
                                "path": "https://uploads.postiz.com/2.png"
                              }
                            ]
                          }
                        ],
                        "settings": {
                          "__type": "linkedin-page",
                          "post_as_images_carousel": true,
                          "carousel_name": "Product Showcase"
                        }
                      }
                    ]
                  }
                },
                "instagram": {
                  "summary": "Instagram",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-instagram-integration-id"
                        },
                        "value": [
                          {
                            "content": "Beautiful sunset today!",
                            "image": [
                              {
                                "id": "img1",
                                "path": "https://uploads.postiz.com/photo.jpg"
                              }
                            ]
                          }
                        ],
                        "settings": {
                          "__type": "instagram",
                          "post_type": "post",
                          "is_trial_reel": false,
                          "collaborators": []
                        }
                      }
                    ]
                  }
                },
                "instagram-standalone": {
                  "summary": "Instagram Standalone",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-instagram-standalone-integration-id"
                        },
                        "value": [
                          {
                            "content": "",
                            "image": [
                              {
                                "id": "story-img",
                                "path": "https://uploads.postiz.com/story.jpg"
                              }
                            ]
                          }
                        ],
                        "settings": {
                          "__type": "instagram-standalone",
                          "post_type": "story",
                          "is_trial_reel": false,
                          "collaborators": []
                        }
                      }
                    ]
                  }
                },
                "youtube": {
                  "summary": "YouTube",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-youtube-integration-id"
                        },
                        "value": [
                          {
                            "content": "Video description here...",
                            "image": [
                              {
                                "id": "video-id",
                                "path": "https://uploads.postiz.com/video.mp4"
                              }
                            ]
                          }
                        ],
                        "settings": {
                          "__type": "youtube",
                          "title": "My Awesome Video",
                          "type": "public",
                          "selfDeclaredMadeForKids": "no",
                          "tags": [
                            {
                              "value": "tutorial",
                              "label": "tutorial"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "tiktok": {
                  "summary": "TikTok",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-tiktok-integration-id"
                        },
                        "value": [
                          {
                            "content": "Check this out! #viral #fyp",
                            "image": [
                              {
                                "id": "video-id",
                                "path": "https://uploads.postiz.com/tiktok.mp4"
                              }
                            ]
                          }
                        ],
                        "settings": {
                          "__type": "tiktok",
                          "privacy_level": "PUBLIC_TO_EVERYONE",
                          "duet": true,
                          "stitch": true,
                          "comment": true,
                          "autoAddMusic": "no",
                          "brand_content_toggle": false,
                          "brand_organic_toggle": false,
                          "video_made_with_ai": false,
                          "content_posting_method": "DIRECT_POST"
                        }
                      }
                    ]
                  }
                },
                "reddit": {
                  "summary": "Reddit",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-reddit-integration-id"
                        },
                        "value": [
                          {
                            "content": "Post content here...",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "reddit",
                          "subreddit": [
                            {
                              "value": {
                                "subreddit": "programming",
                                "title": "My Post Title",
                                "type": "self",
                                "url": "",
                                "is_flair_required": false,
                                "flair": null
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "lemmy": {
                  "summary": "Lemmy",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-lemmy-integration-id"
                        },
                        "value": [
                          {
                            "content": "Post content here...",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "lemmy",
                          "subreddit": [
                            {
                              "value": {
                                "subreddit": "technology",
                                "id": "community-id",
                                "title": "My Post Title",
                                "url": ""
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "pinterest": {
                  "summary": "Pinterest",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-pinterest-integration-id"
                        },
                        "value": [
                          {
                            "content": "Pin description here...",
                            "image": [
                              {
                                "id": "pin-img",
                                "path": "https://uploads.postiz.com/pin.jpg"
                              }
                            ]
                          }
                        ],
                        "settings": {
                          "__type": "pinterest",
                          "board": "board-id",
                          "title": "My Pin",
                          "link": "https://example.com"
                        }
                      }
                    ]
                  }
                },
                "dribbble": {
                  "summary": "Dribbble",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-dribbble-integration-id"
                        },
                        "value": [
                          {
                            "content": "Shot description here...",
                            "image": [
                              {
                                "id": "shot-img",
                                "path": "https://uploads.postiz.com/shot.png"
                              }
                            ]
                          }
                        ],
                        "settings": {
                          "__type": "dribbble",
                          "title": "My Design Shot"
                        }
                      }
                    ]
                  }
                },
                "discord": {
                  "summary": "Discord",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-discord-integration-id"
                        },
                        "value": [
                          {
                            "content": "Hello Discord!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "discord",
                          "channel": "channel-id"
                        }
                      }
                    ]
                  }
                },
                "slack": {
                  "summary": "Slack",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-slack-integration-id"
                        },
                        "value": [
                          {
                            "content": "Hello Slack!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "slack",
                          "channel": "channel-id"
                        }
                      }
                    ]
                  }
                },
                "twitch": {
                  "summary": "Twitch",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-twitch-integration-id"
                        },
                        "value": [
                          {
                            "content": "Stream announcement!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "twitch",
                          "messageType": "announcement",
                          "announcementColor": "primary"
                        }
                      }
                    ]
                  }
                },
                "medium": {
                  "summary": "Medium",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-medium-integration-id"
                        },
                        "value": [
                          {
                            "content": "# My Article\n\nThis is my article content in markdown...",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "medium",
                          "title": "My Amazing Article",
                          "subtitle": "A deep dive into...",
                          "tags": [
                            {
                              "value": "programming",
                              "label": "Programming"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "devto": {
                  "summary": "Dev.to",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-devto-integration-id"
                        },
                        "value": [
                          {
                            "content": "# Tutorial\n\nStep-by-step guide...",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "devto",
                          "title": "Building APIs with Node.js",
                          "tags": [
                            {
                              "value": "javascript",
                              "label": "javascript"
                            },
                            {
                              "value": "nodejs",
                              "label": "nodejs"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "hashnode": {
                  "summary": "Hashnode",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-hashnode-integration-id"
                        },
                        "value": [
                          {
                            "content": "# Getting Started\n\nArticle content here...",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "hashnode",
                          "title": "Getting Started with Postiz",
                          "subtitle": "A beginner's guide",
                          "publication": "publication-id",
                          "tags": [
                            {
                              "value": "webdev",
                              "label": "Web Development"
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "wordpress": {
                  "summary": "WordPress",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-wordpress-integration-id"
                        },
                        "value": [
                          {
                            "content": "Blog post content here...",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "wordpress",
                          "title": "My Blog Post",
                          "type": "post"
                        }
                      }
                    ]
                  }
                },
                "listmonk": {
                  "summary": "Listmonk",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-listmonk-integration-id"
                        },
                        "value": [
                          {
                            "content": "Newsletter content here...",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "listmonk",
                          "subject": "Weekly Newsletter",
                          "preview": "This week's highlights...",
                          "list": "list-id"
                        }
                      }
                    ]
                  }
                },
                "gmb": {
                  "summary": "Google My Business",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-gmb-integration-id"
                        },
                        "value": [
                          {
                            "content": "Check out our latest offers!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "gmb",
                          "topicType": "OFFER",
                          "callToActionType": "GET_OFFER",
                          "callToActionUrl": "https://example.com/offer",
                          "offerCouponCode": "SAVE20"
                        }
                      }
                    ]
                  }
                },
                "facebook": {
                  "summary": "Facebook",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-facebook-integration-id"
                        },
                        "value": [
                          {
                            "content": "Hello Facebook!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "facebook",
                          "url": "https://example.com"
                        }
                      }
                    ]
                  }
                },
                "warpcast": {
                  "summary": "Warpcast (Farcaster)",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-warpcast-integration-id"
                        },
                        "value": [
                          {
                            "content": "Hello Farcaster!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "warpcast",
                          "subreddit": [
                            {
                              "value": {
                                "id": "channel-id"
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                "moltbook": {
                  "summary": "Moltbook",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-moltbook-integration-id"
                        },
                        "value": [
                          {
                            "content": "Hello Moltbook!",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "moltbook",
                          "submolt": "submolt-id"
                        }
                      }
                    ]
                  }
                },
                "skool": {
                  "summary": "Skool",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-skool-integration-id"
                        },
                        "value": [
                          {
                            "content": "Post content here...",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "skool",
                          "group": "group-id",
                          "label": "label-id",
                          "title": "My Skool Post"
                        }
                      }
                    ]
                  }
                },
                "whop": {
                  "summary": "Whop",
                  "value": {
                    "type": "schedule",
                    "date": "2024-12-14T10:00:00.000Z",
                    "shortLink": false,
                    "tags": [],
                    "posts": [
                      {
                        "integration": {
                          "id": "your-whop-integration-id"
                        },
                        "value": [
                          {
                            "content": "Post content here...",
                            "image": []
                          }
                        ],
                        "settings": {
                          "__type": "whop",
                          "company": "company-id",
                          "experience": "experience-id",
                          "title": "My Whop Post"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Post created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "postId": {
                        "type": "string"
                      },
                      "integration": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": [
                  {
                    "postId": "post-123",
                    "integration": "integration-456"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/posts/{id}": {
      "delete": {
        "tags": [
          "Posts"
        ],
        "summary": "Delete a post by ID",
        "description": "Delete a post by its ID. The API will look up the post and delete all posts in the same group.",
        "operationId": "deletePost",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post ID to delete",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Post deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "deleted-post-id"
                }
              }
            }
          }
        }
      }
    },
    "/posts/group/{group}": {
      "delete": {
        "tags": [
          "Posts"
        ],
        "summary": "Delete a post by group",
        "description": "Delete all posts in a group by the group identifier.",
        "operationId": "deletePostByGroup",
        "parameters": [
          {
            "name": "group",
            "in": "path",
            "required": true,
            "description": "Group identifier to delete",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Posts deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "deleted-group-id"
                }
              }
            }
          }
        }
      }
    },
    "/posts/{id}/missing": {
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "Get missing content",
        "description": "When a post has been published but the platform did not return a usable post ID (the `releaseId` is set to `\"missing\"`), this endpoint fetches recent content from the provider so you can match and connect the correct one to the post.\n\nThe provider must implement the optional `missing` method. If the provider does not support it, an empty array is returned.",
        "operationId": "getMissingContent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of recent content items from the provider",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MissingContentItem"
                  }
                },
                "example": [
                  {
                    "id": "7321456789012345678",
                    "url": "https://p16-sign.tiktokcdn-us.com/obj/cover-image.jpeg"
                  },
                  {
                    "id": "7321456789012345679",
                    "url": "https://p16-sign.tiktokcdn-us.com/obj/cover-image2.jpeg"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/posts/{id}/release-id": {
      "put": {
        "tags": [
          "Posts"
        ],
        "summary": "Update release ID",
        "description": "Updates the `releaseId` of a post that currently has its release ID set to `\"missing\"`. This connects the post to its actual published content on the platform, enabling analytics and statistics tracking.\n\nTypically used after calling the **Get Missing Content** endpoint to retrieve the list of available content items.",
        "operationId": "updateReleaseId",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "releaseId"
                ],
                "properties": {
                  "releaseId": {
                    "type": "string",
                    "description": "The platform-specific content ID to connect to this post"
                  }
                }
              },
              "example": {
                "releaseId": "7321456789012345678"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Release ID updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "releaseId": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "post-123",
                  "releaseId": "7321456789012345678"
                }
              }
            }
          }
        }
      }
    },
    "/posts/{id}/status": {
      "put": {
        "tags": [
          "Posts"
        ],
        "summary": "Change post status",
        "description": "Moves a post between `draft` and `schedule` state.\n\n- `schedule` → sets the post state to `QUEUE` and (re)starts the publishing workflow so it will be published at its stored date.\n- `draft` → sets the post state to `DRAFT` and terminates any currently running publishing workflow for the post, so it will not be published.\n\nThe post keeps its stored date; only the state (and the workflow) changes.",
        "operationId": "changePostStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "schedule"
                    ],
                    "description": "New status for the post"
                  }
                }
              },
              "example": {
                "status": "schedule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Post status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "DRAFT",
                        "QUEUE"
                      ]
                    }
                  }
                },
                "example": {
                  "id": "post-123",
                  "state": "QUEUE"
                }
              }
            }
          },
          "400": {
            "description": "Invalid status or post not found"
          }
        }
      }
    },
    "/analytics/{integration}": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "Get platform analytics",
        "description": "Get analytics data for a specific integration/channel. Returns metrics like followers, impressions, engagement, etc. depending on the platform.",
        "operationId": "getAnalytics",
        "parameters": [
          {
            "name": "integration",
            "in": "path",
            "required": true,
            "description": "Integration ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "Number of days to look back for analytics data (e.g. 7, 30, 90)",
            "schema": {
              "type": "string"
            },
            "example": "7"
          }
        ],
        "responses": {
          "200": {
            "description": "Analytics data for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AnalyticsData"
                  }
                },
                "example": [
                  {
                    "label": "Followers",
                    "data": [
                      {
                        "total": "1250",
                        "date": "2025-01-01"
                      },
                      {
                        "total": "1280",
                        "date": "2025-01-02"
                      }
                    ],
                    "percentageChange": 2.4
                  },
                  {
                    "label": "Impressions",
                    "data": [
                      {
                        "total": "5000",
                        "date": "2025-01-01"
                      },
                      {
                        "total": "5200",
                        "date": "2025-01-02"
                      }
                    ],
                    "percentageChange": 4
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/analytics/post/{postId}": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "Get post analytics",
        "description": "Get analytics data for a specific published post. Returns metrics like likes, comments, shares, impressions, etc. depending on the platform.",
        "operationId": "getPostAnalytics",
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Post ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "Number of days to look back for analytics data (e.g. 7, 30, 90)",
            "schema": {
              "type": "string"
            },
            "example": "7"
          }
        ],
        "responses": {
          "200": {
            "description": "Analytics data for the post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AnalyticsData"
                  }
                },
                "example": [
                  {
                    "label": "Likes",
                    "data": [
                      {
                        "total": "150",
                        "date": "2025-01-01"
                      },
                      {
                        "total": "175",
                        "date": "2025-01-02"
                      }
                    ],
                    "percentageChange": 16.7
                  },
                  {
                    "label": "Comments",
                    "data": [
                      {
                        "total": "25",
                        "date": "2025-01-01"
                      },
                      {
                        "total": "30",
                        "date": "2025-01-02"
                      }
                    ],
                    "percentageChange": 20
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/upload": {
      "post": {
        "tags": [
          "Uploads"
        ],
        "summary": "Upload a file",
        "description": "Upload a media file using multipart form data.",
        "operationId": "uploadFile",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file to upload"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File uploaded successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaFile"
                }
              }
            }
          }
        }
      }
    },
    "/upload-from-url": {
      "post": {
        "tags": [
          "Uploads"
        ],
        "summary": "Upload from URL",
        "description": "Upload a file from an existing URL.",
        "operationId": "uploadFromUrl",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "URL of the file to upload"
                  }
                },
                "required": [
                  "url"
                ]
              },
              "example": {
                "url": "https://example.com/image.png"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File uploaded successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaFile"
                }
              }
            }
          }
        }
      }
    },
    "/notifications": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List notifications",
        "description": "Get paginated notifications for your organization, sorted by most recent first. Returns 100 notifications per page.",
        "operationId": "listNotifications",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number (0-indexed). Defaults to 0.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "example": 0
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of notifications",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationsResponse"
                },
                "example": {
                  "notifications": [
                    {
                      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "content": "Your post to X was published successfully",
                      "link": null,
                      "createdAt": "2025-01-15T10:30:00.000Z"
                    },
                    {
                      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                      "content": "Failed to publish post to LinkedIn",
                      "link": null,
                      "createdAt": "2025-01-15T09:15:00.000Z"
                    }
                  ],
                  "total": 250,
                  "page": 0,
                  "limit": 100,
                  "hasMore": true
                }
              }
            }
          }
        }
      }
    },
    "/generate-video": {
      "post": {
        "tags": [
          "Video Generation"
        ],
        "summary": "Generate a video",
        "description": "Create AI-generated videos for your posts.",
        "operationId": "generateVideo",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoGenerationRequest"
              },
              "examples": {
                "image-text-slides": {
                  "summary": "Image Text Slides",
                  "value": {
                    "type": "image-text-slides",
                    "output": "vertical",
                    "customParams": {
                      "voice": "elevenlabs-voice-id",
                      "prompt": "Description of the video content"
                    }
                  }
                },
                "veo3": {
                  "summary": "VEO3 Fast Video",
                  "value": {
                    "type": "veo3",
                    "output": "vertical",
                    "customParams": {
                      "prompt": "A scenic view of mountains at sunset",
                      "images": []
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Video generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string",
                        "description": "URL of the generated video"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/video/function": {
      "post": {
        "tags": [
          "Video Generation"
        ],
        "summary": "Video function",
        "description": "Execute video-related functions like loading available voices.",
        "operationId": "videoFunction",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "functionName": {
                    "type": "string",
                    "description": "Function to execute"
                  },
                  "identifier": {
                    "type": "string",
                    "description": "Video type identifier"
                  },
                  "params": {
                    "type": "object",
                    "description": "Additional parameters"
                  }
                },
                "required": [
                  "functionName",
                  "identifier"
                ]
              },
              "example": {
                "functionName": "loadVoices",
                "identifier": "image-text-slides"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Function executed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "voices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Your Postiz API key"
      }
    },
    "schemas": {
      "Integration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique integration ID"
          },
          "name": {
            "type": "string",
            "description": "Display name of the account"
          },
          "identifier": {
            "type": "string",
            "description": "Provider identifier (27 platforms supported)",
            "enum": [
              "x",
              "linkedin",
              "linkedin-page",
              "facebook",
              "instagram",
              "instagram-standalone",
              "threads",
              "bluesky",
              "mastodon",
              "warpcast",
              "nostr",
              "vk",
              "youtube",
              "tiktok",
              "reddit",
              "lemmy",
              "discord",
              "slack",
              "telegram",
              "kick",
              "twitch",
              "pinterest",
              "dribbble",
              "medium",
              "devto",
              "hashnode",
              "wordpress",
              "gmb",
              "listmonk",
              "moltbook",
              "skool",
              "whop"
            ]
          },
          "picture": {
            "type": "string",
            "description": "Profile picture URL"
          },
          "disabled": {
            "type": "boolean",
            "description": "Whether the integration is disabled"
          },
          "profile": {
            "type": "string",
            "description": "Profile handle/username"
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          }
        }
      },
      "Group": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique group (customer) ID"
          },
          "name": {
            "type": "string",
            "description": "Group (customer) display name"
          }
        }
      },
      "MediaFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique file ID"
          },
          "name": {
            "type": "string",
            "description": "File name"
          },
          "path": {
            "type": "string",
            "description": "File URL"
          },
          "organizationId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "example": {
          "id": "e639003b-f727-4a1e-87bd-74a2c48ae41e",
          "name": "image.png",
          "path": "https://uploads.postiz.com/image.png",
          "organizationId": "85460a39-6329-4cf4-a252-187ce89a3480",
          "createdAt": "2024-12-14T08:18:54.274Z",
          "updatedAt": "2024-12-14T08:18:54.274Z"
        }
      },
      "PostsResponse": {
        "type": "object",
        "properties": {
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Post"
            }
          }
        }
      },
      "Post": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "publishDate": {
            "type": "string",
            "format": "date-time"
          },
          "releaseURL": {
            "type": "string",
            "description": "URL of the published post"
          },
          "state": {
            "type": "string",
            "enum": [
              "QUEUE",
              "PUBLISHED",
              "ERROR",
              "DRAFT"
            ]
          },
          "integration": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "providerIdentifier": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "picture": {
                "type": "string"
              }
            }
          }
        }
      },
      "CreatePostRequest": {
        "type": "object",
        "required": [
          "type",
          "date",
          "shortLink",
          "tags"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "draft",
              "schedule",
              "now"
            ],
            "description": "Post type"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "Publish date in UTC ISO format"
          },
          "shortLink": {
            "type": "boolean",
            "description": "Whether to use short links"
          },
          "order": {
            "type": "string",
            "description": "Order of posts"
          },
          "inter": {
            "type": "number",
            "description": "Interval between posts"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          },
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostItem"
            },
            "description": "Required if type is not 'draft'"
          }
        }
      },
      "PostItem": {
        "type": "object",
        "required": [
          "integration",
          "value"
        ],
        "properties": {
          "integration": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Integration ID"
              }
            }
          },
          "value": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostContent"
            }
          },
          "group": {
            "type": "string",
            "description": "Group ID for related posts"
          },
          "settings": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/XSettings"
              },
              {
                "$ref": "#/components/schemas/LinkedInSettings"
              },
              {
                "$ref": "#/components/schemas/InstagramSettings"
              },
              {
                "$ref": "#/components/schemas/FacebookSettings"
              },
              {
                "$ref": "#/components/schemas/YouTubeSettings"
              },
              {
                "$ref": "#/components/schemas/TikTokSettings"
              },
              {
                "$ref": "#/components/schemas/RedditSettings"
              },
              {
                "$ref": "#/components/schemas/LemmySettings"
              },
              {
                "$ref": "#/components/schemas/PinterestSettings"
              },
              {
                "$ref": "#/components/schemas/DiscordSettings"
              },
              {
                "$ref": "#/components/schemas/SlackSettings"
              },
              {
                "$ref": "#/components/schemas/TwitchSettings"
              },
              {
                "$ref": "#/components/schemas/DribbbleSettings"
              },
              {
                "$ref": "#/components/schemas/MediumSettings"
              },
              {
                "$ref": "#/components/schemas/DevToSettings"
              },
              {
                "$ref": "#/components/schemas/HashnodeSettings"
              },
              {
                "$ref": "#/components/schemas/WordpressSettings"
              },
              {
                "$ref": "#/components/schemas/ListmonkSettings"
              },
              {
                "$ref": "#/components/schemas/GmbSettings"
              },
              {
                "$ref": "#/components/schemas/WarpcastSettings"
              },
              {
                "$ref": "#/components/schemas/MoltbookSettings"
              },
              {
                "$ref": "#/components/schemas/SkoolSettings"
              },
              {
                "$ref": "#/components/schemas/WhopSettings"
              },
              {
                "$ref": "#/components/schemas/EmptySettings"
              }
            ],
            "description": "Provider-specific settings"
          }
        }
      },
      "PostContent": {
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "description": "Post text content"
          },
          "id": {
            "type": "string",
            "description": "Post ID (for updates)"
          },
          "image": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Media"
            }
          }
        }
      },
      "Media": {
        "type": "object",
        "required": [
          "id",
          "path"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        }
      },
      "Tag": {
        "type": "object",
        "required": [
          "value",
          "label"
        ],
        "properties": {
          "value": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      },
      "XSettings": {
        "title": "X (Twitter)",
        "type": "object",
        "required": [
          "__type",
          "who_can_reply_post"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "x"
            ],
            "description": "Must be 'x'"
          },
          "who_can_reply_post": {
            "type": "string",
            "enum": [
              "everyone",
              "following",
              "mentionedUsers",
              "subscribers",
              "verified"
            ],
            "description": "Who can reply to the post"
          },
          "community": {
            "type": "string",
            "description": "X Community URL (format: https://x.com/i/communities/123)"
          }
        }
      },
      "LinkedInSettings": {
        "title": "LinkedIn",
        "type": "object",
        "required": [
          "__type"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "linkedin",
              "linkedin-page"
            ],
            "description": "Use 'linkedin' for profiles, 'linkedin-page' for company pages"
          },
          "post_as_images_carousel": {
            "type": "boolean",
            "description": "Display multiple images as a carousel"
          },
          "carousel_name": {
            "type": "string",
            "description": "Name for the carousel document"
          }
        }
      },
      "InstagramSettings": {
        "title": "Instagram",
        "type": "object",
        "required": [
          "__type",
          "post_type"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "instagram",
              "instagram-standalone"
            ],
            "description": "Use 'instagram' for FB-linked, 'instagram-standalone' for standalone"
          },
          "post_type": {
            "type": "string",
            "enum": [
              "post",
              "story"
            ],
            "description": "Type of Instagram post"
          },
          "is_trial_reel": {
            "type": "boolean",
            "description": "Whether to post as a trial reel"
          },
          "graduation_strategy": {
            "type": "string",
            "enum": [
              "MANUAL",
              "SS_PERFORMANCE"
            ],
            "description": "Graduation strategy for trial reels"
          },
          "collaborators": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "Collaborator username"
                }
              }
            }
          }
        }
      },
      "YouTubeSettings": {
        "title": "YouTube",
        "type": "object",
        "required": [
          "__type",
          "title",
          "type"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "youtube"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 2,
            "maxLength": 100,
            "description": "Video title"
          },
          "type": {
            "type": "string",
            "enum": [
              "public",
              "private",
              "unlisted"
            ],
            "description": "Video visibility"
          },
          "selfDeclaredMadeForKids": {
            "type": "string",
            "enum": [
              "yes",
              "no"
            ],
            "description": "Made for kids declaration"
          },
          "thumbnail": {
            "$ref": "#/components/schemas/Media",
            "description": "Custom thumbnail"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          }
        }
      },
      "TikTokSettings": {
        "title": "TikTok",
        "type": "object",
        "required": [
          "__type",
          "privacy_level",
          "duet",
          "stitch",
          "comment",
          "autoAddMusic",
          "brand_content_toggle",
          "brand_organic_toggle",
          "content_posting_method"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "tiktok"
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 90,
            "description": "Used as the title of the post. The only setting TikTok keeps when content_posting_method=UPLOAD."
          },
          "privacy_level": {
            "type": "string",
            "enum": [
              "PUBLIC_TO_EVERYONE",
              "MUTUAL_FOLLOW_FRIENDS",
              "FOLLOWER_OF_CREATOR",
              "SELF_ONLY"
            ],
            "description": "Applied only when content_posting_method=DIRECT_POST. Ignored by TikTok on UPLOAD."
          },
          "duet": {
            "type": "boolean",
            "description": "Video posts only, and only when content_posting_method=DIRECT_POST. TikTok has no duet setting for photo posts."
          },
          "stitch": {
            "type": "boolean",
            "description": "Video posts only, and only when content_posting_method=DIRECT_POST. TikTok has no stitch setting for photo posts."
          },
          "comment": {
            "type": "boolean",
            "description": "Applied only when content_posting_method=DIRECT_POST. Ignored by TikTok on UPLOAD."
          },
          "autoAddMusic": {
            "type": "string",
            "enum": [
              "yes",
              "no"
            ],
            "description": "Photo posts only, and only when content_posting_method=DIRECT_POST. Ignored by TikTok on UPLOAD."
          },
          "brand_content_toggle": {
            "type": "boolean",
            "description": "Applied only when content_posting_method=DIRECT_POST. Ignored by TikTok on UPLOAD."
          },
          "brand_organic_toggle": {
            "type": "boolean",
            "description": "Applied only when content_posting_method=DIRECT_POST. Ignored by TikTok on UPLOAD."
          },
          "video_made_with_ai": {
            "type": "boolean",
            "description": "Labels the post as AI generated. Video posts only, and only when content_posting_method=DIRECT_POST. TikTok has no AI-generated label for photo posts, and discards it on UPLOAD."
          },
          "content_posting_method": {
            "type": "string",
            "enum": [
              "DIRECT_POST",
              "UPLOAD"
            ],
            "description": "Required. Use \"DIRECT_POST\" to actually publish the post to TikTok. \"UPLOAD\" does NOT publish: it only sends the media to the user's TikTok app inbox, where they must manually finish and publish it within 24 hours or it is discarded. Only use \"UPLOAD\" when the user explicitly asks to review or edit the post inside the TikTok app before publishing. \"UPLOAD\" also makes TikTok ignore every other setting in this object except the title."
          }
        }
      },
      "RedditSettings": {
        "title": "Reddit",
        "type": "object",
        "required": [
          "__type",
          "subreddit"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "reddit"
            ]
          },
          "subreddit": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "object",
                  "required": [
                    "subreddit",
                    "title",
                    "type",
                    "is_flair_required"
                  ],
                  "properties": {
                    "subreddit": {
                      "type": "string",
                      "minLength": 2,
                      "description": "Subreddit name without r/"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 2,
                      "description": "Post title"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "self",
                        "link",
                        "image",
                        "video"
                      ],
                      "description": "Post type"
                    },
                    "url": {
                      "type": "string",
                      "description": "URL for link posts"
                    },
                    "is_flair_required": {
                      "type": "boolean"
                    },
                    "flair": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "LemmySettings": {
        "title": "Lemmy",
        "type": "object",
        "required": [
          "__type",
          "subreddit"
        ],
        "description": "Lemmy uses 'subreddit' for communities (historical naming)",
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "lemmy"
            ]
          },
          "subreddit": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "object",
                  "required": [
                    "subreddit",
                    "id",
                    "title"
                  ],
                  "properties": {
                    "subreddit": {
                      "type": "string",
                      "minLength": 2,
                      "description": "Community name"
                    },
                    "id": {
                      "type": "string",
                      "description": "Community ID"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 2,
                      "description": "Post title"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Optional URL"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "PinterestSettings": {
        "title": "Pinterest",
        "type": "object",
        "required": [
          "__type",
          "board"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "pinterest"
            ]
          },
          "board": {
            "type": "string",
            "minLength": 1,
            "description": "Board ID"
          },
          "title": {
            "type": "string",
            "maxLength": 100
          },
          "link": {
            "type": "string",
            "format": "uri"
          },
          "dominant_color": {
            "type": "string"
          }
        }
      },
      "DiscordSettings": {
        "title": "Discord",
        "type": "object",
        "required": [
          "__type",
          "channel"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "discord"
            ]
          },
          "channel": {
            "type": "string",
            "minLength": 1,
            "description": "Discord channel ID"
          }
        }
      },
      "SlackSettings": {
        "title": "Slack",
        "type": "object",
        "required": [
          "__type",
          "channel"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "slack"
            ]
          },
          "channel": {
            "type": "string",
            "minLength": 1,
            "description": "Slack channel ID"
          }
        }
      },
      "DribbbleSettings": {
        "title": "Dribbble",
        "type": "object",
        "required": [
          "__type",
          "title"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "dribbble"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Shot title"
          },
          "team": {
            "type": "string",
            "format": "uri",
            "description": "Team URL"
          }
        }
      },
      "MediumSettings": {
        "title": "Medium",
        "type": "object",
        "required": [
          "__type",
          "title",
          "subtitle"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "medium"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 2,
            "description": "Article title"
          },
          "subtitle": {
            "type": "string",
            "minLength": 2,
            "description": "Article subtitle"
          },
          "canonical": {
            "type": "string",
            "format": "uri",
            "description": "Original URL for SEO"
          },
          "publication": {
            "type": "string",
            "description": "Publication ID to post to"
          },
          "tags": {
            "type": "array",
            "maxItems": 4,
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          }
        }
      },
      "DevToSettings": {
        "title": "Dev.to",
        "type": "object",
        "required": [
          "__type",
          "title"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "devto"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 2,
            "description": "Article title"
          },
          "main_image": {
            "$ref": "#/components/schemas/Media",
            "description": "Cover image"
          },
          "canonical": {
            "type": "string",
            "format": "uri",
            "description": "Original URL for SEO"
          },
          "organization": {
            "type": "string",
            "description": "Organization ID"
          },
          "tags": {
            "type": "array",
            "maxItems": 4,
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          }
        }
      },
      "HashnodeSettings": {
        "title": "Hashnode",
        "type": "object",
        "required": [
          "__type",
          "title",
          "tags"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "hashnode"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 6,
            "description": "Article title"
          },
          "subtitle": {
            "type": "string",
            "minLength": 2,
            "description": "Article subtitle"
          },
          "main_image": {
            "$ref": "#/components/schemas/Media",
            "description": "Cover image"
          },
          "canonical": {
            "type": "string",
            "format": "uri",
            "description": "Original URL for SEO"
          },
          "publication": {
            "type": "string",
            "description": "Publication ID (required)"
          },
          "tags": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          }
        }
      },
      "WordpressSettings": {
        "title": "WordPress",
        "type": "object",
        "required": [
          "__type",
          "title",
          "type"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "wordpress"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 2,
            "description": "Post title"
          },
          "main_image": {
            "$ref": "#/components/schemas/Media",
            "description": "Featured image"
          },
          "type": {
            "type": "string",
            "description": "Post type (depends on WordPress setup)"
          }
        }
      },
      "ListmonkSettings": {
        "title": "Listmonk",
        "type": "object",
        "required": [
          "__type",
          "subject",
          "preview",
          "list"
        ],
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "listmonk"
            ]
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "description": "Email subject line"
          },
          "preview": {
            "type": "string",
            "description": "Email preview text"
          },
          "list": {
            "type": "string",
            "description": "List ID to send to"
          },
          "template": {
            "type": "string",
            "description": "Template ID (optional)"
          }
        }
      },
      "GmbSettings": {
        "title": "Google My Business",
        "type": "object",
        "required": [
          "__type"
        ],
        "description": "Google My Business post settings",
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "gmb"
            ]
          },
          "topicType": {
            "type": "string",
            "enum": [
              "STANDARD",
              "EVENT",
              "OFFER"
            ],
            "description": "Post type"
          },
          "callToActionType": {
            "type": "string",
            "enum": [
              "NONE",
              "BOOK",
              "ORDER",
              "SHOP",
              "LEARN_MORE",
              "SIGN_UP",
              "GET_OFFER",
              "CALL"
            ],
            "description": "Call-to-action button"
          },
          "callToActionUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL for CTA (required if callToActionType is set)"
          },
          "eventTitle": {
            "type": "string",
            "description": "Event title (required for EVENT type)"
          },
          "eventStartDate": {
            "type": "string",
            "description": "Event start date"
          },
          "eventEndDate": {
            "type": "string",
            "description": "Event end date"
          },
          "eventStartTime": {
            "type": "string",
            "description": "Event start time"
          },
          "eventEndTime": {
            "type": "string",
            "description": "Event end time"
          },
          "offerCouponCode": {
            "type": "string",
            "description": "Coupon code (for OFFER type)"
          },
          "offerRedeemUrl": {
            "type": "string",
            "format": "uri",
            "description": "Redemption URL"
          },
          "offerTerms": {
            "type": "string",
            "description": "Offer terms and conditions"
          }
        }
      },
      "FacebookSettings": {
        "title": "Facebook",
        "type": "object",
        "required": [
          "__type"
        ],
        "description": "Facebook post settings",
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "facebook"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Optional link URL to include in the post"
          }
        }
      },
      "WarpcastSettings": {
        "title": "Warpcast",
        "type": "object",
        "required": [
          "__type"
        ],
        "description": "Warpcast (Farcaster) post settings",
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "warpcast"
            ]
          },
          "subreddit": {
            "type": "array",
            "description": "Farcaster channels to post to",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "object",
                  "required": [
                    "id"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Channel ID"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "EmptySettings": {
        "title": "Other Platforms (Threads, Mastodon, Bluesky, etc.)",
        "type": "object",
        "required": [
          "__type"
        ],
        "description": "For platforms that don't require additional settings",
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "threads",
              "mastodon",
              "bluesky",
              "telegram",
              "nostr",
              "vk",
              "kick"
            ],
            "description": "Platform identifier"
          }
        }
      },
      "NotificationsResponse": {
        "type": "object",
        "properties": {
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Notification"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of notifications"
          },
          "page": {
            "type": "integer",
            "description": "Current page number (0-indexed)"
          },
          "limit": {
            "type": "integer",
            "description": "Number of notifications per page (always 100)"
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether there are more pages available"
          }
        }
      },
      "Notification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique notification ID"
          },
          "content": {
            "type": "string",
            "description": "Notification message"
          },
          "link": {
            "type": "string",
            "nullable": true,
            "description": "Optional link associated with the notification"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the notification was created"
          }
        }
      },
      "MissingContentItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Platform-specific content ID"
          },
          "url": {
            "type": "string",
            "description": "Thumbnail or preview URL for the content"
          }
        }
      },
      "AnalyticsData": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Metric label (e.g. Followers, Impressions, Likes)"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "string",
                  "description": "Metric value for this date"
                },
                "date": {
                  "type": "string",
                  "description": "Date string (YYYY-MM-DD)"
                }
              }
            }
          },
          "percentageChange": {
            "type": "number",
            "description": "Percentage change over the selected period"
          }
        }
      },
      "VideoGenerationRequest": {
        "type": "object",
        "required": [
          "type",
          "output",
          "customParams"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image-text-slides",
              "veo3"
            ],
            "description": "Video generation type"
          },
          "output": {
            "type": "string",
            "enum": [
              "vertical",
              "horizontal"
            ],
            "description": "Video orientation"
          },
          "customParams": {
            "type": "object",
            "properties": {
              "voice": {
                "type": "string",
                "description": "ElevenLabs voice ID (for image-text-slides)"
              },
              "prompt": {
                "type": "string",
                "description": "Description/script for the video"
              },
              "images": {
                "type": "array",
                "maxItems": 3,
                "items": {
                  "$ref": "#/components/schemas/Media"
                },
                "description": "Reference images (for veo3, max 3)"
              }
            }
          }
        }
      },
      "TwitchSettings": {
        "title": "Twitch",
        "type": "object",
        "required": [
          "__type"
        ],
        "description": "Twitch post settings",
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "twitch"
            ]
          },
          "messageType": {
            "type": "string",
            "enum": [
              "message",
              "announcement"
            ],
            "description": "Message type"
          },
          "announcementColor": {
            "type": "string",
            "enum": [
              "primary",
              "blue",
              "green",
              "orange",
              "purple"
            ],
            "description": "Announcement color (only for announcement type)"
          }
        }
      },
      "MoltbookSettings": {
        "title": "Moltbook",
        "type": "object",
        "required": [
          "__type",
          "submolt"
        ],
        "description": "Moltbook post settings",
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "moltbook"
            ]
          },
          "submolt": {
            "type": "string",
            "minLength": 1,
            "description": "Submolt (community) ID"
          }
        }
      },
      "SkoolSettings": {
        "title": "Skool",
        "type": "object",
        "required": [
          "__type",
          "group",
          "label",
          "title"
        ],
        "description": "Skool post settings",
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "skool"
            ]
          },
          "group": {
            "type": "string",
            "minLength": 1,
            "description": "Group ID"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "description": "Label/category ID"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "Post title"
          }
        }
      },
      "WhopSettings": {
        "title": "Whop",
        "type": "object",
        "required": [
          "__type",
          "company",
          "experience"
        ],
        "description": "Whop post settings",
        "properties": {
          "__type": {
            "type": "string",
            "enum": [
              "whop"
            ]
          },
          "company": {
            "type": "string",
            "minLength": 1,
            "description": "Company ID"
          },
          "experience": {
            "type": "string",
            "minLength": 1,
            "description": "Experience/forum ID"
          },
          "title": {
            "type": "string",
            "description": "Post title"
          }
        }
      }
    }
  }
}