openapi: 3.1.0
info:
  title: Smart Site Login Personalize REST API
  description: Central OpenAPI contract for Smart Login Personalize AI and configuration endpoints.
  version: 2.0.9
servers:
  -
    url: "https://example.com/wp-json"
    description: Replace with the target WordPress REST root
tags:
  -
    name: Context
  -
    name: Options
  -
    name: Presets
  -
    name: Documentation
paths:
  /sslpp/v1/ai/context:
    get:
      tags:
        - Context
      summary: Runtime plugin and site context
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SSLPPContext"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
  /sslpp/v1/ai/options/schema:
    get:
      tags:
        - Options
      summary: Option schema and current non-sensitive values
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SSLPPSchema"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
  /sslpp/v1/ai/options:
    get:
      tags:
        - Options
      summary: Read login personalization options
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SSLPPOptionsPayload"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
    post:
      tags:
        - Options
      summary: Update login personalization options
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SSLPPOptionsResult"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SSLPPOptionsEnvelope"
  /sslpp/v1/ai/options/reset:
    post:
      tags:
        - Options
      summary: Reset options to defaults
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/GenericObject"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
  /sslpp/v1/ai/options/export:
    get:
      tags:
        - Options
      summary: Export full options backup
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/GenericObject"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
  /sslpp/v1/ai/options/import:
    post:
      tags:
        - Options
      summary: Import options backup
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SSLPPImportResult"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/GenericObject"
  /sslpp/v1/ai/presets:
    get:
      tags:
        - Presets
      summary: Color and template presets
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/GenericObject"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
  /sslpp/v1/ai/openapi:
    get:
      tags:
        - Documentation
      summary: OpenAPI document
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OpenAPI"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
  /sslpp/v1/openapi:
    get:
      tags:
        - Documentation
      summary: OpenAPI document alias
      responses:
        200:
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OpenAPI"
        401:
          description: Authentication required
        403:
          description: Insufficient permissions
      security:
        -
          wpNonce: []
        -
          smartAiKey: []
        -
          applicationPassword: []
components:
  securitySchemes:
    wpNonce:
      type: apiKey
      in: header
      name: X-WP-Nonce
    smartAiKey:
      type: apiKey
      in: header
      name: X-Smart-AI-Key
    applicationPassword:
      type: http
      scheme: basic
  schemas:
    GenericObject:
      type: object
      additionalProperties: true
    OpenAPI:
      type: object
      additionalProperties: true
    SSLPPContext:
      type: object
      additionalProperties: true
    SSLPPSchema:
      type: object
      additionalProperties: true
    SSLPPOptionsPayload:
      type: object
      additionalProperties: true
    SSLPPOptionsEnvelope:
      type: object
      required:
        - options
      properties:
        options:
          type: object
          additionalProperties: true
    SSLPPOptionsResult:
      type: object
      additionalProperties: true
    SSLPPImportResult:
      type: object
      additionalProperties: true
