Pomo Platform API

The FastAPI backend behind the Pomo application, published as an OpenAPI 3.1.0 contract at https://api.usepomo.ai/openapi.json with interactive Swagger UI and ReDoc renderings. 924 paths / 994 operations across campaigns, online ad campaigns, agentic teams and tasks, brand workflow, competitor tracking, market intelligence, earned media, influencer discovery and campaigns, a unified data model (UDM), company profiles, organizations and members, credits and payments, and a large external-platform connector surface (Meta, Instagram, Google, Google Analytics, TikTok, LinkedIn, X, Shopify, Square, Stripe, QuickBooks, Klaviyo, HubSpot, Slack, Amazon). Authentication is HTTP bearer (Clerk issued session tokens); a separate programmatic tier under /api/programmatic/v1 authenticates with self-service API keys minted at /api/programmatic-keys. The contract is published without an access program, developer portal, or usage terms — it is the application's own backend, publicly readable rather than a documented developer product.

Documentation

Specifications

Other Resources

OpenAPI Specification

pomo-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: GPT Backend API
  version: 0.1.0
paths:
  /api/auth/status:
    get:
      tags:
      - auth
      summary: Check Registration Status
      description: 'Check user registration status.

        Returns whether user is authenticated and registered.'
      operationId: check_registration_status_api_auth_status_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/auth/registration/touch:
    post:
      tags:
      - auth
      summary: Touch Registration Lead
      description: 'Capture signed-in Clerk identities before ToS/account details are submitted.


        This does not create a product user record; `/register/init` remains the

        only self-serve path that creates `users`.'
      operationId: touch_registration_lead_api_auth_registration_touch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegistrationTouchRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistrationTouchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/auth/register/init:
    post:
      tags:
      - auth
      summary: Register Init
      description: 'Initialize registration by creating the user and organization after ToS acceptance.


        - Validates ToS and allowlist

        - If allowlisted: creates User + Organization + default CompanyProfile + credits

        - Sets registration_data.status = ''account_created''

        - Returns { user_id, organization_id, on_waitlist }


        Idempotent: if already created (phase account_created), returns existing IDs.

        If already complete, 409.'
      operationId: register_init_api_auth_register_init_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegistrationFormData'
        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/auth/register/finalize:
    post:
      tags:
      - auth
      summary: Register Finalize
      description: 'Finalize registration after plan selection/payment.


        Sets registration_data.status = ''complete'' and records selected_plan.

        Idempotent: if already complete, returns success.'
      operationId: register_finalize_api_auth_register_finalize_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FinalizeRegistrationRequest'
        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/auth/invitation:
    get:
      tags:
      - auth
      summary: Get Invitation Info From Query
      description: 'Query-parameter variant for invitation preview.

        Useful when clients/proxies alter path-style tokens.'
      operationId: get_invitation_info_from_query_api_auth_invitation_get
      parameters:
      - name: token
        in: query
        required: true
        schema:
          type: string
          minLength: 1
          title: Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvitationInfoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/invitation/{invite_token}:
    get:
      tags:
      - auth
      summary: Get Invitation Info
      description: 'Preview invitation details before accepting.

        Can be called by authenticated or unauthenticated users.'
      operationId: get_invitation_info_api_auth_invitation__invite_token__get
      parameters:
      - name: invite_token
        in: path
        required: true
        schema:
          type: string
          title: Invite Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvitationInfoResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/auth/accept-invitation:
    post:
      tags:
      - auth
      summary: Accept Invitation
      description: "Accept an organization invitation.\nHandles both new users and existing users joining additional organizations.\n\
        \nFlow:\n- Validates ToS acceptance\n- Validates invite token\n- If user exists:\n    - ACTIVE users: Join organization\
        \ as MEMBER (no credits)\n    - SUSPENDED/DELETED users: Error\n- If user doesn't exist:\n    - Check allowlist →\
        \ waitlist if not allowed\n    - Create user + join organization as MEMBER + allocate credits"
      operationId: accept_invitation_api_auth_accept_invitation_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcceptInvitationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptInvitationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/auth/register:
    post:
      tags:
      - auth
      summary: Register User
      description: 'Register NEW users creating their own organization.

        For accepting invitations, use /accept-invitation endpoint instead.


        Flow:

        - Validates ToS acceptance

        - Checks if user already exists → error if yes

        - Validates email allowlist → waitlist if not allowed

        - Creates user + new organization (as OWNER) + company profile

        - Allocates initial credits to organization'
      operationId: register_user_api_auth_register_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegistrationFormData'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistrationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/auth/me:
    get:
      tags:
      - auth
      summary: Get User Profile
      description: Get current user profile (requires registration and verification).
      operationId: get_user_profile_api_auth_me_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
      security:
      - HTTPBearer: []
  /api/auth/update-profile:
    post:
      tags:
      - auth
      summary: Update User Profile
      description: Update the current user's profile information.
      operationId: update_user_profile_api_auth_update_profile_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/auth/logout:
    post:
      tags:
      - auth
      summary: Logout
      description: 'Clear the user context.

        Note: Clerk handles token invalidation on the client side.'
      operationId: logout_api_auth_logout_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/auth/health:
    get:
      tags:
      - auth
      summary: Health Check
      description: Check if auth service is healthy.
      operationId: health_check_api_auth_health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/legal/tos/latest:
    get:
      tags:
      - legal
      summary: Get Latest Terms Of Service
      description: 'Return latest ToS content, version, and server-computed hash.


        The response includes an ETag header equal to the hash for caching/integrity.'
      operationId: get_latest_terms_of_service_api_legal_tos_latest_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/chat/agentic/with-files:
    post:
      tags:
      - chat
      summary: Agentic Chat With Files
      description: 'Agentic chat endpoint with file upload support and conversation persistence.


        Accepts files alongside the message. Files are processed, analyzed,

        and their content is used to enhance Claude''s response.


        - If files are uploaded: Content is extracted and included in context

        - If conversation_id provided: Continues existing conversation

        - Messages are persisted for multi-turn context'
      operationId: agentic_chat_with_files_api_chat_agentic_with_files_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_agentic_chat_with_files_api_chat_agentic_with_files_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgenticChatWithFilesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/chat/files/{file_id}/share:
    post:
      tags:
      - chat
      summary: Share Chat File
      description: 'Share a chat-uploaded file to the gallery/documents.


        When a file is shared, it becomes visible in the company''s document library

        and can be accessed by the get_company_documents MCP tool.'
      operationId: share_chat_file_api_chat_files__file_id__share_post
      security:
      - HTTPBearer: []
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: File Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareFileResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - chat
      summary: Unshare File
      description: 'Remove a file from the Knowledge Base (stop sharing).


        The file is kept but no longer visible in the shared document library.

        Only the owner can unshare their files.'
      operationId: unshare_file_api_chat_files__file_id__share_delete
      security:
      - HTTPBearer: []
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: File Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareFileResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/chat/files/{file_id}:
    delete:
      tags:
      - chat
      summary: Delete File
      description: 'Permanently delete a file.


        This removes the file from GCS storage and the database entirely.

        Only the file owner can delete the file.'
      operationId: delete_file_api_chat_files__file_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: File Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteFileResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/chat/shared-files:
    get:
      tags:
      - chat
      summary: Get Shared Files
      description: 'Get list of files for the current company profile (Knowledge Base).


        Returns:

        - All shared files (is_shared=True) - visible to everyone

        - Owner''s unshared files (is_shared=False, user_id=current_user) - only visible to owner


        This allows owners to see and re-share their unshared files.'
      operationId: get_shared_files_api_chat_shared_files_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: 20
          title: Limit
      - name: search
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Search
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharedFilesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/chat/knowledge-base/upload:
    post:
      tags:
      - chat
      summary: Upload To Knowledge Base
      description: 'Upload files directly to the Knowledge Base.


        Files are stored in company_analysis_files with is_shared=True,

        making them immediately available in the Knowledge Base tab.

        Summaries are extracted for discoverability.'
      operationId: upload_to_knowledge_base_api_chat_knowledge_base_upload_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_to_knowledge_base_api_chat_knowledge_base_upload_post'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeBaseUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /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_<hash>`` / ``social_<hash>`` / ``batch_<hash>_<platform>``). 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
          conten

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