openapi: 3.1.0
info:
  title: ArtFlowPro API
  version: 1.0.0
  description: |
    Agent-native marketing infrastructure API. Programmatic access to social media,
    email campaigns, chat automation, landing pages, and ad management.

    ArtFlowPro is an all-in-one AI marketing platform that replaces Buffer, Mailchimp,
    Leadpages, and ManyChat with a single integrated system.

    Designed for both human users and AI agent workflows. Supports USDC billing
    for automated agent-native commerce.
  contact:
    name: ArtFlowPro Support
    url: https://artflowpro.io
    email: support@artflowpro.io
  license:
    name: Proprietary
  termsOfService: https://artflowpro.io/terms
servers:
  - url: https://artflowpro.io/api/v1
    description: Production API
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Social
    description: Social media content creation, scheduling, and engagement automation
  - name: Chat
    description: AI-powered chatbot flows, DM automation, and lead qualification
  - name: Mail
    description: Email campaigns, sequences, automations, and subscriber management
  - name: Pages
    description: Landing page builder, lead capture forms, and conversion tracking
  - name: Ads
    description: Meta and TikTok ad campaign management
  - name: Contacts
    description: Unified contact and lead pipeline management
  - name: Analytics
    description: Cross-channel analytics and reporting
paths:
  /social/posts:
    get:
      tags: [Social]
      summary: List scheduled and published posts
      operationId: listPosts
    post:
      tags: [Social]
      summary: Create and optionally schedule a social post
      operationId: createPost
  /social/generate:
    post:
      tags: [Social]
      summary: AI-generate social content from a prompt
      operationId: generateSocialContent
  /social/scripts:
    post:
      tags: [Social]
      summary: AI-generate video scripts
      operationId: generateScript
  /social/auto-engage:
    post:
      tags: [Social]
      summary: Configure auto-reply rules for comments and DMs
      operationId: configureAutoEngage
  /chat/flows:
    get:
      tags: [Chat]
      summary: List chat automation flows
      operationId: listChatFlows
    post:
      tags: [Chat]
      summary: Create a chat automation flow
      operationId: createChatFlow
  /chat/conversations:
    get:
      tags: [Chat]
      summary: List conversations across platforms
      operationId: listConversations
  /mail/campaigns:
    get:
      tags: [Mail]
      summary: List email campaigns
      operationId: listCampaigns
    post:
      tags: [Mail]
      summary: Create an email campaign
      operationId: createCampaign
  /mail/generate:
    post:
      tags: [Mail]
      summary: AI-generate email campaign content
      operationId: generateEmailContent
  /mail/subscribers:
    get:
      tags: [Mail]
      summary: List subscribers
      operationId: listSubscribers
    post:
      tags: [Mail]
      summary: Add a subscriber
      operationId: addSubscriber
  /mail/sequences:
    get:
      tags: [Mail]
      summary: List email automation sequences
      operationId: listSequences
    post:
      tags: [Mail]
      summary: Create an email automation sequence
      operationId: createSequence
  /pages:
    get:
      tags: [Pages]
      summary: List landing pages
      operationId: listPages
    post:
      tags: [Pages]
      summary: Create a landing page
      operationId: createPage
  /pages/generate:
    post:
      tags: [Pages]
      summary: AI-generate a landing page from a prompt
      operationId: generatePage
  /ads/campaigns:
    get:
      tags: [Ads]
      summary: List ad campaigns across Meta and TikTok
      operationId: listAdCampaigns
    post:
      tags: [Ads]
      summary: Create an ad campaign
      operationId: createAdCampaign
  /contacts:
    get:
      tags: [Contacts]
      summary: List contacts in the unified pipeline
      operationId: listContacts
    post:
      tags: [Contacts]
      summary: Create a contact
      operationId: createContact
  /analytics/overview:
    get:
      tags: [Analytics]
      summary: Get cross-channel analytics overview
      operationId: getAnalyticsOverview
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-ArtFlow-Key
