openapi: 3.1.0
info:
  title: GieniABX Platform API
  version: 1.0.0
  description: >
    GieniABX is an autonomous business execution platform. Define the outcome —
    GieniABX executes the work: board-ready overviews, market analysis, CRM
    enrichment, and lead execution delivered autonomously.
  contact:
    name: GieniABX Support
    email: info@gieniabx.com
    url: https://market.gieniabx.com
  license:
    name: Proprietary
    url: https://market.gieniabx.com/terms

servers:
  - url: https://app.gieniabx.com/api/v1
    description: GieniABX Production API

paths:
  /outcomes:
    post:
      operationId: defineOutcome
      summary: Define an outcome
      description: Submit a task or outcome definition for autonomous execution.
      tags: [Outcomes]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [description]
              properties:
                description:
                  type: string
                  description: Natural-language description of the desired outcome.
                priority:
                  type: string
                  enum: [low, medium, high, urgent]
      responses:
        '201':
          description: Outcome created and queued for execution.

  /board-overviews:
    post:
      operationId: getBoardOverview
      summary: Request a board-ready market overview
      description: Generate a comprehensive, board-ready market overview report.
      tags: [Board Overviews]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [market]
              properties:
                market:
                  type: string
                  description: Target market or industry to analyse.
                region:
                  type: string
                  description: Geographic focus (e.g. DACH, EMEA, Global).
      responses:
        '201':
          description: Board overview generation started.

  /lead-to-close:
    post:
      operationId: runLeadToClose
      summary: Trigger lead-to-close pipeline
      description: Execute the full lead pipeline from identification to close.
      tags: [Lead Execution]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [targetProfile]
              properties:
                targetProfile:
                  type: string
                  description: Ideal customer profile or segment description.
      responses:
        '201':
          description: Lead-to-close pipeline initiated.

  /market-monitor:
    post:
      operationId: monitorMarket
      summary: Start continuous market surveillance
      description: Set up real-time monitoring for market signals and competitive moves.
      tags: [Market Intelligence]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [keywords]
              properties:
                keywords:
                  type: array
                  items:
                    type: string
                  description: Keywords or topics to monitor.
                competitors:
                  type: array
                  items:
                    type: string
                  description: Competitor names to track.
      responses:
        '201':
          description: Market monitor activated.

  /crm-enrichment:
    post:
      operationId: enrichCRM
      summary: Trigger CRM data enrichment
      description: Enrich existing CRM records with firmographic and intent data.
      tags: [CRM]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source:
                  type: string
                  description: CRM source identifier or integration name.
      responses:
        '201':
          description: CRM enrichment job started.

  /reports:
    post:
      operationId: createReport
      summary: Generate a business report
      description: Create an autonomous business report on a specified topic.
      tags: [Reports]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [topic]
              properties:
                topic:
                  type: string
                  description: Report topic or question to answer.
                format:
                  type: string
                  enum: [pdf, slides, dashboard]
      responses:
        '201':
          description: Report generation started.

  /market-entry:
    post:
      operationId: analyzeMarketEntry
      summary: Run market entry analysis
      description: Analyse a new market for entry feasibility, risks, and opportunities.
      tags: [Market Intelligence]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [targetMarket]
              properties:
                targetMarket:
                  type: string
                  description: Market or geography to evaluate for entry.
      responses:
        '201':
          description: Market entry analysis started.

  /team-performance:
    post:
      operationId: trackTeamPerformance
      summary: Start team performance tracking
      description: Set up autonomous tracking and reporting of team KPIs.
      tags: [Performance]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                teamId:
                  type: string
                  description: Team identifier to track.
                metrics:
                  type: array
                  items:
                    type: string
                  description: Specific metrics to monitor.
      responses:
        '201':
          description: Team performance tracking activated.
