openapi: 3.2.0 info: title: GPT Backend Campaigns API version: 0.1.0 servers: - url: https://api.usepomo.ai description: Base URL declared by the provider in apis.yml (roadmap#122). tags: - name: campaigns paths: /api/campaigns/external/sync: post: tags: - campaigns summary: Sync External Campaigns description: 'Sync external Google, Meta, TikTok, or LinkedIn campaigns for the active profile. Campaign identity and daily metrics are fetched at campaign level without filtering native ad types. Provider-specific hydration may add richer media (for example, Google Performance Max asset groups), but an unknown type is still persisted and renderable through the generic document contract. The default bounded mode never infers remote deletion; callers must explicitly request an exhaustive inventory before missing documents are retired.' operationId: sync_external_campaigns_api_campaigns_external_sync_post requestBody: content: application/json: schema: $ref: '#/components/schemas/ExternalCampaignSyncRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ExternalCampaignSyncResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/external/{platform}/{remote_campaign_id}: get: tags: - campaigns summary: Get External Campaign Document description: Return one imported campaign, strictly scoped to the active profile. operationId: get_external_campaign_document_api_campaigns_external__platform___remote_campaign_id__get security: - HTTPBearer: [] parameters: - name: platform in: path required: true schema: enum: - google - meta - tiktok - linkedin type: string title: Platform - name: remote_campaign_id in: path required: true schema: type: string title: Remote Campaign Id - name: document_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Document Id - name: account_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Account Id responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Get External Campaign Document Api Campaigns External Platform Remote Campaign Id Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - campaigns summary: Patch External Campaign Document description: Mutate allowlisted provider fields and return verified provider readback. operationId: patch_external_campaign_document_api_campaigns_external__platform___remote_campaign_id__patch security: - HTTPBearer: [] parameters: - name: platform in: path required: true schema: enum: - google - meta - tiktok type: string title: Platform - name: remote_campaign_id in: path required: true schema: type: string title: Remote Campaign Id - name: document_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Document Id - name: account_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Account Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExternalCampaignPatchRequest' responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Patch External Campaign Document Api Campaigns External Platform Remote Campaign Id Patch '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/external-media/{document_id}/{media_key}: get: tags: - campaigns summary: Get External Campaign Media description: Proxy one provider media asset after profile-scoped validation. operationId: get_external_campaign_media_api_campaigns_external_media__document_id___media_key__get security: - HTTPBearer: [] parameters: - name: document_id in: path required: true schema: type: string format: uuid title: Document Id - name: media_key in: path required: true schema: type: string title: Media Key responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/external/{platform}/{remote_campaign_id}/sync: post: tags: - campaigns summary: Sync External Campaign Document description: Synchronize one exact provider campaign for safe mutation recovery. operationId: sync_external_campaign_document_api_campaigns_external__platform___remote_campaign_id__sync_post security: - HTTPBearer: [] parameters: - name: platform in: path required: true schema: enum: - google - meta - tiktok type: string title: Platform - name: remote_campaign_id in: path required: true schema: type: string title: Remote Campaign Id - name: document_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Document Id - name: account_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Account Id responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Sync External Campaign Document Api Campaigns External Platform Remote Campaign Id Sync Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/optimization-activity: get: tags: - campaigns summary: Get Optimization Activity description: 'AI-team activity (history) for the active company profile. Sourced from the execution layer (``AgentTeamAction``), so stage reflects what actually happened: ``executed`` only when the action genuinely ran; ``approved`` actions are reported as approved/queued, not applied. Pass ``stage`` (``executed``/``approved``/``declined``/``failed``) to filter. A measured performance outcome is reported only when one really exists.' operationId: get_optimization_activity_api_campaigns_optimization_activity_get security: - HTTPBearer: [] parameters: - name: stage in: query required: false schema: anyOf: - type: string - type: 'null' title: Stage - name: limit in: query required: false schema: type: integer default: 100 title: Limit - name: offset in: query required: false schema: type: integer default: 0 title: Offset responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AiTeamActivityResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/optimization-summary: get: tags: - campaigns summary: Get Optimization Summary description: 'Per-campaign AI-team activity rollup for the active profile. One row per public campaign id the team has acted on, so the Campaigns dashboard can surface "AI team · N optimizations" (with a measured outcome when one exists) directly on the matching card. Fetched once per profile and merged client-side by campaign id; kept independent of the dashboard bundle so an activity-query hiccup never blanks the campaign list.' operationId: get_optimization_summary_api_campaigns_optimization_summary_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CampaignOptimizationSummaryResponse' security: - HTTPBearer: [] /api/campaigns/{campaign_public_id}/optimizations/rollback: post: tags: - campaigns summary: Rollback Campaign Optimizations operationId: rollback_campaign_optimizations_api_campaigns__campaign_public_id__optimizations_rollback_post security: - HTTPBearer: [] parameters: - name: campaign_public_id in: path required: true schema: type: string title: Campaign Public Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CampaignOptimizationRollbackRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CampaignOptimizationRollbackResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/{campaign_public_id}/optimizations/{action_id}/rollback: post: tags: - campaigns summary: Rollback Campaign Optimization description: 'Reverse one provider-executed optimization from its captured prior values. This is an authenticated, user-confirmed provider mutation—not a database rewind. The source action stays immutable. Dates and automatic activation are excluded, newer overlapping changes block the rollback, and the normal external mutation service enforces provider constraints plus readback.' operationId: rollback_campaign_optimization_api_campaigns__campaign_public_id__optimizations__action_id__rollback_post security: - HTTPBearer: [] parameters: - name: campaign_public_id in: path required: true schema: type: string title: Campaign Public Id - name: action_id in: path required: true schema: type: string format: uuid title: Action Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CampaignOptimizationRollbackResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/{campaign_public_id}/optimization-activity: get: tags: - campaigns summary: Get Campaign Optimization Activity description: 'The AI-team activity ledger scoped to a single campaign. ``campaign_public_id`` is the public id the dashboard exposes on each card (``ads_`` / ``social_`` / ``batch__``). Same honest, execution-sourced contract as the profile-wide ledger, filtered to actions that target this campaign.' operationId: get_campaign_optimization_activity_api_campaigns__campaign_public_id__optimization_activity_get security: - HTTPBearer: [] parameters: - name: campaign_public_id in: path required: true schema: type: string title: Campaign Public Id - name: stage in: query required: false schema: anyOf: - type: string - type: 'null' title: Stage - name: limit in: query required: false schema: type: integer default: 100 title: Limit - name: offset in: query required: false schema: type: integer default: 0 title: Offset responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AiTeamActivityResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/{campaign_public_id}/perf-history: get: tags: - campaigns summary: Get Campaign Perf History description: 'Daily headline-metric trend + optimization markers for one campaign, for the expanded-row chart that backs the strip''s DoD/WoW tags and "+N% vs before". Computed live from the raw platform daily metrics; empty for a campaign with no paid analytics.' operationId: get_campaign_perf_history_api_campaigns__campaign_public_id__perf_history_get security: - HTTPBearer: [] parameters: - name: campaign_public_id in: path required: true schema: type: string title: Campaign Public Id - name: days in: query required: false schema: type: integer default: 30 title: Days responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CampaignPerfHistoryResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/email/edit-image: post: tags: - campaigns summary: Edit Campaign Image description: 'Edit a campaign supporting image based on user instructions. The edited image will be added as a new image for the same campaign. Only supporting images can be edited (not banner images). The user provides a text description of the changes they want, and the AI will generate an edited version of the image based on those instructions.' operationId: edit_campaign_image_api_campaigns_email_edit_image_post requestBody: content: application/json: schema: $ref: '#/components/schemas/Body_edit_campaign_image_api_campaigns_email_edit_image_post' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/email/edit-content: post: tags: - campaigns summary: Edit Campaign Content description: 'Edit email campaign content based on user instructions. The edited content will replace the existing content for the campaign. The user provides a text description of the changes they want, and the AI will generate an edited version of the email content based on those instructions.' operationId: edit_campaign_content_api_campaigns_email_edit_content_post requestBody: content: application/json: schema: $ref: '#/components/schemas/Body_edit_campaign_content_api_campaigns_email_edit_content_post' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/email/delete-image: delete: tags: - campaigns summary: Delete Campaign Image description: 'Delete a campaign supporting image. Only the user who created the campaign can delete images associated with it. Query parameters: - campaign_id: Campaign ID of the image to delete - idea_number: Campaign idea number - image_url: URL of the image to delete' operationId: delete_campaign_image_api_campaigns_email_delete_image_delete security: - HTTPBearer: [] parameters: - name: campaign_id in: query required: true schema: type: string title: Campaign Id - name: idea_number in: query required: true schema: type: integer title: Idea Number - name: image_url in: query required: true schema: type: string title: Image Url responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/email/upload-image: post: tags: - campaigns summary: Upload Email Campaign Image General description: 'Upload a new image for an email campaign and update database records. This endpoint is used for manual image uploads for email campaigns. It replaces the general upload-image endpoint previously in campaigns_general.py.' operationId: upload_email_campaign_image_general_api_campaigns_email_upload_image_post requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_upload_email_campaign_image_general_api_campaigns_email_upload_image_post' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/email/upload-campaign-image: post: tags: - campaigns summary: Upload Campaign Image description: "Upload a new campaign image and update database records.\nThis endpoint is used for manual image edits instead of replacing an existing image.\n\nArgs:\n file: The image file to upload\n campaign_id: Campaign ID\n idea_number: Campaign idea number\n image_type: Type of image (defaults to EMAIL_IMAGE)\n current_user: The authenticated user\n db: Database session\n\nReturns:\n JSON response with the result including new image URL" operationId: upload_campaign_image_api_campaigns_email_upload_campaign_image_post requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_upload_campaign_image_api_campaigns_email_upload_campaign_image_post' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/email/upload-campaign-images: post: tags: - campaigns summary: Upload Campaign Images description: "Upload campaign images (up to 15) and update database records.\nThis endpoint allows batch uploading of images for a specific campaign idea.\n\nArgs:\n files: List of image files to upload (max 15)\n campaign_id: Campaign ID\n idea_number: Campaign idea number\n image_type: Type of image (defaults to EMAIL_IMAGE)\n current_user: The authenticated user\n db: Database session\n\nReturns:\n JSON response with the result including new image URLs" operationId: upload_campaign_images_api_campaigns_email_upload_campaign_images_post requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_upload_campaign_images_api_campaigns_email_upload_campaign_images_post' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/email: get: tags: - campaigns summary: Fetch All Email Campaigns description: 'Fetch all email campaigns for the current user, including the generated email images. Support pagination with page and limit parameters.' operationId: fetch_all_email_campaigns_api_campaigns_email_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Fetch All Email Campaigns Api Campaigns Email Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - campaigns summary: Create Email Campaign description: 'Create a new email campaign using the dedicated EmailCampaign model. This endpoint provides a direct REST API method for creating campaigns instead of using the workflow approach.' operationId: create_email_campaign_api_campaigns_email_post security: - HTTPBearer: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmailCampaignCreate' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/EmailCampaignResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/email/{campaign_id}: delete: tags: - campaigns summary: Delete Email Campaign description: 'Delete an entire email campaign (all ideas) and related resources. This will remove the EmailCampaign models and related resources.' operationId: delete_email_campaign_api_campaigns_email__campaign_id__delete security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/email/{campaign_id}/idea/{idea_number}: delete: tags: - campaigns summary: Delete Email Campaign Idea description: 'Delete a specific idea from an email campaign. This will remove the idea and all associated images from the database. Handles both the new EmailCampaign model and the legacy Campaign model.' operationId: delete_email_campaign_idea_api_campaigns_email__campaign_id__idea__idea_number__delete security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id - name: idea_number in: path required: true schema: type: integer title: Idea Number responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/email/count: get: tags: - campaigns summary: Get Email Campaigns Count description: 'Get the count of email campaigns for the current user. This counts campaigns in the new EmailCampaign model.' operationId: get_email_campaigns_count_api_campaigns_email_count_get responses: '200': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/email/associate-consumer-group: post: tags: - campaigns summary: Associate Consumer Group With Email Campaign description: Associate a consumer group with an email campaign. operationId: associate_consumer_group_with_email_campaign_api_campaigns_email_associate_consumer_group_post requestBody: content: application/json: schema: additionalProperties: true type: object title: Data required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/email/list-associated-consumer-groups/{campaign_id}/{idea_number}: get: tags: - campaigns summary: List Associated Consumer Groups description: List all consumer groups associated with an email campaign idea. operationId: list_associated_consumer_groups_api_campaigns_email_list_associated_consumer_groups__campaign_id___idea_number__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id - name: idea_number in: path required: true schema: type: integer title: Idea Number responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/email/remove-consumer-group-association/{association_id}: delete: tags: - campaigns summary: Remove Consumer Group Association description: Remove an association between a consumer group and an email campaign. operationId: remove_consumer_group_association_api_campaigns_email_remove_consumer_group_association__association_id__delete security: - HTTPBearer: [] parameters: - name: association_id in: path required: true schema: type: integer title: Association Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/email/{email_campaign_id}/image: post: tags: - campaigns summary: Add Email Campaign Image description: 'Add a new image to an existing email campaign using the EmailCampaignImage model. The email_campaign_id refers to the ID of the EmailCampaign record.' operationId: add_email_campaign_image_api_campaigns_email__email_campaign_id__image_post security: - HTTPBearer: [] parameters: - name: email_campaign_id in: path required: true schema: type: integer title: Email Campaign Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmailCampaignImageCreate' responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/edit-content: post: tags: - campaigns summary: Edit Social Post Content description: 'Edit social post content based on current company profile instructions. The edited content will replace the existing content for the social post. The current company profile provides a text description of the changes they want, and the AI will generate an edited version of the content based on those instructions.' operationId: edit_social_post_content_api_campaigns_social_post_edit_content_post requestBody: content: application/json: schema: $ref: '#/components/schemas/Body_edit_social_post_content_api_campaigns_social_post_edit_content_post' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/social-post/direct-edit-social-post: post: tags: - campaigns summary: Direct Edit Social Post description: 'Directly edit a social post''s content without AI assistance. This endpoint allows direct updates to a social post''s name, caption, hashtags and other fields for the current company profile.' operationId: direct_edit_social_post_api_campaigns_social_post_direct_edit_social_post_post requestBody: content: application/json: schema: $ref: '#/components/schemas/Body_direct_edit_social_post_api_campaigns_social_post_direct_edit_social_post_post' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/social-post/delete-social-post: delete: tags: - campaigns summary: Delete Social Post description: 'Delete a social media post. Only the current company profile who created the post can delete it. The post will be removed from the database and chat message metadata. Any associated images will also be deleted from the database. Query parameters: - campaign_id: Campaign ID of the post to delete - idea_number: Post idea number' operationId: delete_social_post_api_campaigns_social_post_delete_social_post_delete security: - HTTPBearer: [] parameters: - name: campaign_id in: query required: true schema: type: string title: Campaign Id - name: idea_number in: query required: true schema: type: integer title: Idea Number responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/edit-social-post-image: post: tags: - campaigns summary: Edit Social Post Image description: 'Edits a specific social post image using AI, updates GCS and campaign meta_data for the current company profile. Also updates the corresponding chat message metadata.' operationId: edit_social_post_image_api_campaigns_social_post_edit_social_post_image_post requestBody: content: application/json: schema: $ref: '#/components/schemas/Body_edit_social_post_image_api_campaigns_social_post_edit_social_post_image_post' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/social-post/upload-social-post-image: post: tags: - campaigns summary: Upload Social Post Image description: 'Upload an image for a social post campaign and update database records for the current company profile. This is used for initial creation of campaigns or updating existing ones. Parameters: - file: The image file to upload - campaign_id: ID of the campaign - idea_number: Idea number of the campaign - current_image_url: URL of the current image (used for lookup when replace is True) - replace: If True, replace existing image; if False, append as a new image' operationId: upload_social_post_image_api_campaigns_social_post_upload_social_post_image_post requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_upload_social_post_image_api_campaigns_social_post_upload_social_post_image_post' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/social-post/social-post-campaigns: get: tags: - campaigns summary: Fetch All Social Post Campaigns description: 'Fetch all social post campaigns for the current company profile. This endpoint retrieves all the social post campaigns created by the current company profile, supporting pagination and the option to include variations. Query parameters: - page: The page number (0-indexed) for pagination - limit: The number of items per page - include_variations: Whether to include variations of the original posts Returns a list of campaigns with their associated images, metadata, and posting status information, along with pagination information.' operationId: fetch_all_social_post_campaigns_api_campaigns_social_post_social_post_campaigns_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit - name: include_variations in: query required: false schema: type: boolean default: true title: Include Variations - name: campaign_id in: query required: false schema: anyOf: - type: string - type: 'null' description: If provided, only campaigns matching this campaign_id are returned title: Campaign Id description: If provided, only campaigns matching this campaign_id are returned - name: platform_scope in: query required: false schema: anyOf: - type: string - type: 'null' description: Optional social platform family filter title: Platform Scope description: Optional social platform family filter - name: status_filter in: query required: false schema: anyOf: - type: string - type: 'null' description: Optional normalized social status filter title: Status Filter description: Optional normalized social status filter - name: source_filter in: query required: false schema: anyOf: - type: string - type: 'null' description: Optional creation source filter title: Source Filter description: Optional creation source filter - name: search in: query required: false schema: anyOf: - type: string - type: 'null' description: Optional search text title: Search description: Optional search text - name: dashboard_mode in: query required: false schema: type: boolean default: false title: Dashboard Mode responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/social-post-campaign/{campaign_id}: delete: tags: - campaigns summary: Delete Social Post Campaign description: 'Delete an entire social post campaign for the current company profile. This will remove the campaign and all associated images from the database.' operationId: delete_social_post_campaign_api_campaigns_social_post_social_post_campaign__campaign_id__delete security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/social-post-campaign/{campaign_id}/idea/{idea_number}: delete: tags: - campaigns summary: Delete Social Post Campaign Idea description: 'Delete a specific idea from a social post campaign for the current company profile. This will remove the idea and all associated images from the database. If this was the last idea in the campaign, the entire campaign will be removed.' operationId: delete_social_post_campaign_idea_api_campaigns_social_post_social_post_campaign__campaign_id__idea__idea_number__delete security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id - name: idea_number in: path required: true schema: type: integer title: Idea Number responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/social-post-campaigns-count: get: tags: - campaigns summary: Get Social Post Campaigns Count description: 'Get the count of social post campaigns for the current company profile. Returns the total number of social post campaigns owned by the company profile.' operationId: get_social_post_campaigns_count_api_campaigns_social_post_social_post_campaigns_count_get responses: '200': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/social-post/{campaign_id}/{idea_number}/posts: get: tags: - campaigns summary: Get Campaign Posts description: Get posts for a specific campaign idea for the current company profile, optionally filtered by platform and variation. operationId: get_campaign_posts_api_campaigns_social_post__campaign_id___idea_number__posts_get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id - name: idea_number in: path required: true schema: type: integer title: Idea Number - name: platform in: query required: false schema: anyOf: - type: string - type: 'null' title: Platform - name: variation in: query required: false schema: anyOf: - type: integer - type: 'null' title: Variation responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CampaignPostsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/generate-variation: post: tags: - campaigns summary: Generate Social Post Variation description: "Generate a variation of an existing social post for the current company profile.\nThis endpoint creates a new variation by generating new text and images based on the original post.\n\nArgs:\n request: Social post variation request containing campaign_id and idea_number\n company_profile: Current company profile\n db: Database session\n\nReturns:\n dict: Response with the new campaign variation details" operationId: generate_social_post_variation_api_campaigns_social_post_generate_variation_post requestBody: content: application/json: schema: $ref: '#/components/schemas/SocialPostVariationRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/social-post: post: tags: - campaigns summary: Create Social Post Campaign description: 'Create a new social post campaign using the dedicated SocialPostCampaign model for the current company profile. This endpoint provides a direct REST API method for creating campaigns instead of using the workflow approach.' operationId: create_social_post_campaign_api_campaigns_social_post_post requestBody: content: application/json: schema: $ref: '#/components/schemas/SocialPostCampaignCreate' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SocialPostCampaignResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/social-post/schedule/preflight: post: tags: - campaigns summary: Preflight Social Post Schedule operationId: preflight_social_post_schedule_api_campaigns_social_post_schedule_preflight_post requestBody: content: application/json: schema: $ref: '#/components/schemas/SocialScheduleUpsertRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/social-post/schedule: post: tags: - campaigns summary: Upsert Social Post Schedule operationId: upsert_social_post_schedule_api_campaigns_social_post_schedule_post requestBody: content: application/json: schema: $ref: '#/components/schemas/SocialScheduleUpsertRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/social-post/schedule/{campaign_id}/{idea_number}/{variation}: get: tags: - campaigns summary: Get Social Post Schedule operationId: get_social_post_schedule_api_campaigns_social_post_schedule__campaign_id___idea_number___variation__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id - name: idea_number in: path required: true schema: type: integer title: Idea Number - name: variation in: path required: true schema: type: integer title: Variation responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/schedule/{schedule_id}: delete: tags: - campaigns summary: Cancel Social Post Schedule operationId: cancel_social_post_schedule_api_campaigns_social_post_schedule__schedule_id__delete security: - HTTPBearer: [] parameters: - name: schedule_id in: path required: true schema: type: string title: Schedule Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/list-schedules: get: tags: - campaigns summary: List Social Post Schedules operationId: list_social_post_schedules_api_campaigns_social_post_list_schedules_get security: - HTTPBearer: [] parameters: - name: status in: query required: false schema: anyOf: - type: string - type: 'null' title: Status - name: scheduled_from in: query required: false schema: anyOf: - type: string - type: 'null' title: Scheduled From - name: scheduled_to in: query required: false schema: anyOf: - type: string - type: 'null' title: Scheduled To - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 50 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/schedule/dispatch-due: post: tags: - campaigns summary: Dispatch Due Social Post Schedules For Company operationId: dispatch_due_social_post_schedules_for_company_api_campaigns_social_post_schedule_dispatch_due_post security: - HTTPBearer: [] parameters: - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 25 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/schedule-campaign/{campaign_id}/{idea_number}: post: tags: - campaigns summary: Schedule Social Post Campaign operationId: schedule_social_post_campaign_api_campaigns_social_post_schedule_campaign__campaign_id___idea_number__post security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id - name: idea_number in: path required: true schema: type: integer title: Idea Number requestBody: required: true content: application/json: schema: type: object additionalProperties: true title: Schedule Data responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/campaign-schedule/{campaign_id}/{idea_number}: get: tags: - campaigns summary: Get Social Post Campaign Schedule operationId: get_social_post_campaign_schedule_api_campaigns_social_post_campaign_schedule__campaign_id___idea_number__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id - name: idea_number in: path required: true schema: type: integer title: Idea Number - name: variation in: query required: false schema: type: integer default: 0 title: Variation responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/social-post/cancel-schedule/{schedule_id}: delete: tags: - campaigns summary: Cancel Social Post Campaign Schedule operationId: cancel_social_post_campaign_schedule_api_campaigns_social_post_cancel_schedule__schedule_id__delete security: - HTTPBearer: [] parameters: - name: schedule_id in: path required: true schema: type: string title: Schedule Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-display/create: post: tags: - campaigns summary: Create Google Display Campaign description: Create a Google Display ad campaign with optional reference images operationId: create_google_display_campaign_api_campaigns_online_ads_google_display_create_post requestBody: content: application/json: schema: $ref: '#/components/schemas/schemas__campaigns__ads__google__GoogleDisplayAdRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/google-search/create: post: tags: - campaigns summary: Create Google Search Campaign description: Create a Google Search ad campaign operationId: create_google_search_campaign_api_campaigns_online_ads_google_search_create_post requestBody: content: application/json: schema: $ref: '#/components/schemas/GoogleSearchAdRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/meta-feed/create: post: tags: - campaigns summary: Create Meta Feed Campaign description: Create a Meta Feed ad campaign with optional reference images operationId: create_meta_feed_campaign_api_campaigns_online_ads_meta_feed_create_post requestBody: content: application/json: schema: $ref: '#/components/schemas/MetaFeedAdRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/meta-stories-reels/create: post: tags: - campaigns summary: Create Meta Stories Reels Campaign description: Create a Meta Stories & Reels ad campaign operationId: create_meta_stories_reels_campaign_api_campaigns_online_ads_meta_stories_reels_create_post requestBody: content: application/json: schema: $ref: '#/components/schemas/MetaStoriesReelsAdRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/amazon-sponsored-products/create: post: tags: - campaigns summary: Create Amazon Sponsored Products Campaign description: Create an Amazon Sponsored Products ad campaign operationId: create_amazon_sponsored_products_campaign_api_campaigns_online_ads_amazon_sponsored_products_create_post requestBody: content: application/json: schema: $ref: '#/components/schemas/AmazonSponsoredProductsAdRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/amazon-sponsored-brands/create: post: tags: - campaigns summary: Create Amazon Sponsored Brands Campaign description: Create an Amazon Sponsored Brands ad campaign with optional reference images operationId: create_amazon_sponsored_brands_campaign_api_campaigns_online_ads_amazon_sponsored_brands_create_post requestBody: content: application/json: schema: $ref: '#/components/schemas/AmazonSponsoredBrandsAdRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/amazon-sponsored-display/create: post: tags: - campaigns summary: Create Amazon Sponsored Display Campaign description: Create an Amazon Sponsored Display ad campaign with optional reference images operationId: create_amazon_sponsored_display_campaign_api_campaigns_online_ads_amazon_sponsored_display_create_post requestBody: content: application/json: schema: $ref: '#/components/schemas/AmazonSponsoredDisplayAdRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/tiktok/create: post: tags: - campaigns summary: Create Tiktok Campaign description: Create a TikTok Single Image ad campaign operationId: create_tiktok_campaign_api_campaigns_online_ads_tiktok_create_post requestBody: content: application/json: schema: $ref: '#/components/schemas/BaseAdsCampaignRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/google-search-campaigns: get: tags: - campaigns summary: Get Google Search Campaigns operationId: get_google_search_campaigns_api_campaigns_online_ads_google_search_campaigns_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-search-campaign/{campaign_id}: get: tags: - campaigns summary: Get Google Search Campaign operationId: get_google_search_campaign_api_campaigns_online_ads_google_search_campaign__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-search/update-campaign: put: tags: - campaigns summary: Update Google Search Campaign operationId: update_google_search_campaign_api_campaigns_online_ads_google_search_update_campaign_put requestBody: content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/google-search/generate-variation/{ad_id}: post: tags: - campaigns summary: Generate Google Search Variation operationId: generate_google_search_variation_api_campaigns_online_ads_google_search_generate_variation__ad_id__post security: - HTTPBearer: [] parameters: - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-display-campaigns: get: tags: - campaigns summary: Get Google Display Campaigns operationId: get_google_display_campaigns_api_campaigns_online_ads_google_display_campaigns_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-display-campaign/{campaign_id}: get: tags: - campaigns summary: Get Google Display Campaign operationId: get_google_display_campaign_api_campaigns_online_ads_google_display_campaign__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-display/update-campaign: put: tags: - campaigns summary: Update Google Display Campaign operationId: update_google_display_campaign_api_campaigns_online_ads_google_display_update_campaign_put requestBody: content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/google-display/generate-variation/{ad_id}: post: tags: - campaigns summary: Generate Google Display Variation operationId: generate_google_display_variation_api_campaigns_online_ads_google_display_generate_variation__ad_id__post security: - HTTPBearer: [] parameters: - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-display/edit-image: post: tags: - campaigns summary: Edit Google Display Image operationId: edit_google_display_image_api_campaigns_online_ads_google_display_edit_image_post responses: '410': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/online-ads/google-display/upload-image: post: tags: - campaigns summary: Upload Google Display Image operationId: upload_google_display_image_api_campaigns_online_ads_google_display_upload_image_post responses: '410': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/online-ads/google-video: post: tags: - campaigns summary: Create Google Video Ad Campaign operationId: create_google_video_ad_campaign_api_campaigns_online_ads_google_video_post security: - HTTPBearer: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GoogleVideoAdRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - campaigns summary: Get Google Video Campaigns operationId: get_google_video_campaigns_api_campaigns_online_ads_google_video_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-video/all: get: tags: - campaigns summary: Get Google Video Ad Campaigns operationId: get_google_video_ad_campaigns_api_campaigns_online_ads_google_video_all_get responses: '200': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/online-ads/google-video/{ad_id}: get: tags: - campaigns summary: Get Google Video Ad Campaign operationId: get_google_video_ad_campaign_api_campaigns_online_ads_google_video__ad_id__get security: - HTTPBearer: [] parameters: - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-video/campaign/{campaign_id}: delete: tags: - campaigns summary: Delete Google Video Ad Campaign operationId: delete_google_video_ad_campaign_api_campaigns_online_ads_google_video_campaign__campaign_id__delete security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-video/generate-variation/{ad_id}: post: tags: - campaigns summary: Create Google Video Ad Variation operationId: create_google_video_ad_variation_api_campaigns_online_ads_google_video_generate_variation__ad_id__post security: - HTTPBearer: [] parameters: - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/google-video/update-campaign: put: tags: - campaigns summary: Update Google Video Ad Campaign operationId: update_google_video_ad_campaign_api_campaigns_online_ads_google_video_update_campaign_put requestBody: content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/meta-stories-reels-campaigns: get: tags: - campaigns summary: Get Meta Stories Reels Campaigns operationId: get_meta_stories_reels_campaigns_api_campaigns_online_ads_meta_stories_reels_campaigns_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/meta-stories-reels-campaign/{campaign_id}: get: tags: - campaigns summary: Get Meta Stories Reels Campaign operationId: get_meta_stories_reels_campaign_api_campaigns_online_ads_meta_stories_reels_campaign__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/meta-stories-reels/create-campaign: post: tags: - campaigns summary: Create Meta Stories Reels Campaign operationId: create_meta_stories_reels_campaign_api_campaigns_online_ads_meta_stories_reels_create_campaign_post security: - HTTPBearer: [] parameters: - name: product_description in: query required: true schema: type: string title: Product Description - name: target_audience in: query required: true schema: type: string title: Target Audience - name: key_selling_points in: query required: false schema: type: string default: '' title: Key Selling Points - name: num_ads in: query required: false schema: type: integer default: 3 title: Num Ads - name: num_images_per_ad in: query required: false schema: type: integer default: 1 title: Num Images Per Ad - name: video_length in: query required: false schema: type: integer default: 10 title: Video Length - name: bid_strategy in: query required: false schema: type: string default: automatic title: Bid Strategy - name: budget_range in: query required: false schema: type: string default: medium title: Budget Range - name: country in: query required: false schema: anyOf: - type: string - type: 'null' title: Country - name: state_province in: query required: false schema: anyOf: - type: string - type: 'null' title: State Province - name: city in: query required: false schema: anyOf: - type: string - type: 'null' title: City - name: locations in: query required: false schema: anyOf: - type: string - type: 'null' title: Locations requestBody: content: application/json: schema: anyOf: - type: array items: type: string - type: 'null' title: Campaign Goals responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/meta-stories-reels/update-campaign: put: tags: - campaigns summary: Update Meta Stories Reels Campaign operationId: update_meta_stories_reels_campaign_api_campaigns_online_ads_meta_stories_reels_update_campaign_put requestBody: content: application/json: schema: $ref: '#/components/schemas/MetaStoriesReelsCampaignUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/meta-stories-reels/launch: post: tags: - campaigns summary: Launch Meta Stories Reels Campaign operationId: launch_meta_stories_reels_campaign_api_campaigns_online_ads_meta_stories_reels_launch_post requestBody: content: application/json: schema: additionalProperties: true type: object title: Request required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/meta-feed-campaigns: get: tags: - campaigns summary: Get Meta Feed Campaigns operationId: get_meta_feed_campaigns_api_campaigns_online_ads_meta_feed_campaigns_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/meta-feed-campaign/{campaign_id}: get: tags: - campaigns summary: Get Meta Feed Campaign operationId: get_meta_feed_campaign_api_campaigns_online_ads_meta_feed_campaign__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/meta-feed/create-campaign: post: tags: - campaigns summary: Create Meta Feed Campaign operationId: create_meta_feed_campaign_api_campaigns_online_ads_meta_feed_create_campaign_post security: - HTTPBearer: [] parameters: - name: product_description in: query required: true schema: type: string title: Product Description - name: target_audience in: query required: true schema: type: string title: Target Audience - name: key_selling_points in: query required: false schema: type: string default: '' title: Key Selling Points - name: num_ads in: query required: false schema: type: integer default: 3 title: Num Ads - name: num_images_per_ad in: query required: false schema: type: integer default: 1 title: Num Images Per Ad - name: video_length in: query required: false schema: type: integer default: 10 title: Video Length - name: bid_strategy in: query required: false schema: type: string default: automatic title: Bid Strategy - name: budget_range in: query required: false schema: type: string default: medium title: Budget Range - name: country in: query required: false schema: anyOf: - type: string - type: 'null' title: Country - name: state_province in: query required: false schema: anyOf: - type: string - type: 'null' title: State Province - name: city in: query required: false schema: anyOf: - type: string - type: 'null' title: City - name: locations in: query required: false schema: anyOf: - type: string - type: 'null' title: Locations requestBody: content: application/json: schema: anyOf: - type: array items: type: string - type: 'null' title: Campaign Goals responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/meta-feed/update-campaign: put: tags: - campaigns summary: Update Meta Feed Campaign operationId: update_meta_feed_campaign_api_campaigns_online_ads_meta_feed_update_campaign_put requestBody: content: application/json: schema: $ref: '#/components/schemas/MetaFeedCampaignUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/meta-feed/edit-image: post: tags: - campaigns summary: Edit Meta Feed Image operationId: edit_meta_feed_image_api_campaigns_online_ads_meta_feed_edit_image_post responses: '410': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/online-ads/meta-feed/upload-image: post: tags: - campaigns summary: Upload Meta Feed Image operationId: upload_meta_feed_image_api_campaigns_online_ads_meta_feed_upload_image_post responses: '410': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/online-ads/meta-feed/launch: post: tags: - campaigns summary: Launch Meta Feed Campaign operationId: launch_meta_feed_campaign_api_campaigns_online_ads_meta_feed_launch_post requestBody: content: application/json: schema: additionalProperties: true type: object title: Request required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/linkedin-image-campaigns: get: tags: - campaigns summary: Get Linkedin Image Campaigns operationId: get_linkedin_image_campaigns_api_campaigns_online_ads_linkedin_image_campaigns_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/linkedin-image/{campaign_id}: get: tags: - campaigns summary: Get Linkedin Image Campaign operationId: get_linkedin_image_campaign_api_campaigns_online_ads_linkedin_image__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/linkedin-image-campaign/{campaign_id}: get: tags: - campaigns summary: Get Linkedin Image Campaign operationId: get_linkedin_image_campaign_api_campaigns_online_ads_linkedin_image_campaign__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/linkedin-image/update-campaign: put: tags: - campaigns summary: Update Linkedin Image Campaign operationId: update_linkedin_image_campaign_api_campaigns_online_ads_linkedin_image_update_campaign_put requestBody: content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/linkedin-video-campaigns: get: tags: - campaigns summary: Get Linkedin Video Campaigns operationId: get_linkedin_video_campaigns_api_campaigns_online_ads_linkedin_video_campaigns_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/linkedin-video/{campaign_id}: get: tags: - campaigns summary: Get Linkedin Video Campaign operationId: get_linkedin_video_campaign_api_campaigns_online_ads_linkedin_video__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/linkedin-video-campaign/{campaign_id}: get: tags: - campaigns summary: Get Linkedin Video Campaign operationId: get_linkedin_video_campaign_api_campaigns_online_ads_linkedin_video_campaign__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/linkedin-video/update-campaign: put: tags: - campaigns summary: Update Linkedin Video Campaign operationId: update_linkedin_video_campaign_api_campaigns_online_ads_linkedin_video_update_campaign_put requestBody: content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/tiktok-video: post: tags: - campaigns summary: Create Tiktok Video Ad Campaign operationId: create_tiktok_video_ad_campaign_api_campaigns_online_ads_tiktok_video_post security: - HTTPBearer: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TikTokVideoAdRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - campaigns summary: Get Tiktok Video Campaigns operationId: get_tiktok_video_campaigns_api_campaigns_online_ads_tiktok_video_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 10 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/tiktok-video/all: get: tags: - campaigns summary: Get Tiktok Video Ad Campaigns operationId: get_tiktok_video_ad_campaigns_api_campaigns_online_ads_tiktok_video_all_get responses: '200': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/online-ads/tiktok-video/call-to-actions: get: tags: - campaigns summary: Get Tiktok Video Call To Actions operationId: get_tiktok_video_call_to_actions_api_campaigns_online_ads_tiktok_video_call_to_actions_get responses: '200': description: Successful Response content: application/json: schema: {} /api/campaigns/online-ads/tiktok-video/{campaign_id}: get: tags: - campaigns summary: Get Tiktok Video Ad Campaign operationId: get_tiktok_video_ad_campaign_api_campaigns_online_ads_tiktok_video__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/tiktok-video/campaign/{campaign_id}: delete: tags: - campaigns summary: Delete Tiktok Video Ad Campaign operationId: delete_tiktok_video_ad_campaign_api_campaigns_online_ads_tiktok_video_campaign__campaign_id__delete security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/online-ads/tiktok-video/update-campaign: put: tags: - campaigns summary: Update Tiktok Video Ad Campaign operationId: update_tiktok_video_ad_campaign_api_campaigns_online_ads_tiktok_video_update_campaign_put requestBody: content: application/json: schema: $ref: '#/components/schemas/AdsCampaignUpdateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/generate-variation: post: tags: - campaigns summary: Generate Ad Variation description: "Generate a new variation of an existing ad campaign.\n\nArgs:\n request: Variation request data\n company_profile: Authenticated company profile\n db: Database session\n\nReturns:\n Structured response with campaign metadata and variation data" operationId: generate_ad_variation_api_campaigns_online_ads_generate_variation_post requestBody: content: application/json: schema: $ref: '#/components/schemas/GenerateAdVariationRequest' required: true responses: '201': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/online-ads/all-campaigns/count: get: tags: - campaigns summary: Get All Online Ads Campaigns Count description: 'Get the total count of all online ad campaigns across all platforms for the current company profile. Returns the total number of ad campaigns from Google Search, Google Display, Google Video, and Meta platforms.' operationId: get_all_online_ads_campaigns_count_api_campaigns_online_ads_all_campaigns_count_get responses: '200': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/online-ads/top-level: get: tags: - campaigns summary: Get Top Level Entities description: 'Return both A/B Groups and ungrouped campaigns for the management page. - Groups: all groups for the company (optionally filtered by ads_channel/status) - Campaigns: normalized platform ads that are NOT members of any group (optionally filtered by ads_channel)' operationId: get_top_level_entities_api_campaigns_online_ads_top_level_get security: - HTTPBearer: [] parameters: - name: ads_type in: query required: false schema: anyOf: - type: string - type: 'null' title: Ads Type - name: status_filter in: query required: false schema: anyOf: - type: string - type: 'null' title: Status Filter responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/images/edit-image/job: post: tags: - campaigns summary: Start Campaign Image Edit Job description: Start an asynchronous job to generate edited image variations for a campaign asset. operationId: start_campaign_image_edit_job_api_campaigns_images_edit_image_job_post requestBody: content: application/json: schema: $ref: '#/components/schemas/EditImageJobRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/JobResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/images/select-image: post: tags: - campaigns summary: Select Campaign Image description: 'Select an image variation for a campaign This endpoint allows users to choose one of the generated image variations and update their campaign with the selected image.' operationId: select_campaign_image_api_campaigns_images_select_image_post requestBody: content: application/json: schema: $ref: '#/components/schemas/ImageSelectionRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ImageSelectionResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/images/select-video: post: tags: - campaigns summary: Select Campaign Video description: 'Select a replacement video for a normalized ad campaign. User uploads are first saved to the gallery, then this endpoint links that company-owned video URL to the campaign creative.' operationId: select_campaign_video_api_campaigns_images_select_video_post requestBody: content: application/json: schema: $ref: '#/components/schemas/VideoSelectionRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VideoSelectionResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/images/batch-select-images: post: tags: - campaigns summary: Batch Select Campaign Images description: 'Select images for multiple campaigns in batch This is useful when updating multiple ad variations or campaigns with different selected images at once.' operationId: batch_select_campaign_images_api_campaigns_images_batch_select_images_post requestBody: content: application/json: schema: items: $ref: '#/components/schemas/ImageSelectionRequest' type: array title: Requests required: true responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/ImageSelectionResponse' type: array title: Response Batch Select Campaign Images Api Campaigns Images Batch Select Images Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/images/campaign/{campaign_type}/{campaign_id}/image-history: get: tags: - campaigns summary: Get Campaign Image History description: 'Get the image history for a campaign This can be extended to track all image changes over time' operationId: get_campaign_image_history_api_campaigns_images_campaign__campaign_type___campaign_id__image_history_get security: - HTTPBearer: [] parameters: - name: campaign_type in: path required: true schema: type: string title: Campaign Type - name: campaign_id in: path required: true schema: type: string title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/budget-estimate: post: tags: - campaigns summary: Budget Estimate description: Generate a budget estimate for campaign scope settings. operationId: budget_estimate_api_campaigns_budget_estimate_post requestBody: content: application/json: schema: $ref: '#/components/schemas/BudgetEstimateRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/BudgetEstimateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] /api/campaigns/dayparting/campaigns/{campaign_id}/configure: post: tags: - campaigns summary: Configure Campaign Dayparting operationId: configure_campaign_dayparting_api_campaigns_dayparting_campaigns__campaign_id__configure_post security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string format: uuid title: Campaign Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CampaignDaypartingRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/dayparting/campaigns/{campaign_id}/status: get: tags: - campaigns summary: Get Dayparting Status operationId: get_dayparting_status_api_campaigns_dayparting_campaigns__campaign_id__status_get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string format: uuid title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/dayparting/campaigns/{campaign_id}/disable: delete: tags: - campaigns summary: Disable Dayparting operationId: disable_dayparting_api_campaigns_dayparting_campaigns__campaign_id__disable_delete security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string format: uuid title: Campaign Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/dayparting/meta/{ad_id}/health: get: tags: - campaigns summary: Check Meta Rules Health operationId: check_meta_rules_health_api_campaigns_dayparting_meta__ad_id__health_get security: - HTTPBearer: [] parameters: - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DaypartingHealthResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/dayparting/meta/{ad_id}/cleanup: delete: tags: - campaigns summary: Cleanup Meta Rules operationId: cleanup_meta_rules_api_campaigns_dayparting_meta__ad_id__cleanup_delete security: - HTTPBearer: [] parameters: - name: ad_id in: path required: true schema: type: string format: uuid title: Ad Id responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/dayparting/performance/{campaign_id}: get: tags: - campaigns summary: Get Dayparting Performance operationId: get_dayparting_performance_api_campaigns_dayparting_performance__campaign_id__get security: - HTTPBearer: [] parameters: - name: campaign_id in: path required: true schema: type: string format: uuid title: Campaign Id - name: platform in: query required: false schema: anyOf: - type: string - type: 'null' title: Platform responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/geo/reverse-geocode: get: tags: - campaigns summary: Reverse Geocode Campaign Pin description: Resolve a map pin into postal/city/region fields for launch adapters. operationId: reverse_geocode_campaign_pin_api_campaigns_geo_reverse_geocode_get security: - HTTPBearer: [] parameters: - name: latitude in: query required: true schema: type: number maximum: 90 minimum: -90 title: Latitude - name: longitude in: query required: true schema: type: number maximum: 180 minimum: -180 title: Longitude - name: country_code in: query required: false schema: type: string minLength: 0 maxLength: 2 default: '' title: Country Code responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CampaignReverseGeocodeResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/geo/postal-code: get: tags: - campaigns summary: Resolve Campaign Postal Code description: Resolve a typed postal code for map preview and platform fallback labels. operationId: resolve_campaign_postal_code_api_campaigns_geo_postal_code_get security: - HTTPBearer: [] parameters: - name: postal_code in: query required: true schema: type: string minLength: 2 maxLength: 16 title: Postal Code - name: country_code in: query required: false schema: type: string minLength: 0 maxLength: 2 default: '' title: Country Code responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CampaignReverseGeocodeResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/queue: get: tags: - campaigns summary: Get Campaign Work Queue description: 'Three-bucket campaign work queue: live, needs-you, everything else. The dashboard endpoint answers "show me every ad"; this one answers "what should I launch today". The draft bucket is capped on purpose — see ``services.campaign_queue_read_model``.' operationId: get_campaign_work_queue_api_campaigns_queue_get security: - HTTPBearer: [] parameters: - name: draft_limit in: query required: false schema: type: integer default: 5 title: Draft Limit - name: window_days in: query required: false schema: type: integer default: 3 title: Window Days - name: counts_only in: query required: false schema: type: boolean default: false title: Counts Only responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/dashboard: get: tags: - campaigns summary: Get Campaign Dashboard Bundle operationId: get_campaign_dashboard_bundle_api_campaigns_dashboard_get security: - HTTPBearer: [] parameters: - name: page in: query required: false schema: type: integer default: 0 title: Page - name: limit in: query required: false schema: type: integer default: 200 title: Limit - name: mode in: query required: false schema: anyOf: - type: string - type: 'null' title: Mode - name: include_secondary in: query required: false schema: type: boolean default: true title: Include Secondary - name: platform_scope in: query required: false schema: anyOf: - type: string - type: 'null' title: Platform Scope - name: status_filter in: query required: false schema: anyOf: - type: string - type: 'null' title: Status Filter - name: source_filter in: query required: false schema: anyOf: - type: string - type: 'null' title: Source Filter - name: campaign_type_filter in: query required: false schema: anyOf: - type: string - type: 'null' title: Campaign Type Filter - name: search in: query required: false schema: anyOf: - type: string - type: 'null' title: Search - name: include_filter_counts in: query required: false schema: type: boolean default: false title: Include Filter Counts - name: range_start in: query required: false schema: anyOf: - type: string - type: 'null' title: Range Start - name: range_end in: query required: false schema: anyOf: - type: string - type: 'null' title: Range End responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/campaigns/all/count: get: tags: - campaigns summary: Get All Campaigns Count description: 'Get the total count of all campaigns across all types (email, social post, and online ads) for the company profile. Returns the total number and breakdown by campaign type.' operationId: get_all_campaigns_count_api_campaigns_all_count_get responses: '200': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] /api/campaigns/all/active: get: tags: - campaigns summary: Get Active Campaigns description: 'Get all active campaigns across all types with details for dashboard display. Returns campaigns that are currently running or scheduled. Includes AI test results if available.' operationId: get_active_campaigns_api_campaigns_all_active_get responses: '200': description: Successful Response content: application/json: schema: {} security: - HTTPBearer: [] components: schemas: EmailCampaignResponse: properties: name: anyOf: - type: string - type: 'null' title: Name subject_line: anyOf: - type: string - type: 'null' title: Subject Line content: anyOf: - type: string - type: 'null' title: Content preview_text: anyOf: - type: string - type: 'null' title: Preview Text call_to_action: anyOf: - type: string - type: 'null' title: Call To Action target_audience: anyOf: - type: string - type: 'null' title: Target Audience key_selling_points: anyOf: - type: string - type: 'null' title: Key Selling Points from_name: anyOf: - type: string - type: 'null' title: From Name reply_to: anyOf: - type: string - type: 'null' title: Reply To product_offering_id: anyOf: - type: string format: uuid - type: 'null' title: Product Offering Id workflow_status: anyOf: - $ref: '#/components/schemas/WorkflowStatus' - type: 'null' default: draft scheduled_send_time: anyOf: - type: string - type: 'null' title: Scheduled Send Time sent_at: anyOf: - type: string - type: 'null' title: Sent At personalization_level: anyOf: - type: string - type: 'null' title: Personalization Level default: medium merge_variables: anyOf: - additionalProperties: true type: object - type: 'null' title: Merge Variables dynamic_blocks: anyOf: - additionalProperties: true type: object - type: 'null' title: Dynamic Blocks ab_test_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Ab Test Config performance_metrics: anyOf: - additionalProperties: true type: object - type: 'null' title: Performance Metrics optimization_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Optimization Config company_id: anyOf: - type: string format: uuid - type: 'null' title: Company Id consumer_group_ids: anyOf: - items: type: string format: uuid type: array - type: 'null' title: Consumer Group Ids id: anyOf: - type: string - type: 'null' title: Id company_profile_id: anyOf: - type: string - type: 'null' title: Company Profile Id campaign_id: type: string title: Campaign Id idea_number: type: integer title: Idea Number variation: type: integer title: Variation total_recipients: type: integer title: Total Recipients default: 0 emails_sent: type: integer title: Emails Sent default: 0 emails_failed: type: integer title: Emails Failed default: 0 creation_date: anyOf: - type: string - type: 'null' title: Creation Date last_modified: anyOf: - type: string - type: 'null' title: Last Modified images: items: $ref: '#/components/schemas/EmailCampaignImageResponse' type: array title: Images default: [] type: object required: - id - company_profile_id - campaign_id - idea_number - variation - creation_date - last_modified title: EmailCampaignResponse Body_edit_campaign_content_api_campaigns_email_edit_content_post: properties: campaign_id: type: string title: Campaign Id description: Campaign ID of the content to edit idea_number: type: integer title: Idea Number description: Campaign idea number content: type: string title: Content description: Existing HTML content to edit edit_prompt: type: string title: Edit Prompt description: Instructions for editing the content type: object required: - campaign_id - idea_number - content - edit_prompt title: Body_edit_campaign_content_api_campaigns_email_edit_content_post ImageSelectionResponse: properties: success: type: boolean title: Success campaign_id: anyOf: - type: string format: uuid - type: string title: Campaign Id campaign_type: type: string title: Campaign Type selected_image_url: type: string title: Selected Image Url message: type: string title: Message type: object required: - success - campaign_id - campaign_type - selected_image_url - message title: ImageSelectionResponse description: Response schema for image selection CampaignAppliedOptimization: properties: action_id: type: string title: Action Id action_ids: items: type: string type: array title: Action Ids default: [] rollbackable_action_ids: items: type: string type: array title: Rollbackable Action Ids default: [] title: type: string title: Title executed_at: type: string title: Executed At change_scope: anyOf: - type: string - type: 'null' title: Change Scope change_scope_label: anyOf: - type: string - type: 'null' title: Change Scope Label outcome_state: type: string title: Outcome State default: measuring changes: items: $ref: '#/components/schemas/CampaignOptimizationChange' type: array title: Changes default: [] is_rollback: type: boolean title: Is Rollback default: false rollback_available: type: boolean title: Rollback Available default: false rollback_unavailable_reason: anyOf: - type: string - type: 'null' title: Rollback Unavailable Reason type: object required: - action_id - title - executed_at title: CampaignAppliedOptimization description: 'The most recent provider-executed optimization for one campaign. This is the durable, read-only counterpart to ``pending_recommendation``: the campaign row can keep showing exactly what changed after the approval disappears from the open queue.' CampaignOptimizationChange: properties: title: type: string title: Title type: anyOf: - type: string - type: 'null' title: Type rationale: anyOf: - type: string - type: 'null' title: Rationale campaign: anyOf: - type: string - type: 'null' title: Campaign campaign_id: anyOf: - type: string - type: 'null' title: Campaign Id option_id: anyOf: - type: string - type: 'null' title: Option Id selection_id: anyOf: - type: string - type: 'null' title: Selection Id source_action_id: anyOf: - type: string - type: 'null' title: Source Action Id edits: items: $ref: '#/components/schemas/CampaignOptimizationFieldEdit' type: array title: Edits default: [] type: object required: - title title: CampaignOptimizationChange description: 'One concrete change inside a pending optimization, for a before/after review. Carries the data-backed *why* (``rationale``) and the list of literal field/asset ``edits`` (each a clean before -> after), so accepting a live-campaign change is informed -- the reviewer sees exactly which fields/assets change and the reason.' SocialPostVariationRequest: properties: campaign_id: type: string title: Campaign Id description: ID of the campaign to create variations for idea_number: type: integer title: Idea Number description: Idea number within the campaign type: object required: - campaign_id - idea_number title: SocialPostVariationRequest TikTokVideoAdRequest: properties: product_description: type: string title: Product Description target_audience: type: string title: Target Audience campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals key_selling_points: type: string title: Key Selling Points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads default: 3 video_length: type: integer maximum: 10.0 minimum: 10.0 title: Video Length description: Video duration is fixed at 10 seconds default: 10 bid_strategy: type: string title: Bid Strategy default: automatic budget_range: type: string title: Budget Range default: medium country: anyOf: - type: string - type: 'null' title: Country state_province: anyOf: - type: string - type: 'null' title: State Province city: anyOf: - type: string - type: 'null' title: City reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images type: object required: - product_description - target_audience title: TikTokVideoAdRequest CampaignOptimizationSummaryResponse: properties: summaries: items: $ref: '#/components/schemas/CampaignOptimizationSummary' type: array title: Summaries type: object required: - summaries title: CampaignOptimizationSummaryResponse PlatformDaypartingConfig: properties: enabled: type: boolean title: Enabled timezone: type: string title: Timezone schedule: items: $ref: '#/components/schemas/DaypartingSlot' type: array title: Schedule bid_adjustments: anyOf: - additionalProperties: type: number type: object - type: 'null' title: Bid Adjustments type: object required: - enabled - timezone - schedule title: PlatformDaypartingConfig GenerateAdVariationRequest: properties: campaign_id: type: string title: Campaign Id variation_count: type: integer title: Variation Count description: Number of variations to generate default: 1 generate_new_images: type: boolean title: Generate New Images description: Whether to generate new images for the variation default: true type: object required: - campaign_id title: GenerateAdVariationRequest SocialScheduleUpsertRequest: properties: schedule_id: anyOf: - type: string - type: 'null' title: Schedule Id campaign_id: type: string title: Campaign Id idea_number: type: integer title: Idea Number variation: type: integer title: Variation default: 0 platform: anyOf: - type: string - type: 'null' title: Platform scheduled_local_date: type: string title: Scheduled Local Date scheduled_local_time: type: string title: Scheduled Local Time schedule_timezone: type: string title: Schedule Timezone default: UTC posting_identity: $ref: '#/components/schemas/SocialSchedulePostingIdentity' validate_only: type: boolean title: Validate Only default: false type: object required: - campaign_id - idea_number - scheduled_local_date - scheduled_local_time - posting_identity title: SocialScheduleUpsertRequest CampaignResponse: properties: id: anyOf: - type: integer - type: 'null' title: Id campaign_id: type: string title: Campaign Id name: type: string title: Name target_platforms: items: type: string type: array title: Target Platforms target_audience: anyOf: - type: string - type: 'null' title: Target Audience user_prompt: anyOf: - type: string - type: 'null' title: User Prompt status: anyOf: - type: string - type: 'null' title: Status country: anyOf: - type: string - type: 'null' title: Country state_province: anyOf: - type: string - type: 'null' title: State Province city: anyOf: - type: string - type: 'null' title: City creation_date: anyOf: - type: string - type: 'null' title: Creation Date last_modified: anyOf: - type: string - type: 'null' title: Last Modified deployed_at: anyOf: - type: string - type: 'null' title: Deployed At metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata creation_source: anyOf: - type: string - type: 'null' title: Creation Source type: object required: - campaign_id - name - target_platforms title: CampaignResponse description: Base class for campaign metadata response. Body_direct_edit_social_post_api_campaigns_social_post_direct_edit_social_post_post: properties: campaign_id: type: string title: Campaign Id description: Campaign ID of the social post to edit idea_number: type: integer title: Idea Number description: Social post idea number variation: anyOf: - type: integer - type: 'null' title: Variation description: Social post variation being edited updated_post: additionalProperties: true type: object title: Updated Post description: Updated post content with name, caption, hashtags, etc. type: object required: - campaign_id - idea_number - updated_post title: Body_direct_edit_social_post_api_campaigns_social_post_direct_edit_social_post_post ExternalCampaignSyncRequest: properties: platforms: items: type: string enum: - google - meta - tiktok - linkedin type: array minItems: 1 title: Platforms limit: type: integer maximum: 200.0 minimum: 1.0 title: Limit default: 200 metrics_lookback_days: type: integer maximum: 90.0 minimum: 1.0 title: Metrics Lookback Days default: 30 dry_run: type: boolean title: Dry Run default: false exhaustive: type: boolean title: Exhaustive default: false additionalProperties: false type: object title: ExternalCampaignSyncRequest description: Authenticated sync settings; profile scope only comes from auth context. CampaignAnalyticsWindow: properties: window_type: type: string title: Window Type metric_key: anyOf: - type: string - type: 'null' title: Metric Key current_value: anyOf: - type: number - type: 'null' title: Current Value baseline_value: anyOf: - type: number - type: 'null' title: Baseline Value relative_delta: anyOf: - type: number - type: 'null' title: Relative Delta data_sufficiency: anyOf: - type: string - type: 'null' title: Data Sufficiency is_big_movement: type: boolean title: Is Big Movement default: false movement_reason: anyOf: - type: string - type: 'null' title: Movement Reason type: object required: - window_type title: CampaignAnalyticsWindow description: 'One general DoD/WoW movement for a campaign''s headline metric. ``relative_delta`` is null when the baseline is ~0 (an honest "new/!comparable", never a fabricated %); ``data_sufficiency`` is ``ok`` once the window has enough days, else ``insufficient`` (e.g. WoW with under a full prior week).' Body_upload_social_post_image_api_campaigns_social_post_upload_social_post_image_post: properties: file: type: string format: binary title: File description: Image file to upload campaign_id: type: string title: Campaign Id description: Campaign ID idea_number: type: integer title: Idea Number description: Campaign idea number current_image_url: type: string title: Current Image Url description: URL of the current image (required if replace is True) replace: type: boolean title: Replace description: Whether to replace existing image (True) or append as new image (False) default: true type: object required: - file - campaign_id - idea_number title: Body_upload_social_post_image_api_campaigns_social_post_upload_social_post_image_post CampaignReverseGeocodeResponse: properties: postal_code: anyOf: - type: string - type: 'null' title: Postal Code city: anyOf: - type: string - type: 'null' title: City region: anyOf: - type: string - type: 'null' title: Region region_code: anyOf: - type: string - type: 'null' title: Region Code country_code: anyOf: - type: string - type: 'null' title: Country Code country_name: anyOf: - type: string - type: 'null' title: Country Name display_label: anyOf: - type: string - type: 'null' title: Display Label latitude: anyOf: - type: number - type: 'null' title: Latitude longitude: anyOf: - type: number - type: 'null' title: Longitude geojson: anyOf: - additionalProperties: true type: object - type: 'null' title: Geojson type: object title: CampaignReverseGeocodeResponse EmailCampaignCreate: properties: name: anyOf: - type: string - type: 'null' title: Name subject_line: anyOf: - type: string - type: 'null' title: Subject Line content: anyOf: - type: string - type: 'null' title: Content preview_text: anyOf: - type: string - type: 'null' title: Preview Text call_to_action: anyOf: - type: string - type: 'null' title: Call To Action target_audience: anyOf: - type: string - type: 'null' title: Target Audience key_selling_points: anyOf: - type: string - type: 'null' title: Key Selling Points from_name: anyOf: - type: string - type: 'null' title: From Name reply_to: anyOf: - type: string - type: 'null' title: Reply To product_offering_id: anyOf: - type: string format: uuid - type: 'null' title: Product Offering Id workflow_status: anyOf: - $ref: '#/components/schemas/WorkflowStatus' - type: 'null' default: draft scheduled_send_time: anyOf: - type: string format: date-time - type: 'null' title: Scheduled Send Time sent_at: anyOf: - type: string format: date-time - type: 'null' title: Sent At personalization_level: anyOf: - type: string - type: 'null' title: Personalization Level default: medium merge_variables: anyOf: - additionalProperties: true type: object - type: 'null' title: Merge Variables dynamic_blocks: anyOf: - additionalProperties: true type: object - type: 'null' title: Dynamic Blocks ab_test_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Ab Test Config performance_metrics: anyOf: - additionalProperties: true type: object - type: 'null' title: Performance Metrics optimization_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Optimization Config company_id: anyOf: - type: string format: uuid - type: 'null' title: Company Id consumer_group_ids: anyOf: - items: type: string format: uuid type: array - type: 'null' title: Consumer Group Ids campaign_id: type: string title: Campaign Id idea_number: type: integer title: Idea Number variation: type: integer title: Variation default: 0 type: object required: - campaign_id - idea_number title: EmailCampaignCreate VideoSelectionRequest: properties: campaign_id: anyOf: - type: string format: uuid - type: string title: Campaign Id description: Campaign ID (can be UUID database ID or string campaign_id) campaign_type: type: string title: Campaign Type description: Type of campaign (e.g., google_video, tiktok_video) selected_video_url: type: string title: Selected Video Url description: URL of the selected video asset variation_index: anyOf: - type: integer - type: 'null' title: Variation Index description: Index of the selected video (0-based) total_variations: anyOf: - type: integer - type: 'null' title: Total Variations description: Total number of videos that were presented selection_metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Selection Metadata description: Additional metadata about the selection ad_id: anyOf: - type: string - type: 'null' title: Ad Id description: Specific ad ID for ad campaigns type: object required: - campaign_id - campaign_type - selected_video_url title: VideoSelectionRequest description: Request schema for selecting or uploading a replacement video for a campaign. MetaFeedAdRequest: properties: product_description: type: string title: Product Description description: Description of the product or service target_audience: type: string title: Target Audience description: Target audience description company_profile_id: type: string format: uuid title: Company Profile Id description: Company profile ID (required) campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals description: List of campaign goals key_selling_points: type: string title: Key Selling Points description: Key selling points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads description: Number of ad variations to generate default: 3 bid_strategy: type: string title: Bid Strategy description: Bidding strategy default: maximize_conversions budget_range: type: string title: Budget Range description: Budget range (low, medium, high, custom) default: medium country: anyOf: - type: string - type: 'null' title: Country description: Target country state_province: anyOf: - type: string - type: 'null' title: State Province description: Target state/province city: anyOf: - type: string - type: 'null' title: City description: Target city locations: anyOf: - items: $ref: '#/components/schemas/LocationItem' type: array - type: 'null' title: Locations description: List of locations to target (countries/regions/states/cities/postal codes/proximities). This does not split budget per location; all locations share the campaign budget. reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images description: List of reference image base64 data URLs (max 3) lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled description: Whether to use lead form extension where supported default: false max_cpc: anyOf: - type: number minimum: 0.01 - type: 'null' title: Max Cpc description: Maximum cost per click in dollars (e.g., 1.50 for $1.50). Required when bid_strategy is 'MANUAL_CPC' experiment_package_id: anyOf: - type: string maxLength: 64 - type: 'null' title: Experiment Package Id description: Test package id; created campaigns are stamped with this linkage launch_strategy_mode: anyOf: - type: string pattern: ^(test_learn_pilot|direct_campaign)$ - type: 'null' title: Launch Strategy Mode description: test_learn_pilot or direct_campaign dayparting_enabled: anyOf: - type: boolean - type: 'null' title: Dayparting Enabled description: Whether dayparting/ad scheduling is enabled for this campaign default: false dayparting_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Dayparting Config description: Dayparting configuration including schedule, timezone, and platform-specific settings num_images_per_ad: type: integer maximum: 5.0 minimum: 1.0 title: Num Images Per Ad description: Images per ad. Meta Feed uses 1 image for Single Image and 1 thumbnail for Video. default: 1 placements: anyOf: - items: type: string type: array - type: 'null' title: Placements description: Ad placements ad_format: type: string title: Ad Format description: 'Meta Feed creative format: ''Video'' or ''Single Image''' default: Video video_length: type: integer maximum: 10.0 minimum: 10.0 title: Video Length description: Video duration is fixed at 10 seconds default: 10 type: object required: - product_description - target_audience - company_profile_id title: MetaFeedAdRequest description: Request model for Meta Feed ads SocialPostCampaignMediaResponse: properties: media_type: type: string title: Media Type media_url: type: string title: Media Url thumbnail_url: anyOf: - type: string - type: 'null' title: Thumbnail Url video_url: anyOf: - type: string - type: 'null' title: Video Url original_prompt: anyOf: - type: string - type: 'null' title: Original Prompt enhanced_prompt: anyOf: - type: string - type: 'null' title: Enhanced Prompt width: anyOf: - type: integer - type: 'null' title: Width height: anyOf: - type: integer - type: 'null' title: Height duration: anyOf: - type: integer - type: 'null' title: Duration file_size: anyOf: - type: integer - type: 'null' title: File Size media_metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Media Metadata position: anyOf: - type: integer - type: 'null' title: Position default: 0 id: anyOf: - type: string - type: 'null' title: Id social_post_campaign_id: type: string format: uuid title: Social Post Campaign Id creation_date: anyOf: - type: string - type: 'null' title: Creation Date type: object required: - media_type - media_url - id - social_post_campaign_id - creation_date title: SocialPostCampaignMediaResponse SocialPostCampaignCreate: properties: name: anyOf: - type: string - type: 'null' title: Name caption: anyOf: - type: string - type: 'null' title: Caption hashtags: anyOf: - type: string - type: 'null' title: Hashtags target_platform: anyOf: - type: string - type: 'null' title: Target Platform post_type: anyOf: - type: string - type: 'null' title: Post Type media_type: anyOf: - type: string - type: 'null' title: Media Type platform_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Platform Config target_audience: anyOf: - additionalProperties: true type: object - type: 'null' title: Target Audience product_offering_id: anyOf: - type: string format: uuid - type: 'null' title: Product Offering Id platform: anyOf: - type: string - type: 'null' title: Platform post_id: anyOf: - type: string - type: 'null' title: Post Id post_url: anyOf: - type: string - type: 'null' title: Post Url posted_at: anyOf: - type: string format: date-time - type: 'null' title: Posted At scheduled_for: anyOf: - type: string format: date-time - type: 'null' title: Scheduled For status: anyOf: - type: string - type: 'null' title: Status post_metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Post Metadata auto_rating: anyOf: - additionalProperties: true type: object - type: 'null' title: Auto Rating campaign_id: type: string title: Campaign Id idea_number: type: integer title: Idea Number variation: type: integer title: Variation default: 0 type: object required: - campaign_id - idea_number title: SocialPostCampaignCreate AiTeamActivityItem: properties: id: type: string format: uuid title: Id title: type: string title: Title stage: type: string title: Stage activity_type: type: string title: Activity Type activity_type_label: type: string title: Activity Type Label owner_agent_key: anyOf: - type: string - type: 'null' title: Owner Agent Key change_scope: anyOf: - type: string - type: 'null' title: Change Scope actioned_at: anyOf: - type: string - type: 'null' title: Actioned At outcome_state: type: string title: Outcome State default: measuring outcome_summary: anyOf: - type: string - type: 'null' title: Outcome Summary optimization_details: anyOf: - $ref: '#/components/schemas/CampaignAppliedOptimization' - type: 'null' type: object required: - id - title - stage - activity_type - activity_type_label title: AiTeamActivityItem DaypartingHealthResponse: properties: ad_id: type: string title: Ad Id total_rules: type: integer title: Total Rules healthy_rules: items: type: string type: array title: Healthy Rules unhealthy_rules: items: additionalProperties: true type: object type: array title: Unhealthy Rules missing_rules: items: additionalProperties: true type: object type: array title: Missing Rules health_score: type: number title: Health Score type: object required: - ad_id - total_rules - healthy_rules - unhealthy_rules - missing_rules - health_score title: DaypartingHealthResponse CampaignOptimizationFieldEdit: properties: label: type: string title: Label kind: type: string title: Kind before: anyOf: - type: string - type: 'null' title: Before after: anyOf: - type: string - type: 'null' title: After image_url: anyOf: - type: string - type: 'null' title: Image Url before_image_url: anyOf: - type: string - type: 'null' title: Before Image Url note: anyOf: - type: string - type: 'null' title: Note gloss: anyOf: - type: string - type: 'null' title: Gloss match_type: anyOf: - type: string - type: 'null' title: Match Type type: object required: - label - kind title: CampaignOptimizationFieldEdit description: 'One concrete field/asset edit, as a clean before -> after mapping. Sourced from a single ``optimization_action`` (not the option-level prose), so each row is the literal thing changing: a copy field (headline/description) with its current vs proposed text, the new creative image, or a keyword operation (pause / add / add-negative) with the metric evidence behind it.' GoogleVideoAdRequest: properties: product_description: type: string title: Product Description description: Description of the product or service target_audience: type: string title: Target Audience description: Target audience description campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals key_selling_points: type: string title: Key Selling Points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads default: 3 video_length: type: integer maximum: 10.0 minimum: 10.0 title: Video Length description: Video duration is fixed at 10 seconds default: 10 bid_strategy: type: string title: Bid Strategy default: automatic budget_range: type: string title: Budget Range default: medium country: anyOf: - type: string - type: 'null' title: Country state_province: anyOf: - type: string - type: 'null' title: State Province city: anyOf: - type: string - type: 'null' title: City locations: anyOf: - items: additionalProperties: true type: object type: array - type: 'null' title: Locations reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images type: object required: - product_description - target_audience title: GoogleVideoAdRequest CampaignPerfHistoryPoint: properties: date: type: string title: Date value: anyOf: - type: number - type: 'null' title: Value spend: anyOf: - type: number - type: 'null' title: Spend conversions: anyOf: - type: number - type: 'null' title: Conversions clicks: anyOf: - type: number - type: 'null' title: Clicks type: object required: - date title: CampaignPerfHistoryPoint description: 'One day of the campaign''s headline metric, for the expanded-row trend chart. ``value`` is null on a day with no spend (an honest gap, not a fabricated zero).' JobResponse: properties: job_id: type: string title: Job Id description: Unique job identifier status: type: string title: Status description: Initial job status (typically 'running') stream_url: type: string title: Stream Url description: SSE endpoint for real-time progress poll_url: type: string title: Poll Url description: HTTP endpoint for polling status type: object required: - job_id - status - stream_url - poll_url title: JobResponse description: Response after submitting a job example: job_id: 987fcdeb-51a2-43f7-9876-543210987654 poll_url: /api/chat/agentic/jobs/987fcdeb-51a2-43f7-9876-543210987654 status: running stream_url: /api/chat/agentic/jobs/987fcdeb-51a2-43f7-9876-543210987654/stream Body_upload_email_campaign_image_general_api_campaigns_email_upload_image_post: properties: file: type: string format: binary title: File description: New image file to upload campaign_id: type: string title: Campaign Id description: Campaign ID idea_number: type: integer title: Idea Number description: Campaign idea number image_type: type: string title: Image Type description: Type of image (EMAIL_BANNER, EMAIL_IMAGE, etc.) default: EMAIL_IMAGE type: object required: - file - campaign_id - idea_number title: Body_upload_email_campaign_image_general_api_campaigns_email_upload_image_post AmazonSponsoredProductsAdRequest: properties: product_description: type: string title: Product Description description: Description of the product or service target_audience: type: string title: Target Audience description: Target audience description company_profile_id: type: string format: uuid title: Company Profile Id description: Company profile ID (required) campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals description: List of campaign goals key_selling_points: type: string title: Key Selling Points description: Key selling points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads description: Number of ad variations to generate default: 3 bid_strategy: type: string title: Bid Strategy description: Bidding strategy default: maximize_conversions budget_range: type: string title: Budget Range description: Budget range (low, medium, high, custom) default: medium country: anyOf: - type: string - type: 'null' title: Country description: Target country state_province: anyOf: - type: string - type: 'null' title: State Province description: Target state/province city: anyOf: - type: string - type: 'null' title: City description: Target city locations: anyOf: - items: $ref: '#/components/schemas/LocationItem' type: array - type: 'null' title: Locations description: List of locations to target (countries/regions/states/cities/postal codes/proximities). This does not split budget per location; all locations share the campaign budget. reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images description: List of reference image base64 data URLs (max 3) lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled description: Whether to use lead form extension where supported default: false max_cpc: anyOf: - type: number minimum: 0.01 - type: 'null' title: Max Cpc description: Maximum cost per click in dollars (e.g., 1.50 for $1.50). Required when bid_strategy is 'MANUAL_CPC' experiment_package_id: anyOf: - type: string maxLength: 64 - type: 'null' title: Experiment Package Id description: Test package id; created campaigns are stamped with this linkage launch_strategy_mode: anyOf: - type: string pattern: ^(test_learn_pilot|direct_campaign)$ - type: 'null' title: Launch Strategy Mode description: test_learn_pilot or direct_campaign dayparting_enabled: anyOf: - type: boolean - type: 'null' title: Dayparting Enabled description: Whether dayparting/ad scheduling is enabled for this campaign default: false dayparting_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Dayparting Config description: Dayparting configuration including schedule, timezone, and platform-specific settings asin: anyOf: - type: string - type: 'null' title: Asin description: Amazon Standard Identification Number sku: anyOf: - type: string - type: 'null' title: Sku description: Stock Keeping Unit type: object required: - product_description - target_audience - company_profile_id title: AmazonSponsoredProductsAdRequest description: Request model for Amazon Sponsored Products ads CampaignAnalyticsImpact: properties: metric_key: anyOf: - type: string - type: 'null' title: Metric Key relative_delta: anyOf: - type: number - type: 'null' title: Relative Delta outcome_state: type: string title: Outcome State default: measuring post_days_observed: anyOf: - type: integer - type: 'null' title: Post Days Observed optimization_executed_at: anyOf: - type: string - type: 'null' title: Optimization Executed At pre_value: anyOf: - type: number - type: 'null' title: Pre Value post_value: anyOf: - type: number - type: 'null' title: Post Value change_summary: anyOf: - type: string - type: 'null' title: Change Summary type: object title: CampaignAnalyticsImpact description: 'One executed optimization move''s measured after-effect on the campaign. ``outcome_state`` is ``measuring`` until enough post-change days accrue, then the scored verdict (``improved`` | ``neutral`` | ``regressed``) from the AI team''s single learning brain.' MetaStoriesReelsCampaignUpdateRequest: properties: campaign_id: type: string title: Campaign Id ad_id: type: string title: Ad Id description: Normalized platform ad UUID name: anyOf: - type: string - type: 'null' title: Name headline: anyOf: - type: string - type: 'null' title: Headline long_headline: anyOf: - type: string - type: 'null' title: Long Headline description: anyOf: - type: string - type: 'null' title: Description ad_name: anyOf: - type: string - type: 'null' title: Ad Name call_to_action: anyOf: - type: string - type: 'null' title: Call To Action keywords: anyOf: - items: additionalProperties: true type: object type: array - items: $ref: '#/components/schemas/KeywordWithCpc' type: array - items: type: string type: array - type: 'null' title: Keywords negative_keywords: anyOf: - items: additionalProperties: true type: object type: array - items: $ref: '#/components/schemas/KeywordWithCpc' type: array - items: type: string type: array - type: 'null' title: Negative Keywords country: anyOf: - type: string - type: 'null' title: Country state_province: anyOf: - type: string - type: 'null' title: State Province city: anyOf: - type: string - type: 'null' title: City recommended_daily_budget: anyOf: - type: integer - type: 'null' title: Recommended Daily Budget total_budget: anyOf: - type: integer - type: 'null' title: Total Budget duration: anyOf: - type: integer - type: 'null' title: Duration target_platform: anyOf: - type: string - type: 'null' title: Target Platform start_date: anyOf: - type: string - type: 'null' title: Start Date end_date: anyOf: - type: string - type: 'null' title: End Date business_name: anyOf: - type: string - type: 'null' title: Business Name final_url: anyOf: - type: string - type: 'null' title: Final Url headlines: anyOf: - items: type: string type: array - type: 'null' title: Headlines descriptions: anyOf: - items: type: string type: array - type: 'null' title: Descriptions format_setting: anyOf: - type: string - type: 'null' title: Format Setting primary_text: anyOf: - type: string - type: 'null' title: Primary Text destination_url: anyOf: - type: string - type: 'null' title: Destination Url ad_format: anyOf: - type: string - type: 'null' title: Ad Format placements: anyOf: - items: type: string type: array - type: 'null' title: Placements introductory_text: anyOf: - type: string - type: 'null' title: Introductory Text alt_text: anyOf: - type: string - type: 'null' title: Alt Text aspect_ratio: anyOf: - type: string - type: 'null' title: Aspect Ratio thumbnail_url: anyOf: - type: string - type: 'null' title: Thumbnail Url linkedin_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Linkedin Lead Form Config google_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Google Lead Form Config meta_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Meta Lead Form Config asin: anyOf: - type: string - type: 'null' title: Asin sku: anyOf: - type: string - type: 'null' title: Sku targeting_type: anyOf: - type: string - type: 'null' title: Targeting Type bidding_strategy: anyOf: - type: string - type: 'null' title: Bidding Strategy default_bid: anyOf: - type: number - type: 'null' title: Default Bid brand_name: anyOf: - type: string - type: 'null' title: Brand Name landing_page_url: anyOf: - type: string - type: 'null' title: Landing Page Url showcase_products: anyOf: - items: type: string type: array - type: 'null' title: Showcase Products targeting_products: anyOf: - items: type: string type: array - type: 'null' title: Targeting Products audience_segments: anyOf: - items: type: string type: array - type: 'null' title: Audience Segments interests: anyOf: - items: type: string type: array - type: 'null' title: Interests lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled bid_strategy: anyOf: - type: string - type: 'null' title: Bid Strategy max_cpc: anyOf: - type: number - type: 'null' title: Max Cpc ad_text: anyOf: - type: string - type: 'null' title: Ad Text display_name: anyOf: - type: string - type: 'null' title: Display Name objective_type: anyOf: - type: string - type: 'null' title: Objective Type video_length: anyOf: - type: integer - type: 'null' title: Video Length dayparting_config: anyOf: - additionalProperties: true type: object - type: string - type: 'null' title: Dayparting Config media_operations: anyOf: - items: $ref: '#/components/schemas/CampaignMediaOperation' type: array - type: 'null' title: Media Operations type: object required: - campaign_id - ad_id title: MetaStoriesReelsCampaignUpdateRequest CampaignPostsResponse: properties: posts: items: $ref: '#/components/schemas/PostModel' type: array title: Posts type: object required: - posts title: CampaignPostsResponse Body_edit_campaign_image_api_campaigns_email_edit_image_post: properties: campaign_id: type: string title: Campaign Id description: Campaign ID of the image to edit idea_number: type: integer title: Idea Number description: Campaign idea number image_url: type: string title: Image Url description: URL of the image to edit edit_prompt: type: string title: Edit Prompt description: Instructions for editing the image type: object required: - campaign_id - idea_number - image_url - edit_prompt title: Body_edit_campaign_image_api_campaigns_email_edit_image_post AdsCampaignUpdateResponse: properties: status: type: string title: Status message: type: string title: Message campaign_id: type: string title: Campaign Id campaign: anyOf: - $ref: '#/components/schemas/CampaignResponse' - type: 'null' ad: anyOf: - {} - type: 'null' title: Ad type: object required: - status - message - campaign_id title: AdsCampaignUpdateResponse description: Standardized response for ad update operations within a campaign. DaypartingSlot: properties: day: type: string title: Day description: Day of week (MONDAY, TUESDAY, etc.) start_hour: type: integer maximum: 23.0 minimum: 0.0 title: Start Hour start_minute: type: integer maximum: 59.0 minimum: 0.0 title: Start Minute end_hour: type: integer maximum: 23.0 minimum: 0.0 title: End Hour end_minute: type: integer maximum: 59.0 minimum: 0.0 title: End Minute bid_modifier: anyOf: - type: number maximum: 10.0 minimum: 0.1 - type: 'null' title: Bid Modifier default: 1.0 type: object required: - day - start_hour - start_minute - end_hour - end_minute title: DaypartingSlot BaseAdsCampaignRequest: properties: product_description: type: string title: Product Description description: Description of the product or service target_audience: type: string title: Target Audience description: Target audience description company_profile_id: type: string format: uuid title: Company Profile Id description: Company profile ID (required) campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals description: List of campaign goals key_selling_points: type: string title: Key Selling Points description: Key selling points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads description: Number of ad variations to generate default: 3 bid_strategy: type: string title: Bid Strategy description: Bidding strategy default: maximize_conversions budget_range: type: string title: Budget Range description: Budget range (low, medium, high, custom) default: medium country: anyOf: - type: string - type: 'null' title: Country description: Target country state_province: anyOf: - type: string - type: 'null' title: State Province description: Target state/province city: anyOf: - type: string - type: 'null' title: City description: Target city locations: anyOf: - items: $ref: '#/components/schemas/LocationItem' type: array - type: 'null' title: Locations description: List of locations to target (countries/regions/states/cities/postal codes/proximities). This does not split budget per location; all locations share the campaign budget. reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images description: List of reference image base64 data URLs (max 3) lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled description: Whether to use lead form extension where supported default: false max_cpc: anyOf: - type: number minimum: 0.01 - type: 'null' title: Max Cpc description: Maximum cost per click in dollars (e.g., 1.50 for $1.50). Required when bid_strategy is 'MANUAL_CPC' experiment_package_id: anyOf: - type: string maxLength: 64 - type: 'null' title: Experiment Package Id description: Test package id; created campaigns are stamped with this linkage launch_strategy_mode: anyOf: - type: string pattern: ^(test_learn_pilot|direct_campaign)$ - type: 'null' title: Launch Strategy Mode description: test_learn_pilot or direct_campaign dayparting_enabled: anyOf: - type: boolean - type: 'null' title: Dayparting Enabled description: Whether dayparting/ad scheduling is enabled for this campaign default: false dayparting_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Dayparting Config description: Dayparting configuration including schedule, timezone, and platform-specific settings type: object required: - product_description - target_audience - company_profile_id title: BaseAdsCampaignRequest description: Base request model for creating ad campaigns. BudgetEstimateRequest: properties: goal: type: string title: Goal description: User's marketing goal currency: type: string title: Currency description: Currency code (e.g., USD) locations: items: $ref: '#/components/schemas/LocationItem' type: array title: Locations description: List of target locations product_offering_id: anyOf: - type: string - type: 'null' title: Product Offering Id description: Optional product offering identifier start_date: anyOf: - type: string - type: 'null' title: Start Date description: Optional start date in ISO format (YYYY-MM-DD) end_date: anyOf: - type: string - type: 'null' title: End Date description: Optional end date in ISO format (YYYY-MM-DD) type: object required: - goal - currency title: BudgetEstimateRequest description: Input payload for budget estimation. schemas__campaigns__ads__google__GoogleDisplayAdRequest: properties: product_description: type: string title: Product Description description: Description of the product or service target_audience: type: string title: Target Audience description: Target audience description company_profile_id: type: string format: uuid title: Company Profile Id description: Company profile ID (required) campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals description: List of campaign goals key_selling_points: type: string title: Key Selling Points description: Key selling points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads description: Number of ad variations to generate default: 3 bid_strategy: type: string title: Bid Strategy description: Bidding strategy default: maximize_conversions budget_range: type: string title: Budget Range description: Budget range (low, medium, high, custom) default: medium country: anyOf: - type: string - type: 'null' title: Country description: Target country state_province: anyOf: - type: string - type: 'null' title: State Province description: Target state/province city: anyOf: - type: string - type: 'null' title: City description: Target city locations: anyOf: - items: $ref: '#/components/schemas/LocationItem' type: array - type: 'null' title: Locations description: List of locations to target (countries/regions/states/cities/postal codes/proximities). This does not split budget per location; all locations share the campaign budget. reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images description: List of reference image base64 data URLs (max 3) lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled description: Whether to use lead form extension where supported default: false max_cpc: anyOf: - type: number minimum: 0.01 - type: 'null' title: Max Cpc description: Maximum cost per click in dollars (e.g., 1.50 for $1.50). Required when bid_strategy is 'MANUAL_CPC' experiment_package_id: anyOf: - type: string maxLength: 64 - type: 'null' title: Experiment Package Id description: Test package id; created campaigns are stamped with this linkage launch_strategy_mode: anyOf: - type: string pattern: ^(test_learn_pilot|direct_campaign)$ - type: 'null' title: Launch Strategy Mode description: test_learn_pilot or direct_campaign dayparting_enabled: anyOf: - type: boolean - type: 'null' title: Dayparting Enabled description: Whether dayparting/ad scheduling is enabled for this campaign default: false dayparting_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Dayparting Config description: Dayparting configuration including schedule, timezone, and platform-specific settings num_images_per_ad: type: integer maximum: 5.0 minimum: 1.0 title: Num Images Per Ad description: Number of images per ad default: 2 type: object required: - product_description - target_audience - company_profile_id title: GoogleDisplayAdRequest description: Request model for Google Display ads EmailCampaignImageCreate: properties: image_type: type: string title: Image Type image_url: type: string title: Image Url original_prompt: anyOf: - type: string - type: 'null' title: Original Prompt enhanced_prompt: anyOf: - type: string - type: 'null' title: Enhanced Prompt width: anyOf: - type: integer - type: 'null' title: Width height: anyOf: - type: integer - type: 'null' title: Height type: object required: - image_type - image_url title: EmailCampaignImageCreate AmazonSponsoredBrandsAdRequest: properties: product_description: type: string title: Product Description description: Description of the product or service target_audience: type: string title: Target Audience description: Target audience description company_profile_id: type: string format: uuid title: Company Profile Id description: Company profile ID (required) campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals description: List of campaign goals key_selling_points: type: string title: Key Selling Points description: Key selling points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads description: Number of ad variations to generate default: 3 bid_strategy: type: string title: Bid Strategy description: Bidding strategy default: maximize_conversions budget_range: type: string title: Budget Range description: Budget range (low, medium, high, custom) default: medium country: anyOf: - type: string - type: 'null' title: Country description: Target country state_province: anyOf: - type: string - type: 'null' title: State Province description: Target state/province city: anyOf: - type: string - type: 'null' title: City description: Target city locations: anyOf: - items: $ref: '#/components/schemas/LocationItem' type: array - type: 'null' title: Locations description: List of locations to target (countries/regions/states/cities/postal codes/proximities). This does not split budget per location; all locations share the campaign budget. reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images description: List of reference image base64 data URLs (max 3) lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled description: Whether to use lead form extension where supported default: false max_cpc: anyOf: - type: number minimum: 0.01 - type: 'null' title: Max Cpc description: Maximum cost per click in dollars (e.g., 1.50 for $1.50). Required when bid_strategy is 'MANUAL_CPC' experiment_package_id: anyOf: - type: string maxLength: 64 - type: 'null' title: Experiment Package Id description: Test package id; created campaigns are stamped with this linkage launch_strategy_mode: anyOf: - type: string pattern: ^(test_learn_pilot|direct_campaign)$ - type: 'null' title: Launch Strategy Mode description: test_learn_pilot or direct_campaign dayparting_enabled: anyOf: - type: boolean - type: 'null' title: Dayparting Enabled description: Whether dayparting/ad scheduling is enabled for this campaign default: false dayparting_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Dayparting Config description: Dayparting configuration including schedule, timezone, and platform-specific settings brand_name: type: string title: Brand Name description: Brand name num_images_per_ad: type: integer maximum: 3.0 minimum: 1.0 title: Num Images Per Ad description: Number of images per ad default: 1 showcase_products: anyOf: - items: type: string type: array - type: 'null' title: Showcase Products description: Products to showcase ad_format: anyOf: - type: string - type: 'null' title: Ad Format description: Selected ad format (product_collection, store_spotlight, or video) video_length: anyOf: - type: integer - type: 'null' title: Video Length description: Video duration in seconds (for video format) type: object required: - product_description - target_audience - company_profile_id - brand_name title: AmazonSponsoredBrandsAdRequest description: Request model for Amazon Sponsored Brands ads HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError KeywordWithCpc: properties: keyword: type: string title: Keyword estimated_cpc: anyOf: - type: number - type: 'null' title: Estimated Cpc type: object required: - keyword title: KeywordWithCpc description: Model for keyword with CPC data PostModel: properties: id: type: string format: uuid title: Id campaign_id: type: string title: Campaign Id idea_number: type: integer title: Idea Number platform: type: string title: Platform variation: type: integer title: Variation default: 0 post_id: anyOf: - type: string - type: 'null' title: Post Id post_url: anyOf: - type: string - type: 'null' title: Post Url posted_at: type: string format: date-time title: Posted At status: type: string title: Status post_metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Post Metadata type: object required: - id - campaign_id - idea_number - platform - posted_at - status title: PostModel ExternalCampaignSyncResponse: properties: company_profile_id: type: string format: uuid title: Company Profile Id metrics_lookback_days: type: integer title: Metrics Lookback Days dry_run: type: boolean title: Dry Run exhaustive: type: boolean title: Exhaustive results: items: $ref: '#/components/schemas/ExternalCampaignSyncResult' type: array title: Results type: object required: - company_profile_id - metrics_lookback_days - dry_run - exhaustive - results title: ExternalCampaignSyncResponse VideoSelectionResponse: properties: success: type: boolean title: Success campaign_id: anyOf: - type: string format: uuid - type: string title: Campaign Id campaign_type: type: string title: Campaign Type selected_video_url: type: string title: Selected Video Url selected_thumbnail_url: type: string title: Selected Thumbnail Url selected_companion_image_url: anyOf: - type: string - type: 'null' title: Selected Companion Image Url message: type: string title: Message type: object required: - success - campaign_id - campaign_type - selected_video_url - selected_thumbnail_url - message title: VideoSelectionResponse description: Response schema for video selection. BudgetEstimateResponse: properties: currency: type: string title: Currency description: ISO currency code (e.g., TWD, USD) budget_recommendation: $ref: '#/components/schemas/BudgetRecommendationRange' description: Recommended budget range duration_days: type: integer title: Duration Days description: Recommended duration in days reasoning: type: string title: Reasoning description: Concise explanation for recommendation type: object required: - currency - budget_recommendation - duration_days - reasoning title: BudgetEstimateResponse description: Structured response for budget estimate. ExternalCampaignPatchRequest: properties: name: anyOf: - type: string maxLength: 128 minLength: 1 - type: 'null' title: Name status: anyOf: - type: string enum: - ACTIVE - PAUSED - type: 'null' title: Status daily_budget: anyOf: - type: number maximum: 1000000.0 exclusiveMinimum: 0.0 - type: string - type: 'null' title: Daily Budget start_date: anyOf: - type: string - type: 'null' title: Start Date end_date: anyOf: - type: string - type: 'null' title: End Date dayparting_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Dayparting Config headline: anyOf: - type: string - type: 'null' title: Headline long_headline: anyOf: - type: string - type: 'null' title: Long Headline long_headlines: anyOf: - items: type: string type: array - type: 'null' title: Long Headlines headlines: anyOf: - items: type: string type: array - type: 'null' title: Headlines description: anyOf: - type: string - type: 'null' title: Description descriptions: anyOf: - items: type: string type: array - type: 'null' title: Descriptions primary_text: anyOf: - type: string - type: 'null' title: Primary Text business_name: anyOf: - type: string - type: 'null' title: Business Name call_to_action: anyOf: - type: string - type: 'null' title: Call To Action final_url: anyOf: - type: string - type: 'null' title: Final Url destination_url: anyOf: - type: string - type: 'null' title: Destination Url ad_name: anyOf: - type: string - type: 'null' title: Ad Name ad_text: anyOf: - type: string - type: 'null' title: Ad Text display_name: anyOf: - type: string - type: 'null' title: Display Name landing_page_url: anyOf: - type: string - type: 'null' title: Landing Page Url keywords: anyOf: - items: {} type: array - type: 'null' title: Keywords negative_keywords: anyOf: - items: {} type: array - type: 'null' title: Negative Keywords max_cpc: anyOf: - type: number maximum: 1000000.0 exclusiveMinimum: 0.0 - type: string - type: 'null' title: Max Cpc media: anyOf: - items: additionalProperties: true type: object type: array - type: 'null' title: Media search_themes: anyOf: - items: type: string type: array - type: 'null' title: Search Themes targeting_optimization_mode: anyOf: - type: string enum: - AUTOMATIC - MANUAL - type: 'null' title: Targeting Optimization Mode suggestion_audience_enabled: anyOf: - type: boolean - type: 'null' title: Suggestion Audience Enabled targeting_spec: anyOf: - additionalProperties: true type: object - type: 'null' title: Targeting Spec advantage_audience_enabled: anyOf: - type: boolean - type: 'null' title: Advantage Audience Enabled advantage_creative_enabled: anyOf: - type: boolean - type: 'null' title: Advantage Creative Enabled meta_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Meta Lead Form Config resource_selection: anyOf: - $ref: '#/components/schemas/ExternalCampaignResourceSelection' - type: 'null' expected_observed_at: anyOf: - type: string format: date-time - type: 'null' title: Expected Observed At additionalProperties: false type: object title: ExternalCampaignPatchRequest description: Sparse portable fields; native provider payloads are never replayed. ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError CampaignPerfHistoryResponse: properties: campaign_id: type: string title: Campaign Id headline_metric: anyOf: - type: string - type: 'null' title: Headline Metric headline_label: anyOf: - type: string - type: 'null' title: Headline Label higher_is_better: type: boolean title: Higher Is Better default: true currency_code: anyOf: - type: string - type: 'null' title: Currency Code conversion_status: anyOf: - type: string - type: 'null' title: Conversion Status points: items: $ref: '#/components/schemas/CampaignPerfHistoryPoint' type: array title: Points default: [] optimizations: items: $ref: '#/components/schemas/CampaignPerfOptimizationMarker' type: array title: Optimizations default: [] revisions: items: $ref: '#/components/schemas/CampaignPerfRevision' type: array title: Revisions default: [] type: object required: - campaign_id title: CampaignPerfHistoryResponse CampaignOptimizationRollbackResponse: properties: mutation_id: type: string title: Mutation Id rollback_action_id: type: string title: Rollback Action Id applied_fields: items: type: string type: array title: Applied Fields excluded_fields: items: type: string type: array title: Excluded Fields campaign: additionalProperties: true type: object title: Campaign type: object required: - mutation_id - rollback_action_id - applied_fields - excluded_fields - campaign title: CampaignOptimizationRollbackResponse CampaignMediaOperation: properties: action: type: string enum: - replace - add - add_and_set_primary title: Action media_type: type: string enum: - image - video title: Media Type selected_url: type: string title: Selected Url previous_url: anyOf: - type: string - type: 'null' title: Previous Url source_index: anyOf: - type: integer - type: 'null' title: Source Index type: object required: - action - media_type - selected_url title: CampaignMediaOperation description: Campaign Edit Mode media change applied by the outer Save/Sync transaction. EditImageJobRequest: properties: image_url: type: string title: Image Url edit_prompt: type: string title: Edit Prompt num_variations: type: integer maximum: 3.0 minimum: 1.0 title: Num Variations default: 3 product_image_url: anyOf: - type: string - type: 'null' title: Product Image Url logo_image_url: anyOf: - type: string - type: 'null' title: Logo Image Url campaign_id: anyOf: - type: string - type: 'null' title: Campaign Id campaign_type: anyOf: - type: string - type: 'null' title: Campaign Type ad_id: anyOf: - type: string - type: 'null' title: Ad Id idea_number: anyOf: - type: integer - type: 'null' title: Idea Number use_company_style: type: boolean title: Use Company Style default: false type: object required: - image_url - edit_prompt title: EditImageJobRequest description: Request body for starting an async campaign image edit job MetaFeedCampaignUpdateRequest: properties: campaign_id: type: string title: Campaign Id ad_id: type: string title: Ad Id description: Normalized platform ad UUID name: anyOf: - type: string - type: 'null' title: Name headline: anyOf: - type: string - type: 'null' title: Headline long_headline: anyOf: - type: string - type: 'null' title: Long Headline description: anyOf: - type: string - type: 'null' title: Description ad_name: anyOf: - type: string - type: 'null' title: Ad Name call_to_action: anyOf: - type: string - type: 'null' title: Call To Action keywords: anyOf: - items: additionalProperties: true type: object type: array - items: $ref: '#/components/schemas/KeywordWithCpc' type: array - items: type: string type: array - type: 'null' title: Keywords negative_keywords: anyOf: - items: additionalProperties: true type: object type: array - items: $ref: '#/components/schemas/KeywordWithCpc' type: array - items: type: string type: array - type: 'null' title: Negative Keywords country: anyOf: - type: string - type: 'null' title: Country state_province: anyOf: - type: string - type: 'null' title: State Province city: anyOf: - type: string - type: 'null' title: City recommended_daily_budget: anyOf: - type: integer - type: 'null' title: Recommended Daily Budget total_budget: anyOf: - type: integer - type: 'null' title: Total Budget duration: anyOf: - type: integer - type: 'null' title: Duration target_platform: anyOf: - type: string - type: 'null' title: Target Platform start_date: anyOf: - type: string - type: 'null' title: Start Date end_date: anyOf: - type: string - type: 'null' title: End Date business_name: anyOf: - type: string - type: 'null' title: Business Name final_url: anyOf: - type: string - type: 'null' title: Final Url headlines: anyOf: - items: type: string type: array - type: 'null' title: Headlines descriptions: anyOf: - items: type: string type: array - type: 'null' title: Descriptions format_setting: anyOf: - type: string - type: 'null' title: Format Setting primary_text: anyOf: - type: string - type: 'null' title: Primary Text destination_url: anyOf: - type: string - type: 'null' title: Destination Url ad_format: anyOf: - type: string - type: 'null' title: Ad Format placements: anyOf: - items: type: string type: array - type: 'null' title: Placements introductory_text: anyOf: - type: string - type: 'null' title: Introductory Text alt_text: anyOf: - type: string - type: 'null' title: Alt Text aspect_ratio: anyOf: - type: string - type: 'null' title: Aspect Ratio thumbnail_url: anyOf: - type: string - type: 'null' title: Thumbnail Url linkedin_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Linkedin Lead Form Config google_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Google Lead Form Config meta_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Meta Lead Form Config asin: anyOf: - type: string - type: 'null' title: Asin sku: anyOf: - type: string - type: 'null' title: Sku targeting_type: anyOf: - type: string - type: 'null' title: Targeting Type bidding_strategy: anyOf: - type: string - type: 'null' title: Bidding Strategy default_bid: anyOf: - type: number - type: 'null' title: Default Bid brand_name: anyOf: - type: string - type: 'null' title: Brand Name landing_page_url: anyOf: - type: string - type: 'null' title: Landing Page Url showcase_products: anyOf: - items: type: string type: array - type: 'null' title: Showcase Products targeting_products: anyOf: - items: type: string type: array - type: 'null' title: Targeting Products audience_segments: anyOf: - items: type: string type: array - type: 'null' title: Audience Segments interests: anyOf: - items: type: string type: array - type: 'null' title: Interests lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled bid_strategy: anyOf: - type: string - type: 'null' title: Bid Strategy max_cpc: anyOf: - type: number - type: 'null' title: Max Cpc ad_text: anyOf: - type: string - type: 'null' title: Ad Text display_name: anyOf: - type: string - type: 'null' title: Display Name objective_type: anyOf: - type: string - type: 'null' title: Objective Type video_length: anyOf: - type: integer - type: 'null' title: Video Length dayparting_config: anyOf: - additionalProperties: true type: object - type: string - type: 'null' title: Dayparting Config media_operations: anyOf: - items: $ref: '#/components/schemas/CampaignMediaOperation' type: array - type: 'null' title: Media Operations type: object required: - campaign_id - ad_id title: MetaFeedCampaignUpdateRequest WorkflowStatus: type: string enum: - draft - review - approved - scheduled - sending - sent - failed title: WorkflowStatus description: Email campaign workflow status values. EmailCampaignImageResponse: properties: image_type: type: string title: Image Type image_url: type: string title: Image Url original_prompt: anyOf: - type: string - type: 'null' title: Original Prompt enhanced_prompt: anyOf: - type: string - type: 'null' title: Enhanced Prompt width: anyOf: - type: integer - type: 'null' title: Width height: anyOf: - type: integer - type: 'null' title: Height id: anyOf: - type: string - type: 'null' title: Id email_campaign_id: type: string format: uuid title: Email Campaign Id creation_date: anyOf: - type: string - type: 'null' title: Creation Date type: object required: - image_type - image_url - id - email_campaign_id - creation_date title: EmailCampaignImageResponse AiTeamActivityResponse: properties: items: items: $ref: '#/components/schemas/AiTeamActivityItem' type: array title: Items counts: $ref: '#/components/schemas/AiTeamActivityCounts' total: type: integer title: Total has_more: type: boolean title: Has More note: anyOf: - type: string - type: 'null' title: Note type: object required: - items - counts - total - has_more title: AiTeamActivityResponse BudgetRecommendationRange: properties: min_value: type: number title: Min Value description: Absolute minimum viable daily budget max_value: type: number title: Max Value description: Maximum efficient daily budget before diminishing returns suggested_value: type: number title: Suggested Value description: Recommended starting daily budget type: object required: - min_value - max_value - suggested_value title: BudgetRecommendationRange description: Recommended daily budget range. CampaignOptimizationRollbackRequest: properties: action_ids: items: type: string format: uuid type: array maxItems: 50 minItems: 1 title: Action Ids type: object required: - action_ids title: CampaignOptimizationRollbackRequest ExternalCampaignSyncResult: properties: platform: type: string title: Platform fetched: type: integer title: Fetched created: type: integer title: Created updated: type: integer title: Updated unchanged: type: integer title: Unchanged metric_facts: type: integer title: Metric Facts retired: type: integer title: Retired enumeration_complete: type: boolean title: Enumeration Complete enumeration_mode: type: string title: Enumeration Mode requested_limit: anyOf: - type: integer - type: 'null' title: Requested Limit type: object required: - platform - fetched - created - updated - unchanged - metric_facts - retired - enumeration_complete - enumeration_mode - requested_limit title: ExternalCampaignSyncResult CampaignDaypartingRequest: properties: campaign_id: type: string format: uuid title: Campaign Id platform_configs: additionalProperties: $ref: '#/components/schemas/PlatformDaypartingConfig' type: object title: Platform Configs type: object required: - campaign_id - platform_configs title: CampaignDaypartingRequest AmazonSponsoredDisplayAdRequest: properties: product_description: type: string title: Product Description description: Description of the product or service target_audience: type: string title: Target Audience description: Target audience description company_profile_id: type: string format: uuid title: Company Profile Id description: Company profile ID (required) campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals description: List of campaign goals key_selling_points: type: string title: Key Selling Points description: Key selling points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads description: Number of ad variations to generate default: 3 bid_strategy: type: string title: Bid Strategy description: Bidding strategy default: maximize_conversions budget_range: type: string title: Budget Range description: Budget range (low, medium, high, custom) default: medium country: anyOf: - type: string - type: 'null' title: Country description: Target country state_province: anyOf: - type: string - type: 'null' title: State Province description: Target state/province city: anyOf: - type: string - type: 'null' title: City description: Target city locations: anyOf: - items: $ref: '#/components/schemas/LocationItem' type: array - type: 'null' title: Locations description: List of locations to target (countries/regions/states/cities/postal codes/proximities). This does not split budget per location; all locations share the campaign budget. reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images description: List of reference image base64 data URLs (max 3) lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled description: Whether to use lead form extension where supported default: false max_cpc: anyOf: - type: number minimum: 0.01 - type: 'null' title: Max Cpc description: Maximum cost per click in dollars (e.g., 1.50 for $1.50). Required when bid_strategy is 'MANUAL_CPC' experiment_package_id: anyOf: - type: string maxLength: 64 - type: 'null' title: Experiment Package Id description: Test package id; created campaigns are stamped with this linkage launch_strategy_mode: anyOf: - type: string pattern: ^(test_learn_pilot|direct_campaign)$ - type: 'null' title: Launch Strategy Mode description: test_learn_pilot or direct_campaign dayparting_enabled: anyOf: - type: boolean - type: 'null' title: Dayparting Enabled description: Whether dayparting/ad scheduling is enabled for this campaign default: false dayparting_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Dayparting Config description: Dayparting configuration including schedule, timezone, and platform-specific settings ad_format: type: string title: Ad Format description: Ad format (image or video) default: image num_images_per_ad: type: integer maximum: 5.0 minimum: 1.0 title: Num Images Per Ad description: Number of images per ad (for image format) default: 2 video_length: anyOf: - type: integer - type: 'null' title: Video Length description: Video duration in seconds (for video format) type: object required: - product_description - target_audience - company_profile_id title: AmazonSponsoredDisplayAdRequest description: Request model for Amazon Sponsored Display ads GoogleSearchAdRequest: properties: product_description: type: string title: Product Description description: Description of the product or service target_audience: type: string title: Target Audience description: Target audience description company_profile_id: type: string format: uuid title: Company Profile Id description: Company profile ID (required) campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals description: List of campaign goals key_selling_points: type: string title: Key Selling Points description: Key selling points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads description: Number of ad variations to generate default: 3 bid_strategy: type: string title: Bid Strategy description: Bidding strategy default: maximize_conversions budget_range: type: string title: Budget Range description: Budget range (low, medium, high, custom) default: medium country: anyOf: - type: string - type: 'null' title: Country description: Target country state_province: anyOf: - type: string - type: 'null' title: State Province description: Target state/province city: anyOf: - type: string - type: 'null' title: City description: Target city locations: anyOf: - items: $ref: '#/components/schemas/LocationItem' type: array - type: 'null' title: Locations description: List of locations to target (countries/regions/states/cities/postal codes/proximities). This does not split budget per location; all locations share the campaign budget. reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images description: List of reference image base64 data URLs (max 3) lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled description: Whether to use lead form extension where supported default: false max_cpc: anyOf: - type: number minimum: 0.01 - type: 'null' title: Max Cpc description: Maximum cost per click in dollars (e.g., 1.50 for $1.50). Required when bid_strategy is 'MANUAL_CPC' experiment_package_id: anyOf: - type: string maxLength: 64 - type: 'null' title: Experiment Package Id description: Test package id; created campaigns are stamped with this linkage launch_strategy_mode: anyOf: - type: string pattern: ^(test_learn_pilot|direct_campaign)$ - type: 'null' title: Launch Strategy Mode description: test_learn_pilot or direct_campaign dayparting_enabled: anyOf: - type: boolean - type: 'null' title: Dayparting Enabled description: Whether dayparting/ad scheduling is enabled for this campaign default: false dayparting_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Dayparting Config description: Dayparting configuration including schedule, timezone, and platform-specific settings google_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Google Lead Form Config description: Google Search Lead Form configuration type: object required: - product_description - target_audience - company_profile_id title: GoogleSearchAdRequest description: Request model for Google Search ads CampaignPerfRevision: properties: executed_at: type: string title: Executed At change_summary: anyOf: - type: string - type: 'null' title: Change Summary change_from: anyOf: - type: string - type: 'null' title: Change From change_to: anyOf: - type: string - type: 'null' title: Change To change_scope: anyOf: - type: string - type: 'null' title: Change Scope metric_key: anyOf: - type: string - type: 'null' title: Metric Key pre_value: anyOf: - type: number - type: 'null' title: Pre Value post_value: anyOf: - type: number - type: 'null' title: Post Value post_days_observed: anyOf: - type: integer - type: 'null' title: Post Days Observed outcome_state: type: string title: Outcome State default: measuring type: object required: - executed_at title: CampaignPerfRevision description: 'One entry in the campaign''s optimization/revision history: what the AI changed, when, and the measured before/after result. Built entirely from data we already store (the action''s change_from/change_to + the per-optimization metric snapshots) -- a real "what was it, what did we change, did it work" trail without any new capture layer.' SocialSchedulePostingIdentity: properties: instagram_account_id: anyOf: - type: string - type: 'null' title: Instagram Account Id instagram_auth_method: anyOf: - type: string - type: 'null' title: Instagram Auth Method instagram_account_name: anyOf: - type: string - type: 'null' title: Instagram Account Name instagram_username: anyOf: - type: string - type: 'null' title: Instagram Username facebook_page_id: anyOf: - type: string - type: 'null' title: Facebook Page Id facebook_page_name: anyOf: - type: string - type: 'null' title: Facebook Page Name type: object title: SocialSchedulePostingIdentity CampaignPendingRecommendation: properties: approval_id: type: string title: Approval Id team_id: type: string title: Team Id title: type: string title: Title change_scope: anyOf: - type: string - type: 'null' title: Change Scope change_scope_label: anyOf: - type: string - type: 'null' title: Change Scope Label priority: anyOf: - type: string - type: 'null' title: Priority detail: anyOf: - type: string - type: 'null' title: Detail option_ids: items: type: string type: array title: Option Ids default: [] action_ids: items: type: string type: array title: Action Ids default: [] changes: items: $ref: '#/components/schemas/CampaignOptimizationChange' type: array title: Changes default: [] requested_at: anyOf: - type: string - type: 'null' title: Requested At updated_at: anyOf: - type: string - type: 'null' title: Updated At type: object required: - approval_id - team_id - title title: CampaignPendingRecommendation description: 'A still-open AI-team optimization the user can Accept/Decline from the card. Sourced from an ``AgentTeamApproval`` in an OPEN state (pending/deferred/ escalated) whose decision payload references this campaign. ``approval_id`` + ``team_id`` are what the frontend passes to the approvals decision endpoint, so the card never has to resolve the active team itself.' AdsCampaignUpdateRequest: properties: campaign_id: type: string title: Campaign Id ad_id: anyOf: - type: string - type: 'null' title: Ad Id name: anyOf: - type: string - type: 'null' title: Name headline: anyOf: - type: string - type: 'null' title: Headline long_headline: anyOf: - type: string - type: 'null' title: Long Headline description: anyOf: - type: string - type: 'null' title: Description ad_name: anyOf: - type: string - type: 'null' title: Ad Name call_to_action: anyOf: - type: string - type: 'null' title: Call To Action keywords: anyOf: - items: additionalProperties: true type: object type: array - items: $ref: '#/components/schemas/KeywordWithCpc' type: array - items: type: string type: array - type: 'null' title: Keywords negative_keywords: anyOf: - items: additionalProperties: true type: object type: array - items: $ref: '#/components/schemas/KeywordWithCpc' type: array - items: type: string type: array - type: 'null' title: Negative Keywords country: anyOf: - type: string - type: 'null' title: Country state_province: anyOf: - type: string - type: 'null' title: State Province city: anyOf: - type: string - type: 'null' title: City recommended_daily_budget: anyOf: - type: integer - type: 'null' title: Recommended Daily Budget total_budget: anyOf: - type: integer - type: 'null' title: Total Budget duration: anyOf: - type: integer - type: 'null' title: Duration target_platform: anyOf: - type: string - type: 'null' title: Target Platform start_date: anyOf: - type: string - type: 'null' title: Start Date end_date: anyOf: - type: string - type: 'null' title: End Date business_name: anyOf: - type: string - type: 'null' title: Business Name final_url: anyOf: - type: string - type: 'null' title: Final Url headlines: anyOf: - items: type: string type: array - type: 'null' title: Headlines descriptions: anyOf: - items: type: string type: array - type: 'null' title: Descriptions format_setting: anyOf: - type: string - type: 'null' title: Format Setting primary_text: anyOf: - type: string - type: 'null' title: Primary Text destination_url: anyOf: - type: string - type: 'null' title: Destination Url ad_format: anyOf: - type: string - type: 'null' title: Ad Format placements: anyOf: - items: type: string type: array - type: 'null' title: Placements introductory_text: anyOf: - type: string - type: 'null' title: Introductory Text alt_text: anyOf: - type: string - type: 'null' title: Alt Text aspect_ratio: anyOf: - type: string - type: 'null' title: Aspect Ratio thumbnail_url: anyOf: - type: string - type: 'null' title: Thumbnail Url linkedin_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Linkedin Lead Form Config google_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Google Lead Form Config meta_lead_form_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Meta Lead Form Config asin: anyOf: - type: string - type: 'null' title: Asin sku: anyOf: - type: string - type: 'null' title: Sku targeting_type: anyOf: - type: string - type: 'null' title: Targeting Type bidding_strategy: anyOf: - type: string - type: 'null' title: Bidding Strategy default_bid: anyOf: - type: number - type: 'null' title: Default Bid brand_name: anyOf: - type: string - type: 'null' title: Brand Name landing_page_url: anyOf: - type: string - type: 'null' title: Landing Page Url showcase_products: anyOf: - items: type: string type: array - type: 'null' title: Showcase Products targeting_products: anyOf: - items: type: string type: array - type: 'null' title: Targeting Products audience_segments: anyOf: - items: type: string type: array - type: 'null' title: Audience Segments interests: anyOf: - items: type: string type: array - type: 'null' title: Interests lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled bid_strategy: anyOf: - type: string - type: 'null' title: Bid Strategy max_cpc: anyOf: - type: number - type: 'null' title: Max Cpc ad_text: anyOf: - type: string - type: 'null' title: Ad Text display_name: anyOf: - type: string - type: 'null' title: Display Name objective_type: anyOf: - type: string - type: 'null' title: Objective Type video_length: anyOf: - type: integer - type: 'null' title: Video Length dayparting_config: anyOf: - additionalProperties: true type: object - type: string - type: 'null' title: Dayparting Config media_operations: anyOf: - items: $ref: '#/components/schemas/CampaignMediaOperation' type: array - type: 'null' title: Media Operations type: object required: - campaign_id title: AdsCampaignUpdateRequest description: Request model for updating ad campaign data CampaignAnalyticsStrip: properties: as_of_date: anyOf: - type: string - type: 'null' title: As Of Date currency_code: anyOf: - type: string - type: 'null' title: Currency Code spark: anyOf: - items: anyOf: - type: number - type: 'null' type: array - type: 'null' title: Spark general: items: $ref: '#/components/schemas/CampaignAnalyticsWindow' type: array title: General default: [] post_optimization: items: $ref: '#/components/schemas/CampaignAnalyticsImpact' type: array title: Post Optimization default: [] has_big_movement: type: boolean title: Has Big Movement default: false conversion_status: anyOf: - type: string - type: 'null' title: Conversion Status sample_size: anyOf: - type: integer - type: 'null' title: Sample Size sample_unit: anyOf: - type: string - type: 'null' title: Sample Unit type: object title: CampaignAnalyticsStrip description: 'The close-the-loop analytics shown under a campaign row: general DoD/WoW for the headline metric, plus one entry per optimization move''s after-effect.' CampaignOptimizationSummary: properties: campaign_id: type: string title: Campaign Id count: type: integer title: Count executed: type: integer title: Executed last_actioned_at: anyOf: - type: string - type: 'null' title: Last Actioned At last_activity_type: anyOf: - type: string - type: 'null' title: Last Activity Type last_activity_type_label: anyOf: - type: string - type: 'null' title: Last Activity Type Label outcome_state: type: string title: Outcome State default: measuring pending_recommendations: items: $ref: '#/components/schemas/CampaignPendingRecommendation' type: array title: Pending Recommendations default: [] pending_recommendation: anyOf: - $ref: '#/components/schemas/CampaignPendingRecommendation' - type: 'null' latest_applied_optimization: anyOf: - $ref: '#/components/schemas/CampaignAppliedOptimization' - type: 'null' analytics_strip: anyOf: - $ref: '#/components/schemas/CampaignAnalyticsStrip' - type: 'null' type: object required: - campaign_id - count - executed title: CampaignOptimizationSummary description: 'A per-campaign rollup of AI-team activity, keyed by the campaign''s public id. ``campaign_id`` is the same public id the dashboard exposes on each card (``ads_`` for paid, ``social_`` / ``batch__`` for social), so the frontend can merge this onto a card with a direct lookup.' ExternalCampaignResourceSelection: properties: ad_group_id: anyOf: - type: string - type: 'null' title: Ad Group Id ad_id: anyOf: - type: string - type: 'null' title: Ad Id ad_set_id: anyOf: - type: string - type: 'null' title: Ad Set Id asset_group_id: anyOf: - type: string - type: 'null' title: Asset Group Id creative_id: anyOf: - type: string - type: 'null' title: Creative Id additionalProperties: false type: object title: ExternalCampaignResourceSelection description: Explicit provider resource targets for multi-entity campaign edits. Body_edit_social_post_content_api_campaigns_social_post_edit_content_post: properties: campaign_id: type: string title: Campaign Id description: Campaign ID of the social post to edit idea_number: type: integer title: Idea Number description: Social post idea number content: type: string title: Content description: Existing content as JSON string (title, caption and hashtags) edit_prompt: type: string title: Edit Prompt description: Instructions for editing the social post content type: object required: - campaign_id - idea_number - content - edit_prompt title: Body_edit_social_post_content_api_campaigns_social_post_edit_content_post LocationItem: properties: level: type: string enum: - country - region - state - province - city - postal_code - proximity title: Level description: Granularity level name: type: string title: Name description: Display name of the location, such as California, San Francisco, or 10001 + 10 mi country_code: anyOf: - type: string - type: 'null' title: Country Code description: ISO 3166-1 alpha-2 country code, such as US country_name: anyOf: - type: string - type: 'null' title: Country Name description: Display country name from reverse geocoding, if available code: anyOf: - type: string - type: 'null' title: Code description: Platform or ISO subdivision code if known, such as US-CA city: anyOf: - type: string - type: 'null' title: City description: Nearest city/town from reverse geocoding, if available region: anyOf: - type: string - type: 'null' title: Region description: Nearest state/region/province from reverse geocoding, if available region_code: anyOf: - type: string - type: 'null' title: Region Code description: State/region code from reverse geocoding, if available postal_code: anyOf: - type: string - type: 'null' title: Postal Code description: Postal or ZIP code for exact postal-code targeting included_postal_codes: anyOf: - items: type: string type: array - type: 'null' title: Included Postal Codes description: Postal/PIN codes represented by a proximity pin when available expanded_postal_codes: anyOf: - items: type: string type: array - type: 'null' title: Expanded Postal Codes description: Expanded postal/PIN codes for a radius, if available latitude: anyOf: - type: number maximum: 90.0 minimum: -90.0 - type: 'null' title: Latitude description: Latitude for map-pin or radius targeting longitude: anyOf: - type: number maximum: 180.0 minimum: -180.0 - type: 'null' title: Longitude description: Longitude for map-pin or radius targeting radius_miles: anyOf: - type: number maximum: 250.0 minimum: 1.0 - type: 'null' title: Radius Miles description: Radius in miles for proximity targeting radius_km: anyOf: - type: number maximum: 400.0 minimum: 1.0 - type: 'null' title: Radius Km description: Radius in kilometers for proximity targeting source: anyOf: - type: string - type: 'null' title: Source description: How the location was selected, such as zip, address, map_pin, city, or state platform_ids: anyOf: - additionalProperties: true type: object - type: 'null' title: Platform Ids description: Resolved platform-specific geo identifiers resolution_status: anyOf: - additionalProperties: true type: object - type: 'null' title: Resolution Status description: Per-platform resolution or support status type: object required: - level - name title: LocationItem description: Canonical location input for multi-geo campaigns with one shared budget. Body_upload_campaign_image_api_campaigns_email_upload_campaign_image_post: properties: file: type: string format: binary title: File description: New image file to upload campaign_id: type: string title: Campaign Id description: Campaign ID idea_number: type: integer title: Idea Number description: Campaign idea number image_type: type: string title: Image Type description: Type of image (EMAIL_BANNER, EMAIL_IMAGE, etc.) default: EMAIL_IMAGE type: object required: - file - campaign_id - idea_number title: Body_upload_campaign_image_api_campaigns_email_upload_campaign_image_post Body_upload_campaign_images_api_campaigns_email_upload_campaign_images_post: properties: files: items: type: string format: binary type: array title: Files description: List of image files to upload (max 15) campaign_id: type: string title: Campaign Id description: Campaign ID idea_number: type: integer title: Idea Number description: Campaign idea number image_type: type: string title: Image Type description: Type of image (EMAIL_BANNER, EMAIL_IMAGE, etc.) default: EMAIL_IMAGE type: object required: - files - campaign_id - idea_number title: Body_upload_campaign_images_api_campaigns_email_upload_campaign_images_post SocialPostCampaignResponse: properties: name: anyOf: - type: string - type: 'null' title: Name caption: anyOf: - type: string - type: 'null' title: Caption hashtags: anyOf: - type: string - type: 'null' title: Hashtags target_platform: anyOf: - type: string - type: 'null' title: Target Platform post_type: anyOf: - type: string - type: 'null' title: Post Type media_type: anyOf: - type: string - type: 'null' title: Media Type platform_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Platform Config target_audience: anyOf: - additionalProperties: true type: object - type: 'null' title: Target Audience product_offering_id: anyOf: - type: string format: uuid - type: 'null' title: Product Offering Id platform: anyOf: - type: string - type: 'null' title: Platform post_id: anyOf: - type: string - type: 'null' title: Post Id post_url: anyOf: - type: string - type: 'null' title: Post Url posted_at: anyOf: - type: string - type: 'null' title: Posted At scheduled_for: anyOf: - type: string - type: 'null' title: Scheduled For status: anyOf: - type: string - type: 'null' title: Status post_metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Post Metadata auto_rating: anyOf: - additionalProperties: true type: object - type: 'null' title: Auto Rating id: anyOf: - type: string - type: 'null' title: Id company_profile_id: anyOf: - type: string - type: 'null' title: Company Profile Id campaign_id: type: string title: Campaign Id idea_number: type: integer title: Idea Number variation: type: integer title: Variation creation_date: anyOf: - type: string - type: 'null' title: Creation Date last_modified: anyOf: - type: string - type: 'null' title: Last Modified media: items: $ref: '#/components/schemas/SocialPostCampaignMediaResponse' type: array title: Media default: [] type: object required: - id - company_profile_id - campaign_id - idea_number - variation - creation_date - last_modified title: SocialPostCampaignResponse CampaignPerfOptimizationMarker: properties: date: type: string title: Date label: type: string title: Label type: object required: - date - label title: CampaignPerfOptimizationMarker description: An executed AI-team optimization, drawn on the chart so the before/after is visible. ImageSelectionRequest: properties: campaign_id: anyOf: - type: string format: uuid - type: string title: Campaign Id description: Campaign ID (can be UUID database ID or string campaign_id) campaign_type: type: string title: Campaign Type description: Type of campaign (e.g., google_display, meta_feed, social_post) selected_image_url: type: string title: Selected Image Url description: URL of the selected image variation selection_mode: type: string enum: - replace - add - add_and_set_primary title: Selection Mode description: 'How to apply the selected image: replace current, add to list, or add and set as primary' default: replace variation_index: anyOf: - type: integer - type: 'null' title: Variation Index description: Index of the selected variation (0-based) total_variations: anyOf: - type: integer - type: 'null' title: Total Variations description: Total number of variations that were presented selection_metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Selection Metadata description: Additional metadata about the selection ad_id: anyOf: - type: string - type: 'null' title: Ad Id description: Specific ad ID for ad campaigns (when updating a specific ad variation) type: object required: - campaign_id - campaign_type - selected_image_url title: ImageSelectionRequest description: Request schema for selecting an image variation for a campaign Body_edit_social_post_image_api_campaigns_social_post_edit_social_post_image_post: properties: campaign_id: type: string title: Campaign Id idea_number: type: integer title: Idea Number image_url: type: string title: Image Url edit_prompt: type: string title: Edit Prompt type: object required: - campaign_id - idea_number - image_url - edit_prompt title: Body_edit_social_post_image_api_campaigns_social_post_edit_social_post_image_post MetaStoriesReelsAdRequest: properties: product_description: type: string title: Product Description description: Description of the product or service target_audience: type: string title: Target Audience description: Target audience description company_profile_id: type: string format: uuid title: Company Profile Id description: Company profile ID (required) campaign_goals: anyOf: - items: type: string type: array - type: 'null' title: Campaign Goals description: List of campaign goals key_selling_points: type: string title: Key Selling Points description: Key selling points default: '' num_ads: type: integer maximum: 10.0 minimum: 1.0 title: Num Ads description: Number of ad variations to generate default: 3 bid_strategy: type: string title: Bid Strategy description: Bidding strategy default: maximize_conversions budget_range: type: string title: Budget Range description: Budget range (low, medium, high, custom) default: medium country: anyOf: - type: string - type: 'null' title: Country description: Target country state_province: anyOf: - type: string - type: 'null' title: State Province description: Target state/province city: anyOf: - type: string - type: 'null' title: City description: Target city locations: anyOf: - items: $ref: '#/components/schemas/LocationItem' type: array - type: 'null' title: Locations description: List of locations to target (countries/regions/states/cities/postal codes/proximities). This does not split budget per location; all locations share the campaign budget. reference_images: anyOf: - items: type: string type: array maxItems: 3 - type: 'null' title: Reference Images description: List of reference image base64 data URLs (max 3) lead_form_enabled: anyOf: - type: boolean - type: 'null' title: Lead Form Enabled description: Whether to use lead form extension where supported default: false max_cpc: anyOf: - type: number minimum: 0.01 - type: 'null' title: Max Cpc description: Maximum cost per click in dollars (e.g., 1.50 for $1.50). Required when bid_strategy is 'MANUAL_CPC' experiment_package_id: anyOf: - type: string maxLength: 64 - type: 'null' title: Experiment Package Id description: Test package id; created campaigns are stamped with this linkage launch_strategy_mode: anyOf: - type: string pattern: ^(test_learn_pilot|direct_campaign)$ - type: 'null' title: Launch Strategy Mode description: test_learn_pilot or direct_campaign dayparting_enabled: anyOf: - type: boolean - type: 'null' title: Dayparting Enabled description: Whether dayparting/ad scheduling is enabled for this campaign default: false dayparting_config: anyOf: - additionalProperties: true type: object - type: 'null' title: Dayparting Config description: Dayparting configuration including schedule, timezone, and platform-specific settings ad_format: type: string title: Ad Format description: 'Meta Stories & Reels creative format: ''Video'' or ''Single Image''' default: Video video_length: type: integer maximum: 10.0 minimum: 10.0 title: Video Length description: Video duration is fixed at 10 seconds default: 10 type: object required: - product_description - target_audience - company_profile_id title: MetaStoriesReelsAdRequest description: Request model for Meta Stories & Reels ads AiTeamActivityCounts: properties: executed: type: integer title: Executed default: 0 approved: type: integer title: Approved default: 0 declined: type: integer title: Declined default: 0 failed: type: integer title: Failed default: 0 total: type: integer title: Total default: 0 type: object title: AiTeamActivityCounts securitySchemes: HTTPBearer: type: http scheme: bearer