Pomo External Platform API

The external-platform API from Pomo — 175 operation(s) for external-platform.

Business capability
Digital Marketing Management BC-400.60

Operations 175

GET /api/external-platform/instagram/auth Instagram Auth #
GET /api/external-platform/instagram/callback Instagram Callback #
POST /api/external-platform/instagram/disconnect Disconnect Instagram #
POST /api/external-platform/instagram/create-post Create Instagram Post #
POST /api/external-platform/instagram/delete-post Delete Instagram Post #
GET /api/external-platform/instagram/posts Get Instagram Posts #
POST /api/external-platform/instagram/post-metrics Get Post Metrics #
POST /api/external-platform/instagram/batch-post-metrics Get Batch Post Metrics #
GET /api/external-platform/instagram/accounts Get Instagram Accounts #
GET /api/external-platform/instagram/activation Get Instagram Activation #
POST /api/external-platform/instagram/activate Activate Instagram Identity #
POST /api/external-platform/instagram/post-campaign Post Campaign To Instagram #
GET /api/external-platform/meta/campaign/{campaign_id}/status Get Meta Campaign Status #
GET /api/external-platform/meta/auth Meta Auth #
GET /api/external-platform/meta/callback Meta Callback #
GET /api/external-platform/meta/accounts Get Meta Accounts #
GET /api/external-platform/meta/activation Get Meta Activation #
POST /api/external-platform/meta/disconnect Disconnect Meta Ads #
POST /api/external-platform/meta/accounts/select Select Meta Ad Account #
POST /api/external-platform/meta/activate Activate Meta Ad Account #
POST /api/external-platform/meta/launch-ad-campaign Launch Meta Ad Campaign #
POST /api/external-platform/meta/sync-ad-campaign/preview Preview Meta Sync #
POST /api/external-platform/meta/sync-ad-campaign Sync Meta Ad Campaign #
GET /api/external-platform/meta/sync-job/{job_id} Get Sync Job Status #
GET /api/external-platform/meta/launch-job/{job_id} Get Launch Job Status #
POST /api/external-platform/meta/campaigns/{campaign_id}/activate Activate Meta Campaign #
POST /api/external-platform/meta/adsets/{adset_id}/activate Activate Meta Adset #
POST /api/external-platform/meta/ads/{ad_id}/activate Activate Meta Ad #
POST /api/external-platform/meta/adsets/{adset_id}/pause Pause Meta Adset #
POST /api/external-platform/meta/ads/{ad_id}/pause Pause Meta Ad #
POST /api/external-platform/meta/campaigns/{campaign_id}/pause Pause Meta Campaign #
GET /api/external-platform/meta/campaigns/{campaign_id}/insights Get Meta Campaign Insights #
POST /api/external-platform/meta/campaign/action Meta Campaign Action #
POST /api/external-platform/meta/campaign/resume Meta Campaign Resume #
GET /api/external-platform/google/auth Google Auth #
GET /api/external-platform/google/callback Google Callback #
GET /api/external-platform/google/accounts Get Google Accounts #
GET /api/external-platform/google/activation Get Google Activation #
POST /api/external-platform/google/activate Activate Google Ads Account #
POST /api/external-platform/google/disconnect Disconnect Google Ads #
POST /api/external-platform/google/campaigns Create Google Ad Campaign #
POST /api/external-platform/google/ad-groups Create Google Ad Group #
POST /api/external-platform/google/display-ads Create Google Display Ad #
POST /api/external-platform/google/create-ad Create Ad From Campaign #
POST /api/external-platform/google/sync-ad-campaign/preview Preview Google Sync #
POST /api/external-platform/google/sync-ad-campaign Sync Ad Campaign #
POST /api/external-platform/google/launch-ad-campaign Launch Ad Campaign #
POST /api/external-platform/google/campaign/action Google Campaign Action #
POST /api/external-platform/google/campaign/resume Google Campaign Resume #
GET /api/external-platform/google/campaign/{campaign_id}/status Get Google Campaign Status #
GET /api/external-platform/amazon/auth Amazon Auth #
GET /api/external-platform/amazon/callback Amazon Callback #
GET /api/external-platform/amazon/accounts Get Amazon Accounts #
POST /api/external-platform/amazon/campaigns Create Amazon Campaign #
POST /api/external-platform/amazon/ad-groups Create Amazon Ad Group #
POST /api/external-platform/amazon/product-ads Create Amazon Product Ad #
POST /api/external-platform/amazon/keywords Add Amazon Keywords #
GET /api/external-platform/amazon/campaigns/{profile_id} Get Amazon Campaigns #
POST /api/external-platform/amazon/metrics Get Amazon Campaign Metrics #
POST /api/external-platform/amazon/campaign/action Amazon Campaign Action #
POST /api/external-platform/amazon/campaign/resume Amazon Campaign Resume #
GET /api/external-platform/tiktok/auth Tiktok Auth #
GET /api/external-platform/tiktok/callback Tiktok Callback #
GET /api/external-platform/tiktok/accounts Get Tiktok Accounts #
GET /api/external-platform/tiktok/activation Get Tiktok Activation #
POST /api/external-platform/tiktok/activate Activate Tiktok Ads Account #
POST /api/external-platform/tiktok/disconnect Disconnect Tiktok Ads #
POST /api/external-platform/tiktok/launch-video-ad Launch Tiktok Video Ad #
POST /api/external-platform/tiktok/sync-ad-campaign/preview Preview Tiktok Sync #
POST /api/external-platform/tiktok/sync-ad-campaign Sync Tiktok Ad Campaign #
POST /api/external-platform/tiktok/ad/pause Pause Tiktok Ad #
POST /api/external-platform/tiktok/ad/resume Resume Tiktok Ad #
GET /api/external-platform/tiktok-social/auth Tiktok Social Auth #
GET /api/external-platform/tiktok-social/callback Tiktok Social Callback #
GET /api/external-platform/tiktok-social/status Tiktok Social Status #
GET /api/external-platform/tiktok-social/accounts Tiktok Social Accounts #
POST /api/external-platform/tiktok-social/creator-info Tiktok Social Creator Info #
POST /api/external-platform/tiktok-social/publish-settings Save Tiktok Social Publish Settings #
POST /api/external-platform/tiktok-social/post-campaign Post Campaign To Tiktok Social #
GET /api/external-platform/tiktok-social/publish-status/{publish_id} Tiktok Social Publish Status #
POST /api/external-platform/tiktok-social/disconnect Disconnect Tiktok Social #
GET /api/external-platform/linkedin/auth Linkedin Auth #
GET /api/external-platform/linkedin/callback Linkedin Callback #
GET /api/external-platform/linkedin/accounts Get Linkedin Ad Accounts #
GET /api/external-platform/linkedin/activation Get Linkedin Ads Activation #
POST /api/external-platform/linkedin/activate Activate Linkedin Ads Account #
POST /api/external-platform/linkedin/campaign/action Linkedin Campaign Action #
POST /api/external-platform/linkedin/campaign/resume Linkedin Campaign Resume #
POST /api/external-platform/linkedin/sync-ad-campaign/preview Preview Linkedin Sync #
POST /api/external-platform/linkedin/sync-ad-campaign Sync Linkedin Ad Campaign #
POST /api/external-platform/linkedin/launch-image-ad Launch Linkedin Image Ad #
POST /api/external-platform/linkedin/launch-video-ad Launch Linkedin Video Ad #
GET /api/external-platform/linkedin/status Linkedin Ads Status #
POST /api/external-platform/linkedin/disconnect Disconnect Linkedin Ads #
GET /api/external-platform/linkedin-social/auth Linkedin Social Auth #
GET /api/external-platform/linkedin-social/status Linkedin Social Status #
GET /api/external-platform/linkedin-social/accounts Linkedin Social Accounts #
POST /api/external-platform/linkedin/post-campaign Post Campaign To Linkedin #
POST /api/external-platform/linkedin/delete-campaign-post Delete Campaign Post From Linkedin #
POST /api/external-platform/linkedin/sync-post-status Sync Linkedin Campaign Post Status #
POST /api/external-platform/linkedin-social/disconnect Disconnect Linkedin Social #
GET /api/external-platform/shopify/callback Shopify Callback #
GET /api/external-platform/shopify/install Shopify Install #
GET /api/external-platform/shopify/install/launch Shopify Install Launch #
POST /api/external-platform/shopify/connect/start Shopify Connect Start #
POST /api/external-platform/shopify/install/resolve Shopify Install Resolve #
POST /api/external-platform/shopify/privacy/webhooks Shopify Privacy Webhook #
POST /api/external-platform/shopify/webhooks/app-uninstalled Shopify App Uninstalled Webhook #
GET /api/external-platform/shopify/shop Get Shopify Shop #
GET /api/external-platform/shopify/status Get Shopify Status #
GET /api/external-platform/shopify/orders Get Shopify Orders #
DELETE /api/external-platform/shopify/disconnect Disconnect Shopify #
GET /api/external-platform/shopify/app-home Shopify App Home #
GET /api/external-platform/shopify/app/status Shopify App Status #
POST /api/external-platform/shopify/app/sync Shopify App Sync #
POST /api/external-platform/shopify/app/begin-install Shopify App Begin Install #
GET /api/external-platform/stripe/auth Stripe Auth #
GET /api/external-platform/stripe/callback Stripe Callback #
GET /api/external-platform/stripe/account Get Stripe Account #
GET /api/external-platform/stripe/status Get Stripe Status #
GET /api/external-platform/stripe/transactions Get Stripe Transactions #
DELETE /api/external-platform/stripe/disconnect Disconnect Stripe #
GET /api/external-platform/quickbooks/auth Quickbooks Auth #
GET /api/external-platform/quickbooks/callback Quickbooks Callback #
GET /api/external-platform/quickbooks/account Get Quickbooks Account #
GET /api/external-platform/quickbooks/status Get Quickbooks Status #
DELETE /api/external-platform/quickbooks/disconnect Disconnect Quickbooks #
GET /api/external-platform/quickbooks/initial-sync-status Get Initial Sync Status #
GET /api/external-platform/google-analytics/auth Google Analytics Auth #
GET /api/external-platform/google-analytics/callback Google Analytics Callback #
GET /api/external-platform/google-analytics/status Get Google Analytics Status #
GET /api/external-platform/google-analytics/properties Get Google Analytics Properties #
POST /api/external-platform/google-analytics/properties/select Select Google Analytics Property #
DELETE /api/external-platform/google-analytics/disconnect Disconnect Google Analytics #
GET /api/external-platform/google-analytics/initial-sync-status Get Google Analytics Initial Sync Status #
GET /api/external-platform/square/auth Square Auth #
GET /api/external-platform/square/callback Square Callback #
POST /api/external-platform/square/webhooks Square Webhook #
GET /api/external-platform/square/status Get Square Status #
GET /api/external-platform/square/accounts Get Square Accounts #
DELETE /api/external-platform/square/disconnect Disconnect Square #
GET /api/external-platform/klaviyo/auth Klaviyo Auth #
GET /api/external-platform/klaviyo/callback Klaviyo Callback #
GET /api/external-platform/klaviyo/accounts Get Klaviyo Accounts #
GET /api/external-platform/klaviyo/status Get Klaviyo Status #
GET /api/external-platform/klaviyo/health Get Klaviyo Health #
POST /api/external-platform/klaviyo/disconnect Disconnect Klaviyo #
GET /api/external-platform/{platform}/initial-sync-status Get Provider Initial Sync Status #
GET /api/external-platform/slack/auth Slack Auth #
GET /api/external-platform/slack/callback Slack Callback #
GET /api/external-platform/slack/status Slack Status #
GET /api/external-platform/slack/channels List Slack Channels #
PATCH /api/external-platform/slack/settings Update Slack Settings #
POST /api/external-platform/slack/link Link Slack Identity #
POST /api/external-platform/slack/test-message Slack Test Message #
POST /api/external-platform/slack/campaign-card Slack Campaign Card #
POST /api/external-platform/slack/disconnect Slack Disconnect #
POST /api/external-platform/slack/events Slack Events #
POST /api/external-platform/slack/interactions Slack Interactions #
POST /api/external-platform/slack/commands Slack Commands #
GET /api/external-platform/facebook-social/auth Facebook Social Auth #
GET /api/external-platform/facebook-social/callback Facebook Social Callback #
GET /api/external-platform/facebook-social/status Facebook Social Status #
GET /api/external-platform/facebook-social/pages Get Facebook Pages #
GET /api/external-platform/facebook-social/activation Get Facebook Social Activation #
POST /api/external-platform/facebook-social/activate Activate Facebook Social Page #
POST /api/external-platform/facebook-social/disconnect Disconnect Facebook Social #
POST /api/external-platform/facebook-social/post-campaign Post Campaign To Facebook #
POST /api/external-platform/facebook-social/delete-post Delete Facebook Story Post #
GET /api/external-platform/hubspot/auth Hubspot Auth #
GET /api/external-platform/hubspot/callback Hubspot Callback #
GET /api/external-platform/hubspot/status Get Hubspot Status #
GET /api/external-platform/hubspot/health Get Hubspot Health #
POST /api/external-platform/hubspot/disconnect Disconnect Hubspot #
GET /api/external-platform/hubspot/initial-sync-status Hubspot Initial Sync Status #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pomo-external-platform-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pomo-external-platform-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GPT Backend External Platform 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: external-platform
paths:
  /api/external-platform/instagram/auth:
    get:
      tags:
      - external-platform
      summary: Instagram Auth
      description: "Generate an OAuth URL for user authentication.\n\nArgs:\n    login_type: The type of login flow to use. Defaults to \"instagram\".\n               Set to \"facebook\" to use Facebook login instead.\n    db: Database session\n    company_profile: Current company profile (injected via dependency)\n\nReturns:\n    InstagramAuthResponseModel: Response with authentication URL"
      operationId: instagram_auth_api_external_platform_instagram_auth_get
      security:
      - HTTPBearer: []
      parameters:
      - name: login_type
        in: query
        required: false
        schema:
          type: string
          default: instagram
          title: Login Type
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstagramAuthResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/external-platform/instagram/callback:
    get:
      tags:
      - external-platform
      summary: Instagram Callback
      description: "Handle Instagram OAuth callback.\n\nArgs:\n    code: Authorization code from OAuth provider\n    state: State parameter containing user ID and login type\n    error: Error code if authorization failed\n    error_reason: Reason for error if authorization failed\n    error_description: Detailed error description if authorization failed\n    db: Database session\n    \nReturns:\n    RedirectResponse: Redirect to frontend with success or error"
      operationId: instagram_callback_api_external_platform_instagram_callback_get
      parameters:
      - name: code
        in: query
        required: false
        schema:
          type: string
          title: Code
      - name: state
        in: query
        required: false
        schema:
          type: string
          title: State
      - name: error
        in: query
        required: false
        schema:
          type: string
          title: Error
      - name: error_reason
        in: query
        required: false
        schema:
          type: string
          title: Error Reason
      - name: error_description
        in: query
        required: false
        schema:
          type: string
          title: Error Description
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/external-platform/instagram/disconnect:
    post:
      tags:
      - external-platform
      summary: Disconnect Instagram
      operationId: disconnect_instagram_api_external_platform_instagram_disconnect_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/external-platform/instagram/create-post:
    post:
      tags:
      - external-platform
      summary: Create Instagram Post
      description: "Create an Instagram post with an image.\n\nThis endpoint creates a standalone Instagram post not associated with a campaign.\nIt handles authentication, validates the token, and posts content to Instagram.\n\nArgs:\n    post_data: Post content and account details\n    db: Database session\n    company_profile: Current company profile (injected via dependency)\n\nReturns:\n    PostResponseModel: Response with post ID"
      operationId: create_instagram_post_api_external_platform_instagram_create_post_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePostRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/external-platform/instagram/delete-post:
    post:
      tags:
      - external-platform
      summary: Delete Instagram Post
      description: "Delete an Instagram post by ID.\n\nThis endpoint deletes a post from Instagram and updates the corresponding\ndatabase records in the SocialPostCampaign table.\n\nArgs:\n    delete_data: Post ID to delete\n    db: Database session\n    company_profile: Current company profile (injected via dependency)\n\nReturns:\n    DeletePostResponseModel: Response with success status"
      operationId: delete_instagram_post_api_external_platform_instagram_delete_post_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletePostRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletePostResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/external-platform/instagram/posts:
    get:
      tags:
      - external-platform
      summary: Get Instagram Posts
      description: "Get recent Instagram posts for a specific account.\n\nArgs:\n    instagram_account_id: Instagram business account ID\n    limit: Maximum number of posts to return\n    db: Database session\n    company_profile: Current company profile (injected via dependency)\n\nReturns:\n    dict: Response with list of posts"
      operationId: get_instagram_posts_api_external_platform_instagram_posts_get
      security:
      - HTTPBearer: []
      parameters:
      - name: instagram_account_id
        in: query
        required: true
        schema:
          type: string
          title: Instagram Account Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          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/external-platform/instagram/post-metrics:
    post:
      tags:
      - external-platform
      summary: Get Post Metrics
      description: "Get metrics for a specific Instagram post.\n\nArgs:\n    metrics_data: Post ID and metrics to retrieve\n    db: Database session\n    company_profile: Current company profile (injected via dependency)\n\nReturns:\n    dict: Response with metrics data"
      operationId: get_post_metrics_api_external_platform_instagram_post_metrics_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostMetricsRequest'
        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/external-platform/instagram/batch-post-metrics:
    post:
      tags:
      - external-platform
      summary: Get Batch Post Metrics
      description: "Get metrics for multiple Instagram posts in a single request.\n\nArgs:\n    batch_data: Instagram account ID and list of post IDs\n    db: Database session\n    company_profile: Current company profile (injected via dependency)\n\nReturns:\n    dict: Response with metrics for all posts"
      operationId: get_batch_post_metrics_api_external_platform_instagram_batch_post_metrics_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchPostMetricsRequest'
        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/external-platform/instagram/accounts:
    get:
      tags:
      - external-platform
      summary: Get Instagram Accounts
      description: "Get a list of Instagram business accounts that the user has access to.\nThis endpoint handles both Instagram direct authentication and Facebook authentication.\n\nArgs:\n    db: Database session\n    company_profile: Current company profile (injected via dependency)\n\nReturns:\n    dict: Response with list of Instagram accounts and authentication method"
      operationId: get_instagram_accounts_api_external_platform_instagram_accounts_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/external-platform/instagram/activation:
    get:
      tags:
      - external-platform
      summary: Get Instagram Activation
      operationId: get_instagram_activation_api_external_platform_instagram_activation_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/external-platform/instagram/activate:
    post:
      tags:
      - external-platform
      summary: Activate Instagram Identity
      operationId: activate_instagram_identity_api_external_platform_instagram_activate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstagramActivateIdentityRequest'
        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/external-platform/instagram/post-campaign:
    post:
      tags:
      - external-platform
      summary: Post Campaign To Instagram
      description: "Post a campaign's content to Instagram.\n\nThis endpoint creates a post on Instagram using content from a SocialPostCampaign.\nIt supports both single image posts and carousel posts (multiple images).\n\nArgs:\n    post_data: Campaign and Instagram account info\n    db: Database session\n    company_profile: Current company profile (injected via dependency)\n\nReturns:\n    PostResponseModel: Response with post ID and status\n\nNotes:\n    - For carousel posts, multiple images must be provided in the campaign\n    - If posting a carousel, all images should have the same aspect ratio\n    - Carousel posts are limited to 10 images"
      operationId: post_campaign_to_instagram_api_external_platform_instagram_post_campaign_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstagramPostCampaignRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/external-platform/meta/campaign/{campaign_id}/status:
    get:
      tags:
      - external-platform
      summary: Get Meta Campaign Status
      description: Fetch real-time Meta campaign status (with optional adset/ad) and map to canonical states.
      operationId: get_meta_campaign_status_api_external_platform_meta_campaign__campaign_id__status_get
      security:
      - HTTPBearer: []
      parameters:
      - name: campaign_id
        in: path
        required: true
        schema:
          type: string
          title: Campaign Id
      - name: adset_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Adset Id
      - name: ad_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          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/external-platform/meta/auth:
    get:
      tags:
      - external-platform
      summary: Meta Auth
      description: 'Get OAuth authorization URL.


        - auth_type = ''facebook'' returns Meta (Facebook) Ads auth URL and redirects to /meta/callback

        - auth_type = ''instagram'' returns Instagram auth URL and redirects to /instagram/callback (for social posting)'
      operationId: meta_auth_api_external_platform_meta_auth_get
      security:
      - HTTPBearer: []
      parameters:
      - name: auth_type
        in: query
        required: false
        schema:
          type: string
          description: '''facebook'' for Meta Ads; ''instagram'' for Instagram social'
          default: facebook
          title: Auth Type
        description: '''facebook'' for Meta Ads; ''instagram'' for Instagram social'
      - name: capability
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Optional incremental capability upgrade on the same Meta connection.
          title: Capability
        description: Optional incremental capability upgrade on the same Meta connection.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaAuthResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/external-platform/meta/callback:
    get:
      tags:
      - external-platform
      summary: Meta Callback
      description: 'Handle Meta (Facebook) OAuth callback for Ads connection and store tokens.


        Redirects to the frontend PlatformConnectSuccessPage with platform=meta.'
      operationId: meta_callback_api_external_platform_meta_callback_get
      parameters:
      - name: code
        in: query
        required: false
        schema:
          type: string
          title: Code
      - name: state
        in: query
        required: false
        schema:
          type: string
          title: State
      - name: error
        in: query
        required: false
        schema:
          type: string
          title: Error
      - name: error_description
        in: query
        required: false
        schema:
          type: string
          title: Error Description
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/external-platform/meta/accounts:
    get:
      tags:
      - external-platform
      summary: Get Meta Accounts
      description: Get Meta Ad accounts and Facebook Pages for the authenticated user.
      operationId: get_meta_accounts_api_external_platform_meta_accounts_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetaAccountsResponseModel'
      security:
      - HTTPBearer: []
  /api/external-platform/meta/activation:
    get:
      tags:
      - external-platform
      summary: Get Meta Activation
      operationId: get_meta_activation_api_external_platform_meta_activation_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/external-platform/meta/disconnect:
    post:
      tags:
      - external-platform
      summary: Disconnect Meta Ads
      operationId: disconnect_meta_ads_api_external_platform_meta_disconnect_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/external-platform/meta/accounts/select:
    post:
      tags:
      - external-platform
      summary: Select Meta Ad Account
      description: Activate one Meta ad account for future launches.
      operationId: select_meta_ad_account_api_external_platform_meta_accounts_select_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaSelectAdAccountRequest'
        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/external-platform/meta/activate:
    post:
      tags:
      - external-platform
      summary: Activate Meta Ad Account
      operationId: activate_meta_ad_account_api_external_platform_meta_activate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaSelectAdAccountRequest'
        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/external-platform/meta/launch-ad-campaign:
    post:
      tags:
      - external-platform
      summary: Launch Meta Ad Campaign
      description: Queue a Meta ad campaign launch and return a job id for status polling.
      operationId: launch_meta_ad_campaign_api_external_platform_meta_launch_ad_campaign_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaLaunchAdCampaignRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/external-platform/meta/sync-ad-campaign/preview:
    post:
      tags:
      - external-platform
      summary: Preview Meta Sync
      description: Preview sync changes and billing impact for a Meta ad campaign.
      operationId: preview_meta_sync_api_external_platform_meta_sync_ad_campaign_preview_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaSyncPreviewRequest'
        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/external-platform/meta/sync-ad-campaign:
    post:
      tags:
      - external-platform
      summary: Sync Meta Ad Campaign
      description: Queue a Meta ad sync and return a job id for status polling.
      operationId: sync_meta_ad_campaign_api_external_platform_meta_sync_ad_campaign_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaSyncAdCampaignRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/external-platform/meta/sync-job/{job_id}:
    get:
      tags:
      - external-platform
      summary: Get Sync Job Status
      operationId: get_sync_job_status_api_external_platform_meta_sync_job__job_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
          title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/external-platform/meta/launch-job/{job_id}:
    get:
      tags:
      - external-platform
      summary: Get Launch Job Status
      operationId: get_launch_job_status_api_external_platform_meta_launch_job__job_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
          title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/external-platform/meta/campaigns/{campaign_id}/activate:
    post:
      tags:
      - external-platform
      summary: Activate Meta Campaign
      description: Activate a paused Meta campaign
      operationId: activate_meta_campaign_api_external_platform_meta_campaigns__campaign_id__activate_post
      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/external-platform/meta/adsets/{adset_id}/activate:
    post:
      tags:
      - external-platform
      summary: Activate Meta Adset
      description: Activate a paused Meta ad set
      operationId: activate_meta_adset_api_external_platform_meta_adsets__adset_id__activate_post
      security:
      - HTTPBearer: []
      parameters:
      - name: adset_id
        in: path
        required: true
        schema:
          type: string
          title: Adset Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/external-platform/meta/ads/{ad_id}/activate:
    post:
      tags:
      - external-platform
      summary: Activate Meta Ad
      description: Activate a paused Meta ad
      operationId: activate_meta_ad_api_external_platform_meta_ads__ad_id__activate_post
      security:
      - HTTPBearer: []
      parameters:
      - name: ad_id
        in: path
        required: true
        schema:
          type: string
          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/external-platform/meta/adsets/{adset_id}/pause:
    post:
      tags:
      - external-platform
      summary: Pause Meta Adset
      description: Pause an active Meta ad set
      operationId: pause_meta_adset_api_external_platform_meta_adsets__adset_id__pause_post
      security:
      - HTTPBearer: []
      parameters:
      - name: adset_id
        in: path
        required: true
        schema:
          type: string
          title: Adset Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/external-platform/meta/ads/{ad_id}/pause:
    post:
      tags:
      - external-platform
      summary: Pause Meta Ad
      description: Pause an active Meta ad
      operationId: pause_meta_ad_api_external_platform_meta_ads__ad_id__pause_post
      security:
      - HTTPBearer: []
      parameters:
      - name: ad_id
        in: path
        required: true
        schema:
          type: string
          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/external-platform/meta/campaigns/{campaign_id}/pause:
    post:
      tags:
      - external-platform
      summary: Pause Meta Campaign
      description: Pause an active Meta campaign
      operationId: pause_meta_campaign_api_external_platform_meta_campaigns__campaign_id__pause_post
      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/external-platform/meta/campaigns/{campaign_id}/insights:
    get:
      tags:
      - external-platform
      summary: Get Meta Campaign Insights
      description: Get performance insights for a Meta campaign
      operationId: get_meta_campaign_insights_api_external_platform_meta_campaigns__campaign_id__insights_get
      security:
      - HTTPBearer: []
      parameters:
      - name: campaign_id
        in: path
        required: true
        schema:
          type: string
          title: Campaign Id
      - name: date_preset
        in: query
        required: false
        schema:
          type: string
          default: last_7d
          title: Date Preset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/external-platform/meta/campaign/action:
    post:
      tags:
      - external-platform
      summary: Meta Campaign Action
      operationId: meta_campaign_action_api_external_platform_meta_campaign_action_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaCampaignActionRequest'
        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/external-platform/meta/campaign/resume:
    post:
      tags:
      - external-platform
      summary: Meta Campaign Resume
      operationId: meta_campaign_resume_api_external_platform_meta_campaign_resume_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetaCampaignResumeRequest'
        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/external-platform/google/auth:
    get:
      tags:
      - external-platform
      summary: Google Auth
      description: Get Google OAuth authorization URL for the current company profile.
      operationId: google_auth_api_external_platform_google_auth_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAuthResponseModel'
      security:
      - HTTPBearer: []
  /api/external-platform/google/callback:
    get:
      tags:
      - external-platform
      summary: Google Callback
      description: 'Handle Google OAuth callback and store tokens.

        Then redirect to the frontend application.'
      operationId: google_callback_api_external_platform_google_callback_get
      parameters:
      - name: code
        in: query
        required: true
        schema:
          type: string
          title: Code
      - name: state
        in: query
        required: true
        schema:
          type: string
          title: State
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
    

# --- truncated at 32 KB (213 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/pomo/refs/heads/main/openapi/pomo-external-platform-api-openapi.yml