openapi: 3.1.0
info:
  title: Insider Press Wire API
  version: 0.2.0
  description: Public release discovery, service offers, capability declaration, and gated order-intent readiness.
servers:
  - url: https://insiderpresswire.com/api
paths:
  /capabilities:
    get:
      summary: Read current platform capabilities
      responses:
        '200':
          description: Current capability declaration
          content:
            application/json:
              schema:
                type: object
  /releases:
    get:
      summary: List published releases
      parameters:
        - in: query
          name: q
          schema: {type: string}
        - in: query
          name: limit
          schema: {type: integer, minimum: 1, maximum: 100, default: 25}
      responses:
        '200':
          description: Published release collection
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items: {$ref: '#/components/schemas/ReleaseSummary'}
                  count: {type: integer}
  /releases/{slug}:
    get:
      summary: Read a published release
      parameters:
        - in: path
          name: slug
          required: true
          schema: {type: string, pattern: '^[a-z0-9-]+$'}
      responses:
        '200':
          description: Published release
          content:
            application/json:
              schema: {type: object}
        '404': {description: Release not found}
  /offers:
    get:
      summary: List service offers and availability
      responses:
        '200':
          description: Offer catalog
          content:
            application/json:
              schema:
                type: object
  /order-intents:
    post:
      summary: Create a gated order intent for an active offer
      description: Disabled by default. An order intent is not a charge or completed purchase.
      parameters:
        - in: header
          name: Idempotency-Key
          required: true
          schema: {type: string}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [offer_id, buyer_email]
              properties:
                offer_id: {type: string}
                buyer_email: {type: string, format: email}
                client_reference: {type: string, maxLength: 120}
      responses:
        '201': {description: Order intent recorded}
        '422': {description: Invalid or unavailable offer}
        '503': {description: Agentic order intents not enabled}
components:
  schemas:
    ReleaseSummary:
      type: object
      required: [id, headline, summary, organization, published_at, url]
      properties:
        id: {type: integer}
        headline: {type: string}
        summary: {type: string}
        organization: {type: string}
        industry: {type: string}
        category: {type: string}
        published_at: {type: string, format: date-time}
        updated_at: {type: string, format: date-time}
        url: {type: string, format: uri}
x-ipw-agentic-commerce-status: readiness-only
