{
  "openapi": "3.1.1",
  "info": {
    "title": "Jeelda API Reference",
    "description": "Public API for the Jeelda marketing workspace. Manage companies and media, plan campaigns, prepare social post drafts for human review, publish approved posts through connected providers, and access engagement insights, weekly trends, SEO audits, and offline campaign plans. Publishing depends on each provider's permissions and connection status.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://www.jeelda.com/"
    }
  ],
  "paths": {
    "/api/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameTenantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameTenantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RenameTenantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/account/api-key/rotate": {
      "post": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyRotatedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyRotatedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyRotatedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/ai-pricing/models": {
      "get": {
        "tags": [
          "AdminAiPricing"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminAiModelPriceResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminAiModelPriceResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminAiModelPriceResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/ai-pricing/models/{provider}/{model}": {
      "put": {
        "tags": [
          "AdminAiPricing"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "model",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdminAiModelPriceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdminAiModelPriceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdminAiModelPriceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAiModelPriceResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAiModelPriceResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAiModelPriceResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/ai-usage": {
      "get": {
        "tags": [
          "AdminAiUsage"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAiUsageResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAiUsageResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAiUsageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/ai-usage/tenants/{tenantId}": {
      "get": {
        "tags": [
          "AdminAiUsage"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTenantAiUsageResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTenantAiUsageResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTenantAiUsageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/tenants": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantResponse"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCreatedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCreatedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCreatedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/tenants/{id}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/tenants/{id}/disable": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/{id}/enable": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/tenants/{id}/rotate-key": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCreatedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCreatedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantCreatedResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/error-logs": {
      "get": {
        "tags": [
          "AdminErrorLogs"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "statusCode",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorLogSearchResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorLogSearchResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorLogSearchResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/social-apps": {
      "get": {
        "tags": [
          "AdminSocialApps"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminSocialAppResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminSocialAppResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminSocialAppResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/social-apps/{provider}": {
      "put": {
        "tags": [
          "AdminSocialApps"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdminSocialAppRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdminSocialAppRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAdminSocialAppRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSocialAppResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSocialAppResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSocialAppResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AdminSocialApps"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/csrf": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/setup": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupOwnerRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupOwnerRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetupOwnerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/register": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterTenantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterTenantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterTenantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/mfa/verify": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MfaCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/password/forgot": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/password/reset": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/mfa/status": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/mfa/setup": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/mfa/confirm": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmMfaSetupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmMfaSetupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmMfaSetupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/mfa/disable": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisableMfaRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DisableMfaRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DisableMfaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/session": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/auth/password/change": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies": {
      "get": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Company"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Company"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Company"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Companies"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{id}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{id}/social-profiles": {
      "get": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SocialProfileLink"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SocialProfileLink"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SocialProfileLink"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/analyze-website": {
      "post": {
        "tags": [
          "Companies"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeWebsiteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeWebsiteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeWebsiteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyProfileSuggestion"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyProfileSuggestion"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyProfileSuggestion"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{id}/products": {
      "post": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{id}/social-profiles/analyze": {
      "post": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeSocialProfileRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeSocialProfileRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyzeSocialProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SocialProfileAudit"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SocialProfileAudit"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SocialProfileAudit"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{id}/social-profiles/{profileId}": {
      "delete": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "profileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{id}/products/{productId}": {
      "put": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ProductInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{id}/products/refresh": {
      "post": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/connections": {
      "get": {
        "tags": [
          "Connections"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/connections/meta": {
      "put": {
        "tags": [
          "Connections"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMetaRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMetaRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMetaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/connections/{provider}/authorize-url": {
      "get": {
        "tags": [
          "Connections"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizeUrlResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizeUrlResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizeUrlResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/connections/tiktok": {
      "put": {
        "tags": [
          "Connections"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectTikTokRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectTikTokRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectTikTokRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/connections/{provider}": {
      "delete": {
        "tags": [
          "Connections"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/connections/sync": {
      "post": {
        "tags": [
          "Connections"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EngagementSyncResult"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EngagementSyncResult"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EngagementSyncResult"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/posts/{id}/metrics": {
      "put": {
        "tags": [
          "Engagement"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMetricsInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMetricsInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PostMetricsInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/bulk": {
      "post": {
        "tags": [
          "Engagement"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BulkMetricsItem"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BulkMetricsItem"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BulkMetricsItem"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BulkMetricsResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkMetricsResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkMetricsResult"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/engagement": {
      "get": {
        "tags": [
          "Engagement"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "windowDays",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 28
            }
          },
          {
            "name": "historyDays",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EngagementResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngagementResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EngagementResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/engagement/{platform}": {
      "get": {
        "tags": [
          "Engagement"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "windowDays",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 28
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformEngagementResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformEngagementResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformEngagementResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/optimizations": {
      "get": {
        "tags": [
          "Engagement"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "track",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OptimizationRun"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OptimizationRun"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OptimizationRun"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/optimizations/run": {
      "post": {
        "tags": [
          "Engagement"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "track",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "force",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OptimizationRun"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OptimizationRun"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OptimizationRun"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/automation/drafts/run": {
      "post": {
        "tags": [
          "Engagement"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostDraft"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostDraft"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostDraft"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/seo/audit": {
      "post": {
        "tags": [
          "Seo"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/products/{productId}/seo/audit": {
      "post": {
        "tags": [
          "Seo"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/seo": {
      "get": {
        "tags": [
          "Seo"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array"
                }
              },
              "application/json": {
                "schema": {
                  "type": "array"
                }
              },
              "text/json": {
                "schema": {
                  "type": "array"
                }
              }
            }
          }
        }
      }
    },
    "/api/logs/client-error": {
      "post": {
        "tags": [
          "ErrorLogs"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientErrorRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientErrorRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ClientErrorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/connections/linkedin/callback": {
      "get": {
        "tags": [
          "LinkedInCallback"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error_description",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/connections/linkedin/select-account": {
      "post": {
        "tags": [
          "LinkedInCallback"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "selection": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/media/upload": {
      "post": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-File-Name",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/media": {
      "get": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/MediaStatus"
            }
          },
          {
            "name": "approved",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MediaAsset"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MediaAsset"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MediaAsset"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/media/search": {
      "post": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaSearchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaSearchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MediaSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MediaAsset"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MediaAsset"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MediaAsset"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/media/{mediaId}": {
      "get": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaEditRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaEditRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MediaEditRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/media/{mediaId}/url": {
      "get": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "thumbnail"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/media/{mediaId}/download": {
      "get": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "social"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/media/{mediaId}/approve": {
      "post": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/media/{mediaId}/unapprove": {
      "post": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/media/{mediaId}/archive": {
      "post": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/media/{mediaId}/retry": {
      "post": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/media/{mediaId}/reanalyze": {
      "post": {
        "tags": [
          "Media"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/connections/meta/callback": {
      "get": {
        "tags": [
          "MetaCallback"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error_description",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/connections/meta/select-page": {
      "post": {
        "tags": [
          "MetaCallback"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "selection": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/offline-plans": {
      "get": {
        "tags": [
          "Offline"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OfflinePlan"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OfflinePlan"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OfflinePlan"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/offline-plans/generate": {
      "post": {
        "tags": [
          "Offline"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateOfflinePlanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateOfflinePlanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateOfflinePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OfflinePlan"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfflinePlan"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfflinePlan"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/offline-plans/{planId}/activations/{activationId}": {
      "patch": {
        "tags": [
          "Offline"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "activationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateActivationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateActivationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateActivationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OfflineActivation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfflineActivation"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfflineActivation"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/posts/generate": {
      "post": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneratePostsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GeneratePostsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GeneratePostsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostDraft"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostDraft"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostDraft"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/posts": {
      "get": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/PostStatus"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromUtc",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toUtc",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "publishedFromUtc",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "publishedToUtc",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostDraft"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostDraft"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PostDraft"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/posts/{id}": {
      "get": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePostRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePostRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePostRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/posts/{id}/approve": {
      "post": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/posts/{id}/draft": {
      "post": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/posts/{id}/discard": {
      "post": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/posts/{id}/publish/retry": {
      "post": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/posts/{id}/publish-now": {
      "post": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/posts/{id}/published": {
      "post": {
        "tags": [
          "Posts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkPublishedRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkPublishedRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MarkPublishedRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostDraft"
                }
              }
            }
          }
        }
      }
    },
    "/api/settings/social-apps": {
      "get": {
        "tags": [
          "SocialApps"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SocialAppResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SocialAppResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SocialAppResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/strategy": {
      "get": {
        "tags": [
          "Strategy"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MarketingStrategy"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketingStrategy"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketingStrategy"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/strategy/analyze": {
      "post": {
        "tags": [
          "Strategy"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refreshProductPages",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/StrategyAnalyzeRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/StrategyAnalyzeRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/StrategyAnalyzeRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MarketingStrategy"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketingStrategy"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketingStrategy"
                }
              }
            }
          }
        }
      }
    },
    "/api/billing/stripe/webhook": {
      "post": {
        "tags": [
          "StripeWebhook"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/subscriptions/packages": {
      "get": {
        "tags": [
          "AdminSubscriptions"
        ],
        "parameters": [
          {
            "name": "includeInactive",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionPackageResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionPackageResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SubscriptionPackageResponse"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/subscriptions/packages/{code}": {
      "put": {
        "tags": [
          "AdminSubscriptions"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionPackageRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionPackageRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionPackageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPackageResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPackageResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPackageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/subscriptions/packages/{code}/status": {
      "patch": {
        "tags": [
          "AdminSubscriptions"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionPackageStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionPackageStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionPackageStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPackageResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPackageResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionPackageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/subscriptions/tenants/{tenantId}": {
      "get": {
        "tags": [
          "AdminSubscriptions"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "AdminSubscriptions"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTenantSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/account/subscription/packages": {
      "get": {
        "tags": [
          "AccountSubscription"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionOffersResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionOffersResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionOffersResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/account/subscription": {
      "get": {
        "tags": [
          "AccountSubscription"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantSubscriptionResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/account/subscription/checkout": {
      "post": {
        "tags": [
          "AccountSubscription"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartSubscriptionCheckoutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/StartSubscriptionCheckoutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/StartSubscriptionCheckoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StripeCheckoutUrlResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeCheckoutUrlResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeCheckoutUrlResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/account/subscription/portal": {
      "post": {
        "tags": [
          "AccountSubscription"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StripeCheckoutUrlResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeCheckoutUrlResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StripeCheckoutUrlResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/connections/tiktok/callback": {
      "get": {
        "tags": [
          "TikTokCallback"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "error_description",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/r/{code}": {
      "get": {
        "tags": [
          "Tracking"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/r/{code}/qr.svg": {
      "get": {
        "tags": [
          "Tracking"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/trends": {
      "get": {
        "tags": [
          "Trends"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 12
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WeeklyTrendReport"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WeeklyTrendReport"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WeeklyTrendReport"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/trends/{weekKey}": {
      "get": {
        "tags": [
          "Trends"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "weekKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WeeklyTrendReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeeklyTrendReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeeklyTrendReport"
                }
              }
            }
          }
        }
      }
    },
    "/api/companies/{companyId}/trends/generate": {
      "post": {
        "tags": [
          "Trends"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "weekOf",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "force",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WeeklyTrendReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeeklyTrendReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeeklyTrendReport"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ActivationStatus": {
        "type": "integer"
      },
      "AdminAiModelPriceResponse": {
        "required": [
          "provider",
          "model",
          "inputUsdPerMillion",
          "outputUsdPerMillion",
          "pricingSourceUrl",
          "updatedAtUtc",
          "hasOperatorOverride"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "inputUsdPerMillion": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "outputUsdPerMillion": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "pricingSourceUrl": {
            "type": "string"
          },
          "updatedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "hasOperatorOverride": {
            "type": "boolean"
          }
        }
      },
      "AdminAiUsageResponse": {
        "required": [
          "from",
          "to",
          "requests",
          "inputTokens",
          "outputTokens",
          "totalTokens",
          "estimatedCostUsd",
          "unpricedRequests",
          "tenants",
          "daily",
          "operations"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "requests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "inputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "outputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "estimatedCostUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unpricedRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "tenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiTenantUsageResponse"
            }
          },
          "daily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiUsageDailyResponse"
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiUsageOperationResponse"
            }
          }
        }
      },
      "AdminSocialAppResponse": {
        "required": [
          "provider",
          "displayName",
          "clientIdLabel",
          "configured",
          "enabled",
          "clientId",
          "hasClientSecret",
          "hasOverride",
          "callbackUri",
          "redirectUri",
          "connectedRedirectUrl",
          "updatedAtUtc",
          "supportsConnectedRedirect"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "clientIdLabel": {
            "type": "string"
          },
          "configured": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "clientId": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasClientSecret": {
            "type": "boolean"
          },
          "hasOverride": {
            "type": "boolean"
          },
          "callbackUri": {
            "type": "string"
          },
          "redirectUri": {
            "type": [
              "null",
              "string"
            ]
          },
          "connectedRedirectUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "supportsConnectedRedirect": {
            "type": "boolean"
          }
        }
      },
      "AdminTenantAiUsageResponse": {
        "required": [
          "from",
          "to",
          "tenant",
          "daily",
          "operations"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "tenant": {
            "$ref": "#/components/schemas/AiTenantUsageResponse"
          },
          "daily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiUsageDailyResponse"
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiUsageOperationResponse"
            }
          }
        }
      },
      "AiCompanyUsageResponse": {
        "required": [
          "companyId",
          "companyName",
          "requests",
          "inputTokens",
          "outputTokens",
          "totalTokens",
          "estimatedCostUsd",
          "unpricedRequests"
        ],
        "type": "object",
        "properties": {
          "companyId": {
            "type": [
              "null",
              "string"
            ]
          },
          "companyName": {
            "type": "string"
          },
          "requests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "inputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "outputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "estimatedCostUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unpricedRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "AiTenantUsageResponse": {
        "required": [
          "tenantId",
          "tenantName",
          "requests",
          "inputTokens",
          "outputTokens",
          "totalTokens",
          "estimatedCostUsd",
          "unpricedRequests",
          "companies"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "tenantName": {
            "type": "string"
          },
          "requests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "inputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "outputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "estimatedCostUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unpricedRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "companies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiCompanyUsageResponse"
            }
          }
        }
      },
      "AiUsageDailyResponse": {
        "required": [
          "dateUtc",
          "requests",
          "inputTokens",
          "outputTokens",
          "totalTokens",
          "estimatedCostUsd",
          "unpricedRequests"
        ],
        "type": "object",
        "properties": {
          "dateUtc": {
            "type": "string"
          },
          "requests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "inputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "outputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "estimatedCostUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unpricedRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "AiUsageOperationResponse": {
        "required": [
          "operation",
          "requests",
          "inputTokens",
          "outputTokens",
          "totalTokens",
          "estimatedCostUsd",
          "unpricedRequests"
        ],
        "type": "object",
        "properties": {
          "operation": {
            "type": "string"
          },
          "requests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "inputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "outputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "totalTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "estimatedCostUsd": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "unpricedRequests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "AnalyzeSocialProfileRequest": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "AnalyzeWebsiteRequest": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "language": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiKeyRotatedResponse": {
        "required": [
          "apiKey",
          "apiKeyPrefix",
          "note"
        ],
        "type": "object",
        "properties": {
          "apiKey": {
            "type": "string"
          },
          "apiKeyPrefix": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "AuthorizeUrlResponse": {
        "required": [
          "url",
          "redirectUri",
          "expiresAtUtc"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "redirectUri": {
            "type": "string"
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AutomationInput": {
        "type": "object",
        "properties": {
          "autoDraftsEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "draftHorizonDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "autoPlatformsCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "autoOptimizeEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "autoApplyOptimizations": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "platforms": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/PlatformAutomationInput"
            }
          }
        }
      },
      "BulkMetricsItem": {
        "required": [
          "postId",
          "metrics"
        ],
        "type": "object",
        "properties": {
          "postId": {
            "type": "string"
          },
          "metrics": {
            "$ref": "#/components/schemas/PostMetricsInput"
          }
        }
      },
      "BulkMetricsResult": {
        "required": [
          "updated",
          "notFound",
          "notPublished"
        ],
        "type": "object",
        "properties": {
          "updated": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "notFound": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notPublished": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ChangePasswordRequest": {
        "required": [
          "currentPassword",
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "currentPassword": {
            "type": "string"
          },
          "newPassword": {
            "type": "string"
          }
        }
      },
      "ClientErrorRequest": {
        "required": [
          "message",
          "details",
          "url",
          "source"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "details": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "type": [
              "null",
              "string"
            ]
          },
          "statusCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "Company": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "industry": {
            "type": [
              "null",
              "string"
            ]
          },
          "website": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "language": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "brandVoice": {
            "type": [
              "null",
              "string"
            ]
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "market": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MarketAnalysis"
              }
            ]
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "socialProfiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SocialProfileLink"
            }
          },
          "automation": {
            "$ref": "#/components/schemas/CompanyAutomation"
          },
          "strategy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MarketingStrategy"
              }
            ]
          },
          "weeklyTrendsEnabled": {
            "type": "boolean"
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CompanyAutomation": {
        "type": "object",
        "properties": {
          "autoDraftsEnabled": {
            "type": "boolean"
          },
          "draftHorizonDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "autoPlatformsCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "autoOptimizeEnabled": {
            "type": "boolean"
          },
          "autoApplyOptimizations": {
            "type": "boolean"
          },
          "platforms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformAutomation"
            }
          }
        }
      },
      "CompanyInput": {
        "required": [
          "name",
          "description"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "industry": {
            "type": [
              "null",
              "string"
            ]
          },
          "website": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "language": {
            "type": [
              "null",
              "string"
            ]
          },
          "timeZone": {
            "type": [
              "null",
              "string"
            ]
          },
          "brandVoice": {
            "type": [
              "null",
              "string"
            ]
          },
          "goals": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "weeklyTrendsEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "products": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ProductInput"
            }
          },
          "keywords": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "automation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AutomationInput"
              }
            ]
          },
          "market": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MarketAnalysis"
              }
            ]
          },
          "socialProfiles": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SocialProfileInput"
            }
          }
        }
      },
      "CompanyProfileSuggestion": {
        "type": "object",
        "properties": {
          "websiteUrl": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "industry": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "language": {
            "type": [
              "null",
              "string"
            ]
          },
          "timeZone": {
            "type": [
              "null",
              "string"
            ]
          },
          "brandVoice": {
            "type": [
              "null",
              "string"
            ]
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "offerings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfferingSuggestion"
            }
          },
          "market": {
            "$ref": "#/components/schemas/MarketAnalysis"
          },
          "pagesRead": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "socialProfiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveredSocialProfile"
            }
          }
        }
      },
      "CompetitorInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "website": {
            "type": [
              "null",
              "string"
            ]
          },
          "positioning": {
            "type": "string"
          },
          "strengths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "weaknesses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ConfirmMfaSetupRequest": {
        "required": [
          "password",
          "code"
        ],
        "type": "object",
        "properties": {
          "password": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "ConnectionResponse": {
        "required": [
          "provider",
          "status",
          "statusMessage",
          "facebookPageId",
          "facebookPageName",
          "instagramAccountId",
          "instagramUsername",
          "connectedAtUtc",
          "lastSyncAtUtc",
          "lastSyncPostsUpdated",
          "lastSyncMessage",
          "rateLimitedUntilUtc"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionStatus"
          },
          "statusMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "facebookPageId": {
            "type": [
              "null",
              "string"
            ]
          },
          "facebookPageName": {
            "type": [
              "null",
              "string"
            ]
          },
          "instagramAccountId": {
            "type": [
              "null",
              "string"
            ]
          },
          "instagramUsername": {
            "type": [
              "null",
              "string"
            ]
          },
          "connectedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "lastSyncAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastSyncPostsUpdated": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastSyncMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "rateLimitedUntilUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "tikTokOpenId": {
            "type": [
              "null",
              "string"
            ]
          },
          "tikTokDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkedInAuthorUrn": {
            "type": [
              "null",
              "string"
            ]
          },
          "linkedInDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "authorizationExpiresAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "accountId": {
            "type": [
              "null",
              "string"
            ]
          },
          "accountDisplayName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConnectionStatus": {
        "type": "integer"
      },
      "ConnectMetaRequest": {
        "required": [
          "accessToken"
        ],
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "facebookPageId": {
            "type": [
              "null",
              "string"
            ]
          },
          "instagramAccountId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConnectTikTokRequest": {
        "required": [
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "CreateTenantRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "DayOfWeek": {
        "type": "integer"
      },
      "DisableMfaRequest": {
        "required": [
          "password",
          "code"
        ],
        "type": "object",
        "properties": {
          "password": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "DiscoveredSocialProfile": {
        "required": [
          "url",
          "platform",
          "linkText"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "linkText": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EngagementResponse": {
        "required": [
          "report",
          "platforms",
          "history"
        ],
        "type": "object",
        "properties": {
          "report": {
            "$ref": "#/components/schemas/PerformanceReport"
          },
          "platforms": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/PerformanceReport"
            }
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EngagementSnapshot"
            }
          }
        }
      },
      "EngagementSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "publishedPosts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "postsWithMetrics": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "impressions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "interactions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "clicks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "averageScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "changePercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "platforms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformPerformance"
            }
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EngagementSyncResult": {
        "required": [
          "provider",
          "outcome",
          "postsChecked",
          "postsUpdated",
          "unmatched",
          "failed",
          "message"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "postsChecked": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "postsUpdated": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "unmatched": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "failed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ErrorLogEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": [
              "null",
              "string"
            ]
          },
          "userId": {
            "type": [
              "null",
              "string"
            ]
          },
          "userEmail": {
            "type": [
              "null",
              "string"
            ]
          },
          "userDisplayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": [
              "null",
              "string"
            ]
          },
          "timestampUtc": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "httpMethod": {
            "type": [
              "null",
              "string"
            ]
          },
          "statusCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ErrorLogSearchResponse": {
        "required": [
          "items",
          "total",
          "page",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorLogEntry"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "FaqItem": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          }
        }
      },
      "ForgotPasswordRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          }
        }
      },
      "GenerateOfflinePlanRequest": {
        "type": "object",
        "properties": {
          "startDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "weeks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 4
          },
          "budget": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          },
          "area": {
            "type": [
              "null",
              "string"
            ]
          },
          "types": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "extraInstructions": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GeneratePostsRequest": {
        "type": "object",
        "properties": {
          "productIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "postsPerPlatform": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "startDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "useWeeklyTrends": {
            "type": "boolean",
            "default": true
          },
          "extraInstructions": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "HashtagPerformance": {
        "type": "object",
        "properties": {
          "tag": {
            "type": "string"
          },
          "uses": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "averageScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lift": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "LoginRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "MarketAnalysis": {
        "type": "object",
        "properties": {
          "summary": {
            "type": "string"
          },
          "competitors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompetitorInfo"
            }
          },
          "differentiators": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "opportunities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "usedWebSearch": {
            "type": "boolean"
          },
          "aiModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "analyzedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MarketingStrategy": {
        "type": "object",
        "properties": {
          "summary": {
            "type": "string"
          },
          "emotionProfile": {
            "type": "object",
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          "emotionRationale": {
            "type": "string"
          },
          "targetAudiences": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TargetAudience"
            }
          },
          "platforms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformRecommendation"
            }
          },
          "contentPillars": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "brandHashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "aiModel": {
            "type": "string"
          },
          "generatedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MarkPublishedRequest": {
        "type": "object",
        "properties": {
          "publishedUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "publishedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "platformPostId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MediaAnalysisResult": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "suggestedProductIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "marketingPurposes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recommendedPlatforms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "visualStyle": {
            "type": [
              "null",
              "string"
            ]
          },
          "mood": {
            "type": [
              "null",
              "string"
            ]
          },
          "season": {
            "type": [
              "null",
              "string"
            ]
          },
          "visibleText": {
            "type": [
              "null",
              "string"
            ]
          },
          "qualityScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "containsPeople": {
            "type": "boolean"
          },
          "containsText": {
            "type": "boolean"
          },
          "containsLogo": {
            "type": "boolean"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MediaAsset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "originalFileName": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          },
          "originalFileSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "width": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "height": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaVariant"
            }
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "productIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "suggestedProductIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "marketingPurposes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recommendedPlatforms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "visualStyle": {
            "type": [
              "null",
              "string"
            ]
          },
          "mood": {
            "type": [
              "null",
              "string"
            ]
          },
          "season": {
            "type": [
              "null",
              "string"
            ]
          },
          "visibleText": {
            "type": [
              "null",
              "string"
            ]
          },
          "qualityScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "containsPeople": {
            "type": "boolean"
          },
          "containsText": {
            "type": "boolean"
          },
          "containsLogo": {
            "type": "boolean"
          },
          "usageRightsConfirmed": {
            "type": "boolean"
          },
          "marketingApproved": {
            "type": "boolean"
          },
          "isArchived": {
            "type": "boolean"
          },
          "embedding": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "float"
            }
          },
          "embeddingModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "usageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastUsedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "analysisProvider": {
            "type": [
              "null",
              "string"
            ]
          },
          "analysisModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "analysisVersion": {
            "type": [
              "null",
              "string"
            ]
          },
          "analysisInputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "analysisOutputTokens": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "analysis": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MediaAnalysisResult"
              }
            ]
          },
          "derivedFromMediaAssetId": {
            "type": [
              "null",
              "string"
            ]
          },
          "aiGenerated": {
            "type": "boolean"
          },
          "aiImageModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "generatedForPostId": {
            "type": [
              "null",
              "string"
            ]
          },
          "generatedForPlatform": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/MediaStatus"
          },
          "errorCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "analyzedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "MediaEditRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "categories": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "productIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "usageRightsConfirmed": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "marketingApproved": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "isArchived": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "MediaSearchRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          },
          "tag": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MediaStatus"
              }
            ]
          },
          "approved": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "skip": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "take": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 50
          }
        }
      },
      "MediaStatus": {
        "type": "integer"
      },
      "MediaVariant": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "objectKey": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "width": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "height": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "fileSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "sha256": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MetaTagSuggestion": {
        "type": "object",
        "properties": {
          "metaTitle": {
            "type": "string"
          },
          "metaDescription": {
            "type": "string"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "updatedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MfaCodeRequest": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          }
        }
      },
      "OfferingSuggestion": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "price": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OfflineActivation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "targetAudience": {
            "type": [
              "null",
              "string"
            ]
          },
          "persuasionPrinciples": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfflineLocation"
            }
          },
          "when": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfflineTimeSlot"
            }
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "estimatedCostMin": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "estimatedCostMax": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "design": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PrintDesign"
              }
            ]
          },
          "successMetric": {
            "type": [
              "null",
              "string"
            ]
          },
          "leadTime": {
            "type": [
              "null",
              "string"
            ]
          },
          "productId": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingCode": {
            "type": "string"
          },
          "trackingUrl": {
            "type": "string"
          },
          "targetUrl": {
            "type": "string"
          },
          "scans": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "lastScanAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/ActivationStatus"
          },
          "unitsDistributed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "actualCost": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "doneAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "OfflineLocation": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "area": {
            "type": [
              "null",
              "string"
            ]
          },
          "why": {
            "type": "string"
          },
          "permission": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OfflinePlan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "area": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "weeks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "budget": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": "string"
          },
          "activations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OfflineActivation"
            }
          },
          "complianceNotes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "usedWebSearch": {
            "type": "boolean"
          },
          "aiModel": {
            "type": "string"
          },
          "generatedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OfflineTimeSlot": {
        "type": "object",
        "properties": {
          "date": {
            "type": [
              "null",
              "string"
            ],
            "format": "date"
          },
          "day": {
            "$ref": "#/components/schemas/DayOfWeek"
          },
          "timeWindow": {
            "type": "string"
          },
          "why": {
            "type": "string"
          }
        }
      },
      "OptimizationRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "platform": {
            "type": [
              "null",
              "string"
            ]
          },
          "platformSuggestion": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PlatformOptimizationSuggestion"
              }
            ]
          },
          "date": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/OptimizationStatus"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "report": {
            "$ref": "#/components/schemas/PerformanceReport"
          },
          "suggestion": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OptimizationSuggestion"
              }
            ]
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "draftsUpdated": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "aiModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OptimizationStatus": {
        "type": "integer"
      },
      "OptimizationSuggestion": {
        "type": "object",
        "properties": {
          "summary": {
            "type": "string"
          },
          "diagnosis": {
            "type": "string"
          },
          "addKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "removeKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "productMeta": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductMetaChange"
            }
          },
          "contentRecommendations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PerformanceReport": {
        "type": "object",
        "properties": {
          "platform": {
            "type": [
              "null",
              "string"
            ]
          },
          "scoreFormula": {
            "type": [
              "null",
              "string"
            ]
          },
          "windowDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "publishedPosts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "postsWithMetrics": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "impressions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "interactions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "clicks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "averageScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "currentPeriodScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "previousPeriodScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "changePercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "trend": {
            "type": "string"
          },
          "platforms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlatformPerformance"
            }
          },
          "hashtags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HashtagPerformance"
            }
          },
          "topPosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostPerformance"
            }
          },
          "bottomPosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostPerformance"
            }
          },
          "timeSlots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimeSlotPerformance"
            }
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SegmentPerformance"
            }
          }
        }
      },
      "PlatformAutomation": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string"
          },
          "autoDraftsEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "autoOptimizeEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "autoApplyOptimizations": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "PlatformAutomationInput": {
        "required": [
          "platform"
        ],
        "type": "object",
        "properties": {
          "platform": {
            "type": "string"
          },
          "autoDraftsEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "autoOptimizeEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "autoApplyOptimizations": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "PlatformEngagementResponse": {
        "required": [
          "report",
          "latestOptimization"
        ],
        "type": "object",
        "properties": {
          "report": {
            "$ref": "#/components/schemas/PerformanceReport"
          },
          "latestOptimization": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OptimizationRun"
              }
            ]
          }
        }
      },
      "PlatformOptimizationSuggestion": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "diagnosis": {
            "type": "string"
          },
          "addHashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "removeHashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "addKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "removeKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "postsPerWeek": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "addTimes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostingSlot"
            }
          },
          "removeTimes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostingSlot"
            }
          },
          "preferredFormats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contentRecommendations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PlatformPerformance": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string"
          },
          "posts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "averageScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "engagementRate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "changePercent": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "PlatformRecommendation": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string"
          },
          "priority": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rationale": {
            "type": "string"
          },
          "postsPerWeek": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "contentFormats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bestTimes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostingSlot"
            }
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tips": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "lastOptimizedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "PostDraft": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "productId": {
            "type": [
              "null",
              "string"
            ]
          },
          "trendReportId": {
            "type": [
              "null",
              "string"
            ]
          },
          "platform": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/PostStatus"
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "content": {
            "type": "string"
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "callToAction": {
            "type": [
              "null",
              "string"
            ]
          },
          "link": {
            "type": [
              "null",
              "string"
            ]
          },
          "mediaSuggestion": {
            "type": [
              "null",
              "string"
            ]
          },
          "mediaAssetId": {
            "type": [
              "null",
              "string"
            ]
          },
          "mediaSourceType": {
            "type": [
              "null",
              "string"
            ]
          },
          "selectedMediaVariant": {
            "type": [
              "null",
              "string"
            ]
          },
          "mediaSelectionRationale": {
            "type": [
              "null",
              "string"
            ]
          },
          "mediaSelectionScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "mediaAttachmentStatus": {
            "type": [
              "null",
              "string"
            ]
          },
          "image": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PostImage"
              }
            ]
          },
          "videoScript": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/VideoScript"
              }
            ]
          },
          "targetAudience": {
            "type": [
              "null",
              "string"
            ]
          },
          "scheduledAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "scheduledLocal": {
            "type": "string"
          },
          "aiModel": {
            "type": "string"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "origin": {
            "type": "string"
          },
          "trackingCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "trackingUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "metrics": {
            "$ref": "#/components/schemas/PostMetrics"
          },
          "engagementScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "publishedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "publishedUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "platformPostId": {
            "type": [
              "null",
              "string"
            ]
          },
          "publishAttemptedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "publishError": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PostImage": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "altText": {
            "type": "string"
          },
          "photographer": {
            "type": "string"
          },
          "photographerUrl": {
            "type": "string"
          },
          "sourceUrl": {
            "type": "string"
          },
          "photoId": {
            "type": "string"
          }
        }
      },
      "PostingSlot": {
        "type": "object",
        "properties": {
          "day": {
            "$ref": "#/components/schemas/DayOfWeek"
          },
          "time": {
            "type": "string"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PostMetrics": {
        "type": "object",
        "properties": {
          "impressions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "reach": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "likes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "comments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "shares": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "saves": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "videoViews": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "reportedClicks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "trackedClicks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "updatedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "clicks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "hasData": {
            "type": "boolean"
          }
        }
      },
      "PostMetricsInput": {
        "type": "object",
        "properties": {
          "impressions": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "reach": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "likes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "comments": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "shares": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "saves": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "videoViews": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "clicks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "PostPerformance": {
        "type": "object",
        "properties": {
          "postId": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "score": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "snippet": {
            "type": "string"
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "publishedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "PostStatus": {
        "type": "integer"
      },
      "PrintDesign": {
        "type": "object",
        "properties": {
          "headline": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "callToAction": {
            "type": "string"
          },
          "visualIdea": {
            "type": "string"
          },
          "format": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "price": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "page": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProductPageInfo"
              }
            ]
          },
          "seoAudit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ProductSeoAudit"
              }
            ]
          },
          "seoAuditHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductSeoAudit"
            }
          },
          "metaSuggestion": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MetaTagSuggestion"
              }
            ]
          }
        }
      },
      "ProductInput": {
        "required": [
          "name",
          "url"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "price": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "currency": {
            "type": [
              "null",
              "string"
            ]
          },
          "tags": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "kind": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProductMetaChange": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "string"
          },
          "metaTitle": {
            "type": "string"
          },
          "metaDescription": {
            "type": "string"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProductPageInfo": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "imageUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "textExcerpt": {
            "type": [
              "null",
              "string"
            ]
          },
          "seo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SeoSignals"
              }
            ]
          },
          "fetchedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ProductSeoAudit": {
        "type": "object",
        "properties": {
          "score": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "summary": {
            "type": "string"
          },
          "primaryKeyword": {
            "type": "string"
          },
          "secondaryKeywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recommendedTitle": {
            "type": "string"
          },
          "recommendedMetaDescription": {
            "type": "string"
          },
          "recommendedH1": {
            "type": "string"
          },
          "recommendedSlug": {
            "type": [
              "null",
              "string"
            ]
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeoIssue"
            }
          },
          "contentSuggestions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "faq": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FaqItem"
            }
          },
          "internalLinkIdeas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "jsonLd": {
            "type": [
              "null",
              "string"
            ]
          },
          "aiModel": {
            "type": "string"
          },
          "generatedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RegisterTenantRequest": {
        "required": [
          "workspaceName",
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "workspaceName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "RenameTenantRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "ResetPasswordRequest": {
        "required": [
          "token",
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "newPassword": {
            "type": "string"
          }
        }
      },
      "SegmentPerformance": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "posts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "averageScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lift": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "SeoIssue": {
        "type": "object",
        "properties": {
          "severity": {
            "type": "string"
          },
          "issue": {
            "type": "string"
          },
          "fix": {
            "type": "string"
          }
        }
      },
      "SeoSignals": {
        "type": "object",
        "properties": {
          "statusCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "https": {
            "type": "boolean"
          },
          "finalUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "titleLength": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "metaDescription": {
            "type": [
              "null",
              "string"
            ]
          },
          "metaDescriptionLength": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "h1": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "h2Count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "canonical": {
            "type": [
              "null",
              "string"
            ]
          },
          "robots": {
            "type": [
              "null",
              "string"
            ]
          },
          "noIndex": {
            "type": "boolean"
          },
          "htmlLang": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasViewport": {
            "type": "boolean"
          },
          "hasOpenGraph": {
            "type": "boolean"
          },
          "hasTwitterCard": {
            "type": "boolean"
          },
          "jsonLdTypes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "imageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "imagesMissingAlt": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "wordCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "internalLinks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "externalLinks": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "htmlKilobytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SetupOwnerRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "SocialAppResponse": {
        "required": [
          "provider",
          "displayName",
          "configured",
          "authorizeUrlPath",
          "connectionMode",
          "connectInstructions",
          "publishPlatforms"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "configured": {
            "type": "boolean"
          },
          "authorizeUrlPath": {
            "type": "string"
          },
          "connectionMode": {
            "type": "string"
          },
          "connectInstructions": {
            "type": "string"
          },
          "publishPlatforms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SocialProfileAudit": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "profileName": {
            "type": [
              "null",
              "string"
            ]
          },
          "summary": {
            "type": "string"
          },
          "readinessScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "strengths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recommendations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SocialProfileRecommendation"
            }
          },
          "contentIdeas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "quickWins": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dataLimitations": {
            "type": [
              "null",
              "string"
            ]
          },
          "aiModel": {
            "type": [
              "null",
              "string"
            ]
          },
          "analyzedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SocialProfileInput": {
        "required": [
          "url",
          "platform"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "linkText": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SocialProfileLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "linkText": {
            "type": [
              "null",
              "string"
            ]
          },
          "latestAudit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SocialProfileAudit"
              }
            ]
          },
          "auditHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SocialProfileAudit"
            }
          }
        }
      },
      "SocialProfileRecommendation": {
        "type": "object",
        "properties": {
          "priority": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "rationale": {
            "type": "string"
          }
        }
      },
      "StartSubscriptionCheckoutRequest": {
        "required": [
          "packageCode",
          "acceptedTermsVersion",
          "acceptTerms"
        ],
        "type": "object",
        "properties": {
          "packageCode": {
            "type": "string"
          },
          "acceptedTermsVersion": {
            "type": "string"
          },
          "acceptTerms": {
            "type": "boolean"
          }
        }
      },
      "StrategyAnalyzeRequest": {
        "type": "object",
        "properties": {
          "emotionProfile": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        }
      },
      "StripeCheckoutUrlResponse": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "SubscriptionOffersResponse": {
        "required": [
          "packages",
          "billingEnabled"
        ],
        "type": "object",
        "properties": {
          "packages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionPackageResponse"
            }
          },
          "billingEnabled": {
            "type": "boolean"
          }
        }
      },
      "SubscriptionPackageResponse": {
        "required": [
          "code",
          "name",
          "description",
          "currency",
          "monthlyBasePriceCents",
          "includedCompanies",
          "additionalCompanyMonthlyPriceCents",
          "isActive",
          "termsVersion",
          "termsText",
          "createdAtUtc",
          "updatedAtUtc"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "monthlyBasePriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "includedCompanies": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "additionalCompanyMonthlyPriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "isActive": {
            "type": "boolean"
          },
          "termsVersion": {
            "type": "string"
          },
          "termsText": {
            "type": "string"
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SubscriptionPriceChange": {
        "type": "object",
        "properties": {
          "contractMonthlyPriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "monthlyBasePriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "additionalCompanyMonthlyPriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "contractReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "reason": {
            "type": [
              "null",
              "string"
            ]
          },
          "effectiveAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "recordedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TargetAudience": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "ageRange": {
            "type": [
              "null",
              "string"
            ]
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "interests": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "painPoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "buyingMotivations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TenantCreatedResponse": {
        "required": [
          "id",
          "name",
          "apiKey",
          "note"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "apiKey": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "TenantResponse": {
        "required": [
          "id",
          "name",
          "apiKeyPrefix",
          "isActive",
          "createdAtUtc"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "apiKeyPrefix": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TenantSubscriptionResponse": {
        "required": [
          "tenantId",
          "packageCode",
          "packageName",
          "currency",
          "status",
          "companyCount",
          "monthlyAmountCents",
          "monthlyBasePriceCents",
          "includedCompanies",
          "additionalCompanyMonthlyPriceCents",
          "contractMonthlyPriceCents",
          "contractReference",
          "contractTerms",
          "termsVersion",
          "termsText",
          "contractAgreedAtUtc",
          "startsAtUtc",
          "currentPeriodEndUtc",
          "cancelAtPeriodEnd",
          "cancelledAtUtc",
          "createdAtUtc",
          "updatedAtUtc",
          "priceHistory",
          "canManageBilling"
        ],
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "packageCode": {
            "type": "string"
          },
          "packageName": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "companyCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "monthlyAmountCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "monthlyBasePriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "includedCompanies": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "additionalCompanyMonthlyPriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "contractMonthlyPriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "contractReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "contractTerms": {
            "type": [
              "null",
              "string"
            ]
          },
          "termsVersion": {
            "type": "string"
          },
          "termsText": {
            "type": "string"
          },
          "contractAgreedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "startsAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "currentPeriodEndUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "cancelledAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "priceHistory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubscriptionPriceChange"
            }
          },
          "canManageBilling": {
            "type": "boolean"
          }
        }
      },
      "TimeSlotPerformance": {
        "type": "object",
        "properties": {
          "day": {
            "$ref": "#/components/schemas/DayOfWeek"
          },
          "hour": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "posts": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "averageScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "lift": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "TrendItem": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "whyRelevant": {
            "type": "string"
          },
          "momentum": {
            "type": "string"
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contentIdeas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "relatedProductIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateActivationRequest": {
        "type": "object",
        "properties": {
          "status": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ActivationStatus"
              }
            ]
          },
          "unitsDistributed": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "actualCost": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateAdminAiModelPriceRequest": {
        "required": [
          "inputUsdPerMillion",
          "outputUsdPerMillion"
        ],
        "type": "object",
        "properties": {
          "inputUsdPerMillion": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "outputUsdPerMillion": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "UpdateAdminSocialAppRequest": {
        "required": [
          "clientId",
          "clientSecret",
          "enabled"
        ],
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "clientSecret": {
            "type": [
              "null",
              "string"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "redirectUri": {
            "type": [
              "null",
              "string"
            ]
          },
          "connectedRedirectUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdatePostRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "content": {
            "type": [
              "null",
              "string"
            ]
          },
          "hashtags": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "callToAction": {
            "type": [
              "null",
              "string"
            ]
          },
          "link": {
            "type": [
              "null",
              "string"
            ]
          },
          "mediaSuggestion": {
            "type": [
              "null",
              "string"
            ]
          },
          "mediaAssetId": {
            "type": [
              "null",
              "string"
            ]
          },
          "videoScript": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/VideoScript"
              }
            ]
          },
          "scheduledAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "removeImage": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateSubscriptionPackageRequest": {
        "required": [
          "name",
          "description",
          "currency",
          "monthlyBasePriceCents",
          "includedCompanies",
          "additionalCompanyMonthlyPriceCents",
          "isActive",
          "termsVersion",
          "termsText"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "monthlyBasePriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "includedCompanies": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "additionalCompanyMonthlyPriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "isActive": {
            "type": "boolean"
          },
          "termsVersion": {
            "type": "string"
          },
          "termsText": {
            "type": "string"
          }
        }
      },
      "UpdateSubscriptionPackageStatusRequest": {
        "required": [
          "isActive"
        ],
        "type": "object",
        "properties": {
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "UpdateTenantSubscriptionRequest": {
        "required": [
          "packageCode",
          "status"
        ],
        "type": "object",
        "properties": {
          "packageCode": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "contractMonthlyPriceCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "contractReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "contractTerms": {
            "type": [
              "null",
              "string"
            ]
          },
          "contractAgreedAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "effectiveAtUtc": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "priceChangeReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "VideoScene": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string"
          },
          "visual": {
            "type": "string"
          },
          "onScreenText": {
            "type": [
              "null",
              "string"
            ]
          },
          "voiceover": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "VideoScript": {
        "type": "object",
        "properties": {
          "hook": {
            "type": "string"
          },
          "durationSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "scenes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VideoScene"
            }
          },
          "soundSuggestion": {
            "type": [
              "null",
              "string"
            ]
          },
          "coverText": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WeeklyTrendReport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "weekKey": {
            "type": "string"
          },
          "weekStart": {
            "type": "string",
            "format": "date"
          },
          "summary": {
            "type": "string"
          },
          "trends": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrendItem"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "usedWebSearch": {
            "type": "boolean"
          },
          "aiModel": {
            "type": "string"
          },
          "generatedAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "Tenant API key (create one with POST /api/admin/tenants).",
        "name": "X-Api-Key",
        "in": "header"
      },
      "AdminKey": {
        "type": "apiKey",
        "description": "Operator key from configuration (Admin:ApiKey). Only for /api/admin.",
        "name": "X-Admin-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    },
    {
      "AdminKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "AdminAiPricing"
    },
    {
      "name": "AdminAiUsage"
    },
    {
      "name": "Admin"
    },
    {
      "name": "AdminErrorLogs"
    },
    {
      "name": "AdminSocialApps"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Companies"
    },
    {
      "name": "Connections"
    },
    {
      "name": "Engagement"
    },
    {
      "name": "Seo"
    },
    {
      "name": "ErrorLogs"
    },
    {
      "name": "LinkedInCallback"
    },
    {
      "name": "Media"
    },
    {
      "name": "MetaCallback"
    },
    {
      "name": "Offline"
    },
    {
      "name": "Posts"
    },
    {
      "name": "SocialApps"
    },
    {
      "name": "Strategy"
    },
    {
      "name": "StripeWebhook"
    },
    {
      "name": "AdminSubscriptions"
    },
    {
      "name": "AccountSubscription"
    },
    {
      "name": "TikTokCallback"
    },
    {
      "name": "Tracking"
    },
    {
      "name": "Trends"
    }
  ]
}