{
  "openapi": "3.0.1",
  "info": {
    "title": "Postoria Public API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.postoria.io"
    }
  ],
  "paths": {
    "/v1/workspaces": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List workspaces",
        "description": "Lists workspaces available to the authenticated Postoria account.",
        "operationId": "GetWorkspaces",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponseOfWorkspaceResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/social-accounts": {
      "get": {
        "tags": [
          "Social Accounts"
        ],
        "summary": "List social accounts",
        "description": "Lists social accounts in the workspace.",
        "operationId": "GetWorkspaceSocialAccounts",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponseOfSocialAccountResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/social-accounts/{social_account_id}": {
      "patch": {
        "tags": [
          "Social Accounts"
        ],
        "summary": "Update a social account",
        "description": "Updates the custom name and/or metadata of a social account. Supplied metadata replaces the complete metadata object; set it to null to clear it. Omitted fields are unchanged.",
        "operationId": "UpdateWorkspaceSocialAccount",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "social_account_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSocialAccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SocialAccountResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/queues": {
      "get": {
        "tags": [
          "Queues"
        ],
        "summary": "List queues",
        "description": "Lists posting queues in the workspace.",
        "operationId": "GetWorkspaceQueues",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponseOfQueueResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/media/uploads": {
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Create a media upload",
        "description": "Creates a media item and returns `upload.url`. `content_type` is the file MIME type and must be supported for the filename extension. Upload the file to that URL, then call the Complete media upload endpoint and poll the Get media status endpoint until its status is `ready` or `failed`.",
        "operationId": "CreateMediaUpload",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMediaUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/media/{media_id}/complete": {
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Complete a media upload",
        "description": "Starts processing a file uploaded to `upload.url`. Poll the Get media status endpoint until the status is `ready` or `failed`.",
        "operationId": "CompleteMediaUpload",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "media_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/media/imports": {
      "post": {
        "tags": [
          "Media"
        ],
        "summary": "Import media from a URL",
        "description": "Starts importing media from the supplied URL. Poll the Get media status endpoint until the status is `ready` or `failed`.",
        "operationId": "ImportMedia",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportMediaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/media/{media_id}": {
      "get": {
        "tags": [
          "Media"
        ],
        "summary": "Get media status",
        "description": "Returns the processing status of a media item. `media_id` identifies the Public API media item; `file_id` is available only after processing and is Postoria's internal file ID.",
        "operationId": "GetMedia",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "media_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/posts": {
      "post": {
        "tags": [
          "Posts"
        ],
        "summary": "Create a post",
        "description": "Creates a post for the selected social accounts.\n\n`publish_mode` is `publish_now`, `schedule`, or `queue`. `scheduled_time` is required only for `schedule`; `queue_id` is required only for `queue`; neither is allowed for `publish_now`.\n\n`content_type` controls the post shape: `text`, `image`, `video`, `carousel`, `document`, `link`, `story`, or `reel`. Referenced media must be `ready`. For a video, `thumbnail_media_id` belongs to its corresponding `media_id` and must reference an image. `comment_delay` is measured in minutes.\n\nSet `is_ai_generated` to `true` to request the supported platforms' AI-generated-content disclosure. It is ignored by platforms and content types that do not support it, including TikTok photo posts. If omitted, it defaults to `false`.\n\nUse `facebook.also_publish_media_to_stories` and `instagram.also_publish_media_to_stories` to publish regular-post media to Stories in the corresponding network.\n\nAll selected social accounts must support the selected content type; otherwise, the request is rejected. Publication outcomes are returned per account in `results` when available. For scheduled and queued posts, results may not be available until the post has been processed. A post can have a mix of successful and failed account results.\n\nSchedule example:\n```json\n{\"publish_mode\":\"schedule\",\"social_account_ids\":[123],\"content_type\":\"video\",\"media\":[{\"media_id\":456,\"thumbnail_media_id\":457}],\"caption\":\"Example caption\",\"scheduled_time\":\"2026-07-27T10:00:00Z\"}\n```\n\nQueue example: `{\"publish_mode\":\"queue\",\"social_account_ids\":[123],\"content_type\":\"image\",\"media\":[{\"media_id\":456}],\"queue_id\":12}`.\n\nPublish-now example: `{\"publish_mode\":\"publish_now\",\"social_account_ids\":[123],\"content_type\":\"text\",\"caption\":\"Example caption\"}`.",
        "operationId": "CreatePost",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePostRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "List posts",
        "description": "Lists posts. `date_from` and `date_to` are ISO 8601 UTC timestamps. `pagination.next` is a full URL for the next page.",
        "operationId": "ListPosts",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "account_ids",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "queue_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "networks",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponseOfPostResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/posts/{post_id}": {
      "get": {
        "tags": [
          "Posts"
        ],
        "summary": "Get a post",
        "description": "Gets a post and its per-network content. `date` is the scheduled publication time; it can be null for queue and immediate posts.",
        "operationId": "GetPost",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Posts"
        ],
        "summary": "Delete a post",
        "description": "Deletes the post from Postoria. It does not delete posts already published to social networks. If publishing has already started, deleting the Postoria post does not stop that publication. Account results are removed with the post and cannot be retrieved afterwards.",
        "operationId": "DeletePost",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/analytics/posts": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "Get post analytics",
        "description": "Returns current analytics for 1 to 100 posts. Repeat `post_ids` for each ID. Every post must belong to the workspace; otherwise the entire request fails. Metrics not supplied by a network are omitted, while a known zero is returned as zero.",
        "operationId": "GetPostAnalytics",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "post_ids",
            "in": "query",
            "description": "One to 100 positive Postoria post IDs. Repeat the query parameter for each ID, for example: ?post_ids=1&post_ids=2. Duplicate IDs are accepted and treated as one ID.",
            "required": true,
            "style": "form",
            "schema": {
              "maxItems": 100,
              "minItems": 1,
              "type": "array",
              "items": {
                "minimum": 1,
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListResponseOfPostAnalyticsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workspaces/{workspace_id}/analytics/post-performance/summary": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "Get post performance summary",
        "description": "Groups posts by their publication time and aggregates their latest available metrics. It does not report when views, reactions, or other interactions occurred. `published_from` is inclusive and `published_to` is exclusive; both must be UTC timestamps and the period cannot exceed 366 days. Optional `granularity` is `hour`, `day`, `month`, or `year` and uses the workspace timezone; `timezone` is returned only when `granularity` is specified. Optional `group_by` is `network`, `content_type`, or `social_account`; when omitted, no grouping dimension is applied. `post_count` is the number of distinct Postoria posts contributing to the item. `video_skip_rate` and `video_average_watch_time_milliseconds` are not included because they cannot be summed correctly.",
        "operationId": "GetPostPerformanceSummary",
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "published_from",
            "in": "query",
            "description": "Inclusive publication-time lower bound. Must be an ISO 8601 UTC timestamp with a Z or +00:00 offset.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "published_to",
            "in": "query",
            "description": "Exclusive publication-time upper bound. Must be an ISO 8601 UTC timestamp with a Z or +00:00 offset and no more than 366 days after published_from.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "description": "Optional publication-time bucket size. Buckets use the workspace timezone; omit for no time bucketing.",
            "schema": {
              "enum": [
                "hour",
                "day",
                "month",
                "year"
              ],
              "type": "string"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "description": "Optional grouping dimension; omit for no additional grouping.",
            "schema": {
              "enum": [
                "network",
                "content_type",
                "social_account"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostPerformanceSummaryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PostResponseFile": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Public URL of the media file.",
            "format": "uri"
          },
          "thumbnail_url": {
            "type": "string",
            "description": "Public thumbnail URL, when available.",
            "format": "uri",
            "nullable": true
          }
        }
      },
      "AnalyticsMetric": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "BlueskyPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "comment_delay": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "CreateMediaUploadRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          }
        }
      },
      "CreatePostRequest": {
        "type": "object",
        "properties": {
          "publish_mode": {
            "$ref": "#/components/schemas/PublishMode"
          },
          "social_account_ids": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "content_type": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostMedia"
            }
          },
          "caption": {
            "type": "string",
            "nullable": true
          },
          "link_url": {
            "type": "string",
            "nullable": true
          },
          "first_comment": {
            "type": "string",
            "nullable": true
          },
          "comment_delay": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "is_ai_generated": {
            "type": "boolean"
          },
          "scheduled_time": {
            "$ref": "#/components/schemas/NullableInstant"
          },
          "queue_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "repost": {
            "$ref": "#/components/schemas/RepostSettings"
          },
          "facebook": {
            "$ref": "#/components/schemas/FacebookOptions"
          },
          "instagram": {
            "$ref": "#/components/schemas/InstagramOptions"
          },
          "pinterest": {
            "$ref": "#/components/schemas/PinterestOptions"
          },
          "google_business_profile": {
            "$ref": "#/components/schemas/GoogleBusinessProfileOptions"
          },
          "tumblr": {
            "$ref": "#/components/schemas/TumblrOptions"
          },
          "youtube": {
            "$ref": "#/components/schemas/YouTubeOptions"
          },
          "tiktok": {
            "$ref": "#/components/schemas/TikTokOptions"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "param": {
            "type": "string",
            "nullable": true
          },
          "details": { },
          "request_id": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "FacebookOptions": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string",
            "nullable": true
          },
          "also_publish_media_to_stories": {
            "type": "boolean",
            "nullable": true
          }
        },
        "nullable": true
      },
      "FacebookPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string",
            "nullable": true
          },
          "also_publish_media_to_stories": {
            "type": "boolean",
            "nullable": true
          },
          "link": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "comment_delay": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "GoogleBusinessProfileOptions": {
        "type": "object",
        "properties": {
          "button_type": {
            "type": "string",
            "nullable": true
          },
          "button_url": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "GoogleBusinessProfilePostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "button_type": {
            "type": "string",
            "nullable": true
          },
          "button_url": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "ImportMediaRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "InstagramOptions": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string",
            "nullable": true
          },
          "also_publish_media_to_stories": {
            "type": "boolean",
            "nullable": true
          },
          "collaborators": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publish_as_trial_reel": {
            "type": "boolean",
            "nullable": true
          },
          "auto_share_if_performs_well": {
            "type": "boolean",
            "nullable": true
          },
          "user_tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstagramUserTagRequest"
            }
          }
        },
        "nullable": true
      },
      "InstagramPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "location_id": {
            "type": "string",
            "nullable": true
          },
          "also_publish_media_to_stories": {
            "type": "boolean",
            "nullable": true
          },
          "collaborators": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "publish_as_trial_reel": {
            "type": "boolean",
            "nullable": true
          },
          "auto_share_if_performs_well": {
            "type": "boolean",
            "nullable": true
          },
          "user_tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstagramUserTagResponse"
            },
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "comment_delay": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "InstagramUserTagRequest": {
        "type": "object",
        "properties": {
          "media_id": {
            "type": "integer",
            "format": "int32"
          },
          "username": {
            "type": "string"
          },
          "x": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "y": {
            "type": "number",
            "format": "float",
            "nullable": true
          }
        }
      },
      "InstagramUserTagResponse": {
        "type": "object",
        "properties": {
          "file_id": {
            "type": "integer",
            "format": "int32"
          },
          "username": {
            "type": "string"
          },
          "x": {
            "type": "number",
            "format": "float",
            "nullable": true
          },
          "y": {
            "type": "number",
            "format": "float",
            "nullable": true
          }
        }
      },
      "LinkedInPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "comment_delay": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "ListResponseOfPostAnalyticsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAnalyticsResponse"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "ListResponseOfPostResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponse"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "ListResponseOfQueueResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QueueResponse"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "ListResponseOfSocialAccountResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SocialAccountResponse"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "ListResponseOfWorkspaceResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceResponse"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "MediaResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/MediaStatus"
          },
          "file_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "error_code": {
            "type": "string",
            "nullable": true
          },
          "error_message": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "MediaStatus": {
        "enum": [
          "waiting_for_upload",
          "processing",
          "ready",
          "failed"
        ],
        "type": "string"
      },
      "MediaUpload": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "MediaUploadResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/MediaStatus"
          },
          "upload": {
            "$ref": "#/components/schemas/MediaUpload"
          }
        }
      },
      "Network": {
        "enum": [
          "facebook",
          "instagram",
          "linked_in",
          "google_business_profile",
          "threads",
          "x",
          "pinterest",
          "you_tube",
          "tik_tok",
          "telegram",
          "bluesky",
          "reddit",
          "tumblr"
        ],
        "type": "string"
      },
      "NullableContent": {
        "enum": [
          "image",
          "video",
          "story",
          "link",
          "carousel",
          "text",
          "reel",
          "document",
          null
        ],
        "type": "string",
        "nullable": true
      },
      "NullableInstant": {
        "type": "string",
        "format": "date-time",
        "nullable": true
      },
      "NullablePostRepeatFrequency": {
        "enum": [
          "do_not_repeat",
          "every1_day",
          "every2_day",
          "every3_day",
          "every4_day",
          "every5_day",
          "every6_day",
          "every7_day",
          "every8_day",
          "every9_day",
          "every10_day",
          "every11_day",
          "every12_day",
          "every13_day",
          "every14_day",
          "every15_day",
          "every16_day",
          "every17_day",
          "every18_day",
          "every19_day",
          "every20_day",
          "every21_day",
          "every22_day",
          "every23_day",
          "every24_day",
          "every25_day",
          "every26_day",
          "every27_day",
          "every28_day",
          "every29_day",
          "every30_day",
          "every31_day",
          "every32_day",
          "every33_day",
          "every34_day",
          "every35_day",
          "every36_day",
          "every37_day",
          "every38_day",
          "every39_day",
          "every40_day",
          "every41_day",
          "every42_day",
          "every43_day",
          "every44_day",
          "every45_day",
          "every46_day",
          "every47_day",
          "every48_day",
          "every49_day",
          "every50_day",
          "every51_day",
          "every52_day",
          "every53_day",
          "every54_day",
          "every55_day",
          "every56_day",
          "every57_day",
          "every58_day",
          "every59_day",
          "every60_day",
          "every1_month",
          "every2_month",
          "every3_month",
          "every4_month",
          "every6_month",
          "every1_year",
          null
        ],
        "type": "string",
        "nullable": true
      },
      "NullableSocialNetwork": {
        "enum": [
          "facebook",
          "instagram",
          "linkedin",
          "google_business_profile",
          "threads",
          "x",
          "pinterest",
          "youtube",
          "tiktok",
          "telegram",
          "bluesky",
          "reddit",
          "tumblr",
          null
        ],
        "type": "string",
        "nullable": true
      },
      "NullableTikTokWhoCanWatch": {
        "enum": [
          "public",
          "followers",
          "friends",
          "private",
          null
        ],
        "type": "string",
        "nullable": true
      },
      "NullableYouTubeVisibility": {
        "enum": [
          "private",
          "unlisted",
          "public",
          null
        ],
        "type": "string",
        "nullable": true
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true
          },
          "next": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PinterestOptions": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "alt_text": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "PinterestPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "alt_text": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "PostAccountResult": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int32"
          },
          "link_to_post": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PostAnalyticsResponse": {
        "type": "object",
        "properties": {
          "post_id": {
            "type": "integer",
            "format": "int32"
          },
          "social_account_id": {
            "type": "integer",
            "format": "int32"
          },
          "network": {
            "$ref": "#/components/schemas/SocialNetwork"
          },
          "content_type": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "analytics_refreshed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsMetric"
            }
          }
        }
      },
      "PostMedia": {
        "type": "object",
        "properties": {
          "media_id": {
            "type": "integer",
            "format": "int32"
          },
          "thumbnail_media_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "PostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "PostPerformanceSummaryItem": {
        "type": "object",
        "properties": {
          "published_period": {
            "$ref": "#/components/schemas/PublishedPeriod"
          },
          "network": {
            "$ref": "#/components/schemas/NullableSocialNetwork"
          },
          "content_type": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "social_account_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "post_count": {
            "type": "integer",
            "format": "int32"
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsMetric"
            }
          }
        },
        "description": "One aggregate row. published_period is present only when granularity is specified. Exactly one grouping field is present when group_by is specified: network for network, content_type for content_type, or social_account_id for social_account. Fields that do not apply are omitted."
      },
      "PostPerformanceSummaryResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostPerformanceSummaryItem"
            }
          },
          "timezone": {
            "type": "string",
            "description": "Workspace IANA timezone used for publication-time buckets. Present only when granularity is specified.",
            "nullable": true
          }
        }
      },
      "PostResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/PostStatus"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "queue_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "is_ai_generated": {
            "type": "boolean"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAccountResult"
            }
          },
          "facebook": {
            "$ref": "#/components/schemas/FacebookPostNetworkContentResponse"
          },
          "instagram": {
            "$ref": "#/components/schemas/InstagramPostNetworkContentResponse"
          },
          "linkedin": {
            "$ref": "#/components/schemas/LinkedInPostNetworkContentResponse"
          },
          "google_business_profile": {
            "$ref": "#/components/schemas/GoogleBusinessProfilePostNetworkContentResponse"
          },
          "threads": {
            "$ref": "#/components/schemas/ThreadsPostNetworkContentResponse"
          },
          "x": {
            "$ref": "#/components/schemas/PostNetworkContentResponse"
          },
          "pinterest": {
            "$ref": "#/components/schemas/PinterestPostNetworkContentResponse"
          },
          "youtube": {
            "$ref": "#/components/schemas/YouTubePostNetworkContentResponse"
          },
          "tiktok": {
            "$ref": "#/components/schemas/TikTokPostNetworkContentResponse"
          },
          "telegram": {
            "$ref": "#/components/schemas/TelegramPostNetworkContentResponse"
          },
          "bluesky": {
            "$ref": "#/components/schemas/BlueskyPostNetworkContentResponse"
          },
          "reddit": {
            "$ref": "#/components/schemas/RedditPostNetworkContentResponse"
          },
          "tumblr": {
            "$ref": "#/components/schemas/TumblrPostNetworkContentResponse"
          }
        }
      },
      "PostStatus": {
        "enum": [
          "draft",
          "scheduled",
          "in_progress",
          "posted",
          "queued"
        ],
        "type": "string"
      },
      "PublishedPeriod": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "format": "date-time"
          },
          "key": {
            "type": "string",
            "description": "Workspace-local bucket key: YYYY-MM-DDTHH for hour, YYYY-MM-DD for day, YYYY-MM for month, or YYYY for year."
          }
        },
        "description": "A publication-time bucket in the workspace timezone. Start and end are returned as UTC instants; end is exclusive.",
        "nullable": true
      },
      "PublishMode": {
        "enum": [
          "publish_now",
          "schedule",
          "queue"
        ],
        "type": "string"
      },
      "QueueResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "is_paused": {
            "type": "boolean"
          }
        }
      },
      "RedditPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "RepostSettings": {
        "type": "object",
        "properties": {
          "frequency": {
            "$ref": "#/components/schemas/NullablePostRepeatFrequency"
          },
          "until": {
            "$ref": "#/components/schemas/NullableInstant"
          }
        },
        "nullable": true
      },
      "SocialAccountResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "custom_name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "network": {
            "$ref": "#/components/schemas/Network"
          },
          "url": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          }
        }
      },
      "SocialNetwork": {
        "enum": [
          "facebook",
          "instagram",
          "linkedin",
          "google_business_profile",
          "threads",
          "x",
          "pinterest",
          "youtube",
          "tiktok",
          "telegram",
          "bluesky",
          "reddit",
          "tumblr"
        ],
        "type": "string"
      },
      "TelegramPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "ThreadsPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "comment_delay": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "TikTokOptions": {
        "type": "object",
        "properties": {
          "who_can_watch": {
            "$ref": "#/components/schemas/NullableTikTokWhoCanWatch"
          },
          "allow_comments": {
            "type": "boolean",
            "nullable": true
          },
          "allow_duet": {
            "type": "boolean",
            "nullable": true
          },
          "allow_stitch": {
            "type": "boolean",
            "nullable": true
          },
          "disclose_post_content": {
            "type": "boolean",
            "nullable": true
          },
          "your_brand": {
            "type": "boolean",
            "nullable": true
          },
          "branded_content": {
            "type": "boolean",
            "nullable": true
          },
          "photo_title": {
            "type": "string",
            "nullable": true
          },
          "auto_add_music": {
            "type": "boolean",
            "nullable": true
          }
        },
        "nullable": true
      },
      "TikTokPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "who_can_watch": {
            "$ref": "#/components/schemas/NullableTikTokWhoCanWatch"
          },
          "allow_comments": {
            "type": "boolean",
            "nullable": true
          },
          "allow_duet": {
            "type": "boolean",
            "nullable": true
          },
          "allow_stitch": {
            "type": "boolean",
            "nullable": true
          },
          "disclose_post_content": {
            "type": "boolean",
            "nullable": true
          },
          "your_brand": {
            "type": "boolean",
            "nullable": true
          },
          "branded_content": {
            "type": "boolean",
            "nullable": true
          },
          "photo_title": {
            "type": "string",
            "nullable": true
          },
          "auto_add_music": {
            "type": "boolean",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "comment_delay": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "TumblrOptions": {
        "type": "object",
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "nullable": true
      },
      "TumblrPostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "link": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      },
      "UpdateSocialAccountRequest": {
        "type": "object",
        "properties": {
          "custom_name": {
            "type": "string",
            "nullable": true
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          }
        }
      },
      "WorkspaceResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        }
      },
      "YouTubeOptions": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "visibility": {
            "$ref": "#/components/schemas/NullableYouTubeVisibility"
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "made_for_kids": {
            "type": "boolean",
            "nullable": true
          },
          "video_language": {
            "type": "string",
            "nullable": true
          },
          "recording_date": {
            "$ref": "#/components/schemas/NullableInstant"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "nullable": true
      },
      "YouTubePostNetworkContentResponse": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "visibility": {
            "$ref": "#/components/schemas/NullableYouTubeVisibility"
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "made_for_kids": {
            "type": "boolean",
            "nullable": true
          },
          "video_language": {
            "type": "string",
            "nullable": true
          },
          "recording_date": {
            "$ref": "#/components/schemas/NullableInstant"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "comment_delay": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "content": {
            "$ref": "#/components/schemas/NullableContent"
          },
          "caption": {
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostResponseFile"
            }
          }
        },
        "nullable": true
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Authorization: Bearer <pst_live_api_key> or Authorization: Bearer <oauth_access_token>",
        "scheme": "bearer",
        "bearerFormat": "API Key or OAuth JWT"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "Workspaces"
    },
    {
      "name": "Social Accounts"
    },
    {
      "name": "Queues"
    },
    {
      "name": "Media"
    },
    {
      "name": "Posts"
    },
    {
      "name": "Analytics"
    }
  ]
}