{
  "openapi": "3.1.0",
  "info": {
    "title": "PostDelegate Public API",
    "description": "REST API for PostDelegate, a social media scheduler by Nasida Apps LLC. List channels, upload media and create, read and delete posts.\n\n## Authentication\nSend your workspace API key in the `Authorization` header as the bare key, with no `Bearer` prefix:\n\n```\nAuthorization: YOUR_API_KEY\n```\n\nGet the key in the app under Settings > Agents / Dev (plans that include the API).\n\n## Rate limits\nPOST /posts is limited to 30 requests per hour per workspace. Batch several channels into one request.\n\n## Terminology\nThe app says channel; the API says integration.\n\nDocs: https://postdelegate.com/docs/api\n\n## License\nThis specification is adapted from the Postiz API reference (https://github.com/gitroomhq/postiz-docs), a Mintlify docs project published under the following license:\n\n```\nMIT License\n\nCopyright (c) 2023 Mintlify\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```",
    "license": {
      "name": "MIT",
      "identifier": "MIT"
    },
    "version": "1.0.0",
    "contact": {
      "name": "PostDelegate support",
      "email": "support@postdelegate.com",
      "url": "https://postdelegate.com/support"
    },
    "termsOfService": "https://app.postdelegate.com/legal/terms/",
    "x-license-notice": "MIT License\n\nCopyright (c) 2023 Mintlify\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
  },
  "servers": [
    {
      "url": "https://app.postdelegate.com/api/public/v1",
      "description": "PostDelegate"
    }
  ],
  "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": "Studio",
      "description": "Render vertical videos from the media library with the Studio templates. A render only saves a video to the media library; it never creates a post. Docs: https://postdelegate.com/docs/api/studio"
    }
  ],
  "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://media.postdelegate.com/example/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 networks that sign in on the network's own page are supported, such as YouTube, Discord, Mastodon or Google Business Profile (gmb). Networks that take a pasted credential, such as Bluesky, are not.",
        "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": {
          "201": {
            "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
                }
              }
            }
          }
        }
      }
    },
    "/me": {
      "get": {
        "tags": [
          "Integrations"
        ],
        "summary": "Get connected account",
        "description": "Returns the workspace these credentials act on. With an OAuth app token it also returns the PostDelegate user who approved the app, so your integration can show who is connected. API keys belong to the whole workspace, so `user` is `null`.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "description": "Connected workspace and user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "organization": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      }
                    },
                    "user": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "Only set for OAuth app tokens",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "picture": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Absolute URL of the user's avatar"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "organization": {
                    "id": "cm4ean69r0003w8w1cdomox9n",
                    "name": "My Company"
                  },
                  "user": {
                    "id": "cm4eamz9f0001w8w1k2b7x0ab",
                    "name": "Nevo David",
                    "picture": "https://media.postdelegate.com/example/avatar.jpg"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/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 PostDelegate 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://media.postdelegate.com/example/1.png"
                              },
                              {
                                "id": "img2",
                                "path": "https://media.postdelegate.com/example/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://media.postdelegate.com/example/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://media.postdelegate.com/example/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://media.postdelegate.com/example/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://media.postdelegate.com/example/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://media.postdelegate.com/example/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://media.postdelegate.com/example/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 PostDelegate",
                          "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 Business Profile",
                  "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",
                          "eventTitle": "20% off this week",
                          "eventStartDate": "2024-12-14",
                          "eventEndDate": "2024-12-21",
                          "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": {
          "201": {
            "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"
          }
        }
      }
    },
    "/posts/{id}/settings": {
      "put": {
        "tags": [
          "Posts"
        ],
        "summary": "Update post settings",
        "description": "Merges the given keys into the post's existing provider settings. Only the keys you pass are changed; content and publish date are untouched, so a running publishing workflow is not restarted. The merged settings are re-validated. Works only on not-yet-published posts (scheduled or draft).",
        "operationId": "updatePostSettings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Post ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "settings"
                ],
                "properties": {
                  "settings": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Provider settings to merge into the post's existing settings. Only the keys you pass are changed; everything else stays. Keys depend on the channel's platform."
                  }
                }
              },
              "example": {
                "settings": {
                  "content_posting_method": "DIRECT_POST"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Post settings updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string"
                    },
                    "publishDate": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "postId": "post-123",
                  "publishDate": "2026-08-01T10:00:00"
                }
              }
            }
          },
          "400": {
            "description": "The id belongs to a comment (pass the root post id), the post is already published or its publish time passed, or the merged settings failed validation"
          },
          "404": {
            "description": "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"
                  },
                  "adjust": {
                    "type": "string",
                    "default": "false",
                    "description": "Adjust the file to the platforms' limits after the upload: videos are scaled to a 1080 px short side (long side at most 1920 px) and re-encoded to H.264 MP4 with AAC audio, images larger than that are scaled down. Runs in the background, poll GET /media/{id}/status for the result. Defaults to false.",
                    "enum": [
                      "true",
                      "false"
                    ]
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "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"
                  },
                  "adjust": {
                    "type": "boolean",
                    "default": false,
                    "description": "Adjust the file to the platforms' limits after the upload: videos are scaled to a 1080 px short side (long side at most 1920 px) and re-encoded to H.264 MP4 with AAC audio, images larger than that are scaled down. Runs in the background, poll GET /media/{id}/status for the result. Defaults to false."
                  }
                },
                "required": [
                  "url"
                ]
              },
              "example": {
                "url": "https://example.com/image.png"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "File uploaded successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaFile"
                }
              }
            }
          }
        }
      }
    },
    "/media/{id}/status": {
      "get": {
        "tags": [
          "Uploads"
        ],
        "summary": "Get media status",
        "description": "Check whether a file uploaded with adjust set to true finished adjusting. A failed adjustment returns status \"ready\" with a warning: the original file was kept and is used for publishing.",
        "operationId": "getMediaStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The media id returned by the upload",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Media status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "processing",
                        "ready",
                        "failed"
                      ]
                    },
                    "warning": {
                      "type": "string",
                      "description": "Present when the adjustment failed and the original file was kept"
                    },
                    "error": {
                      "type": "string",
                      "description": "Present with status \"failed\", only when the adjustment failed and the original file's format cannot be published as is"
                    }
                  }
                },
                "example": {
                  "id": "e639003b-f727-4a1e-87bd-74a2c48ae41e",
                  "path": "https://media.postdelegate.com/example/video.mp4",
                  "status": "ready"
                }
              }
            }
          },
          "404": {
            "description": "Media not found"
          }
        }
      }
    },
    "/media": {
      "get": {
        "tags": [
          "Uploads"
        ],
        "summary": "List media",
        "description": "List the media files already uploaded to your organization's media library, newest first, 18 per page.",
        "operationId": "listMedia",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page number (1-indexed). Defaults to 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Case-insensitive filter on the original file name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of media files",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pages": {
                      "type": "integer",
                      "description": "Total number of pages"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MediaListItem"
                      }
                    }
                  }
                },
                "example": {
                  "pages": 2,
                  "results": [
                    {
                      "id": "e639003b-f727-4a1e-87bd-74a2c48ae41e",
                      "name": "6fba0ef5febb4400ae8778a5b854224d.png",
                      "originalName": "cover-cyan.png",
                      "path": "https://media.postdelegate.com/example/6fba0ef5febb4400ae8778a5b854224d.png",
                      "createdAt": "2024-12-14T08:18:54.274Z"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/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
                }
              }
            }
          }
        }
      }
    },
    "/studio/templates": {
      "get": {
        "tags": [
          "Studio"
        ],
        "summary": "List Studio templates",
        "operationId": "listStudioTemplates",
        "description": "Lists the templates with the JSON schema of the `spec` each one takes. New templates appear here by themselves, so read the schema instead of hard-coding it.",
        "responses": {
          "200": {
            "description": "Templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/StudioTemplate"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/studio/renders": {
      "post": {
        "tags": [
          "Studio"
        ],
        "summary": "Start a Studio render",
        "operationId": "startStudioRender",
        "description": "Makes a Studio project from a template and a spec and starts rendering it. Limited to 30 requests per workspace per hour, refused requests included. Poll GET /studio/renders/{id} until the status is completed, failed or cancelled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioRenderRequest"
              },
              "example": {
                "template": "hook-over-clip",
                "name": "Launch teaser",
                "spec": {
                  "input": {
                    "mediaId": "MEDIA_ID"
                  },
                  "trim": {
                    "start": 4,
                    "end": 19
                  },
                  "hook": {
                    "text": "We shipped exports",
                    "position": "top"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The render started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "projectId": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "RENDER_ID",
                  "projectId": "PROJECT_ID"
                }
              }
            }
          },
          "400": {
            "description": "Unknown template, a spec that does not follow the schema, a media that is not in the media library or not ready, or a video longer than 90 seconds"
          },
          "406": {
            "description": "Studio needs an active plan, or the trial videos are used"
          },
          "429": {
            "description": "Too many requests this hour, 3 videos already waiting, or the daily limit is reached"
          },
          "503": {
            "description": "Studio is not available"
          }
        }
      }
    },
    "/studio/renders/{id}": {
      "get": {
        "tags": [
          "Studio"
        ],
        "summary": "Get a Studio render",
        "operationId": "getStudioRender",
        "description": "Returns a render. On completed, mediaId and path are the new video in the media library.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The render id returned by POST /studio/renders",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The render",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StudioRender"
                }
              }
            }
          },
          "404": {
            "description": "Render not found, including renders of another workspace"
          }
        }
      }
    },
    "/studio/renders/{id}/cancel": {
      "post": {
        "tags": [
          "Studio"
        ],
        "summary": "Cancel a Studio render",
        "operationId": "cancelStudioRender",
        "description": "Stops a render that is still waiting or rendering and returns it. A render that already ended is returned as it is.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The render id returned by POST /studio/renders",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "The render",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StudioRender"
                }
              }
            }
          },
          "404": {
            "description": "Render not found"
          },
          "503": {
            "description": "Studio is not available"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Your PostDelegate workspace API key, or an OAuth app access token (starts with pos_), as the bare value with no Bearer prefix"
      }
    },
    "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"
          }
        }
      },
      "MediaListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique file ID"
          },
          "name": {
            "type": "string",
            "description": "Stored file name"
          },
          "originalName": {
            "type": [
              "string",
              "null"
            ],
            "description": "File name as uploaded (searchable)"
          },
          "path": {
            "type": "string",
            "description": "Public file URL, usable as a post attachment"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "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"
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "processing"
            ],
            "description": "\"processing\" while an upload with adjust set to true is being adjusted, otherwise \"ready\""
          }
        },
        "example": {
          "id": "e639003b-f727-4a1e-87bd-74a2c48ae41e",
          "name": "image.png",
          "path": "https://media.postdelegate.com/example/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"
          },
          "settings": {
            "type": "object",
            "additionalProperties": true,
            "description": "The post's current provider-specific settings (the same shape used when creating the post). Keys depend on the channel's platform.",
            "example": {
              "content_posting_method": "DIRECT_POST"
            }
          },
          "publishDate": {
            "type": "string",
            "format": "date-time"
          },
          "releaseURL": {
            "type": "string",
            "description": "URL of the published post"
          },
          "state": {
            "type": "string",
            "enum": [
              "QUEUE",
              "PUBLISHED",
              "ERROR",
              "DRAFT"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "For posts in the ERROR state, the error message reported by the platform when it rejected the post (the same message shown in the calendar tooltip). `null` when the post did not fail or no platform message is available.",
            "example": "Account banned from posting, please check TikTok account status"
          },
          "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"
          },
          "thumbnailTimestamp": {
            "type": "number",
            "description": "Milliseconds into the video to use as the cover/thumbnail frame. Supported by Instagram, Instagram Standalone, TikTok Business, and TikTok (Direct Post only, not the UPLOAD/inbox flow); other providers ignore it. For TikTok, in our testing the cover was applied only to public posts (privacy_level PUBLIC_TO_EVERYONE)."
          }
        }
      },
      "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 Business Profile",
        "type": "object",
        "required": [
          "__type"
        ],
        "description": "Google Business Profile post settings. A post is up to 1,500 characters with one optional image. Videos are not supported. Dates are YYYY-MM-DD; event dates default to the day the post is published, and event times are HH:mm. The CALL button dials the phone number on the Business Profile and takes no URL.",
        "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, except NONE and CALL, which dials the phone number of the profile)"
          },
          "eventTitle": {
            "type": "string",
            "description": "Event or offer title (required for EVENT and OFFER types)"
          },
          "eventStartDate": {
            "type": "string",
            "description": "Event or offer start date (required for OFFER type)"
          },
          "eventEndDate": {
            "type": "string",
            "description": "Event or offer end date (required for OFFER type)"
          },
          "eventStartTime": {
            "type": "string",
            "description": "Event start time (HH:mm), optional"
          },
          "eventEndTime": {
            "type": "string",
            "description": "Event end time (HH:mm), optional"
          },
          "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",
              "null"
            ],
            "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"
          }
        }
      },
      "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"
          }
        }
      },
      "StudioTemplate": {
        "type": "object",
        "properties": {
          "identifier": {
            "type": "string",
            "description": "Pass it as `template` to POST /studio/renders",
            "example": "hook-over-clip"
          },
          "title": {
            "type": "string",
            "example": "Hook over clip"
          },
          "description": {
            "type": "string"
          },
          "captions": {
            "type": "boolean",
            "description": "The template shows captions: send what is said in `captions.script`"
          },
          "schema": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON schema of the `spec` a render of this template takes"
          }
        },
        "required": [
          "identifier",
          "title",
          "description",
          "captions",
          "schema"
        ]
      },
      "StudioRenderRequest": {
        "type": "object",
        "required": [
          "template",
          "spec"
        ],
        "properties": {
          "template": {
            "type": "string",
            "maxLength": 100,
            "description": "An `identifier` from GET /studio/templates"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Name of the project in Studio, the template's title by default"
          },
          "spec": {
            "type": "object",
            "additionalProperties": true,
            "description": "Follows the template's `schema`. Media are ids from your own media library, never URLs"
          }
        }
      },
      "StudioRender": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "rendering",
              "uploading",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "progress": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "seconds": {
            "type": [
              "number",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a failed render failed"
          },
          "mediaId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The new video in the media library, once completed"
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnail": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  },
  "externalDocs": {
    "url": "https://postdelegate.com/docs/api",
    "description": "PostDelegate API docs"
  }
}
