openapi: 3.1.0
info:
  title: Klizo Solutions API
  version: 1.0.0
  description: >-
    Official programmatic API for Klizo Solutions (https://klizos.com).
    Enables AI agents, developers, and automated tools to query company
    information, explore blog articles, check service health, and submit client
    inquiries or project consultations.
  contact:
    name: Klizo Solutions Support
    url: https://klizos.com/contact-us
    email: info@klizos.com
servers:
  - url: https://klizos.com
    description: Production server
paths:
  /api/v1/health:
    get:
      operationId: getApiHealth
      summary: Check API Health and Availability
      description: Returns the current operational status, API version, and timestamp.
      responses:
        '200':
          description: API is operational
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthResponse'
  /api/v1/info:
    get:
      operationId: getCompanyInfo
      summary: Get Klizo Solutions Company Information & Services
      description: >-
        Returns verified company profile, services catalog, headquarters
        address, contact channels, and developer resource links.
      responses:
        '200':
          description: Company profile and services list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyInfoResponse'
  /api/blog:
    get:
      operationId: listBlogPosts
      summary: List and Search Blog Articles
      description: >-
        Retrieves published technical articles, guides, and thought leadership
        from Klizo Solutions with pagination and optional search query or category filter.
      parameters:
        - name: page
          in: query
          required: false
          description: Page number (1-based index)
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: perPage
          in: query
          required: false
          description: Number of articles per page (max 50)
          schema:
            type: integer
            default: 6
            minimum: 1
            maximum: 50
        - name: search
          in: query
          required: false
          description: Search keyword to filter blog articles by title or content
          schema:
            type: string
        - name: categoryId
          in: query
          required: false
          description: Category ID filter or 'all'
          schema:
            type: string
            default: all
      responses:
        '200':
          description: Paginated list of blog articles
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlogListResponse'
        '400':
          description: Invalid query parameter supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Upstream service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/blog/{slug}:
    get:
      operationId: getBlogPostBySlug
      summary: Get Single Blog Article by Slug
      description: >-
        Returns full article content, author details, reading time, and
        metadata for a specific article slug.
      parameters:
        - name: slug
          in: path
          required: true
          description: Unique URL slug of the blog article
          schema:
            type: string
      responses:
        '200':
          description: Article details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlogPostResponse'
        '404':
          description: Article not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/contact-form:
    post:
      operationId: submitContactInquiry
      summary: Submit a Project Inquiry or Consultation Request
      description: >-
        Submits a client inquiry or consultation request to Klizo Solutions for
        custom AI development, web development, SaaS building, or dedicated hiring.
      requestBody:
        required: true
        description: Contact form payload with client details and project requirement
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactFormInput'
      responses:
        '201':
          description: Inquiry submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactFormSuccessResponse'
        '400':
          description: Validation error or invalid payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    HealthResponse:
      type: object
      required:
        - status
        - service
        - version
        - timestamp
      properties:
        status:
          type: string
          example: ok
        service:
          type: string
          example: Klizo Solutions API
        version:
          type: string
          example: 1.0.0
        timestamp:
          type: string
          format: date-time
        documentation:
          type: string
          format: uri
        openapi:
          type: string
          format: uri
    CompanyInfoResponse:
      type: object
      required:
        - name
        - website
        - founded
        - headquarters
        - contact
        - services
        - developerResources
      properties:
        name:
          type: string
          example: Klizo Solutions
        legalName:
          type: string
          example: Klizo Solutions Private Limited
        tagline:
          type: string
        website:
          type: string
          format: uri
        founded:
          type: string
        headquarters:
          type: object
          properties:
            address:
              type: string
            city:
              type: string
            state:
              type: string
            postalCode:
              type: string
            country:
              type: string
        contact:
          type: object
          properties:
            email:
              type: string
              format: email
            phone:
              type: string
            contactUrl:
              type: string
              format: uri
        services:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              description:
                type: string
              url:
                type: string
                format: uri
        developerResources:
          type: object
          properties:
            developerPortal:
              type: string
              format: uri
            openapiJson:
              type: string
              format: uri
            openapiYaml:
              type: string
              format: uri
            llmsTxt:
              type: string
              format: uri
            llmsFullTxt:
              type: string
              format: uri
            agentInstructions:
              type: string
              format: uri
    WordPressPost:
      type: object
      required:
        - id
        - slug
        - title
        - excerpt
        - content
        - date
        - category
        - categoryId
        - image
        - author
        - readingTime
      properties:
        id:
          type: integer
        slug:
          type: string
        title:
          type: string
        excerpt:
          type: string
        content:
          type: string
        date:
          type: string
        category:
          type: string
        categoryId:
          type: integer
        image:
          type: string
          format: uri
        author:
          type: string
        readingTime:
          type: string
    BlogListResponse:
      type: object
      required:
        - posts
        - totalCount
        - totalPages
      properties:
        posts:
          type: array
          items:
            $ref: '#/components/schemas/WordPressPost'
        totalCount:
          type: integer
        totalPages:
          type: integer
    BlogPostResponse:
      type: object
      required:
        - success
        - post
      properties:
        success:
          type: boolean
        post:
          $ref: '#/components/schemas/WordPressPost'
    ContactFormInput:
      type: object
      required:
        - name
        - email
        - phone
        - requirement
        - message
      properties:
        name:
          type: string
          minLength: 2
          maxLength: 50
        email:
          type: string
          format: email
        phone:
          type: string
        requirement:
          type: string
          enum:
            - web
            - app
            - design
            - ai
            - other
        message:
          type: string
          minLength: 10
        is_contactus_form:
          type: boolean
          default: true
    ContactFormSuccessResponse:
      type: object
      required:
        - success
        - message
        - id
      properties:
        success:
          type: boolean
        message:
          type: string
        id:
          type: string
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
        error:
          type: object
          required:
            - code
            - message
            - status
            - timestamp
            - documentation_url
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
            resolution:
              type: string
            hint:
              type: string
            timestamp:
              type: string
              format: date-time
            documentation_url:
              type: string
              format: uri
            errors:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
