{
  "openapi": "3.0.3",
  "info": {
    "title": "Rayify Public API",
    "version": "3.0.0",
    "description": "The public, unauthenticated API behind rayify.ai.\n\nSCOPE: this document describes the PUBLIC surface in full - the Insights catalogue, the Labs catalogue (served at /api/workshops, its original name), the Atom feed, and the two contact forms. That is the entire set of endpoints a client may call without credentials. If an endpoint is not listed here, it is not public.\n\nCustomer-facing product APIs - projects, AI registers, workflows, evidence packs and reports - are NOT public. They require an authenticated account, are scoped to the owning organisation, and are documented to customers directly rather than here.\n\nVersion 3.0.0 removes the prediction-market API that version 2.0.0 described. Rayify is an AI governance system: there is no public prediction workflow, no ranking leaderboard, no points or referral economy, and no registration funnel. Those endpoints have been withdrawn and return 404.\n\nA NOTE ON NAMING: the public page is /insights. The API path is /api/blog, which is the original internal name kept because renaming a published route breaks every client already calling it. They are the same content - /api/blog/{slug} returns the article shown at /insights/{slug}.",
    "contact": {
      "name": "Rayify",
      "email": "team@rayify.ai",
      "url": "https://www.rayifytech.com/contact"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://www.rayifytech.com/terms"
    }
  },
  "servers": [
    {
      "url": "https://www.rayifytech.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Insights",
      "description": "Published articles. The public content catalogue at /insights."
    },
    {
      "name": "Labs",
      "description": "The Labs programme catalogue at /labs (the API keeps its /api/workshops path)."
    },
    {
      "name": "Feeds",
      "description": "Syndication for readers and agents."
    },
    {
      "name": "Contact",
      "description": "Inbound enquiry and waitlist forms. Rate limited."
    }
  ],
  "paths": {
    "/api/blog": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "List published articles",
        "description": "Returns published Insights articles, newest first. Only articles whose status is published and whose publication date has passed are returned; drafts and scheduled articles are never exposed.",
        "operationId": "listInsights",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum articles to return.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of articles to skip, for pagination.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The published catalogue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsightList"
                }
              }
            }
          }
        }
      }
    },
    "/api/blog/{slug}": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "Get one article",
        "description": "Returns a single published article including its full body, as markdown and as rendered HTML.",
        "operationId": "getInsight",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The article's URL slug, as it appears at /insights/{slug}.",
            "schema": {
              "type": "string"
            },
            "example": "ai-financial-advice-trust-deficit"
          }
        ],
        "responses": {
          "200": {
            "description": "The article.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "post"
                  ],
                  "properties": {
                    "post": {
                      "$ref": "#/components/schemas/Insight"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No published article with that slug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/blog-images/{id}": {
      "get": {
        "tags": [
          "Insights"
        ],
        "summary": "Fetch an article image",
        "description": "Serves an image referenced by an article body or cover.",
        "operationId": "getInsightImage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The image.",
            "content": {
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "No such image."
          }
        }
      }
    },
    "/api/workshops": {
      "get": {
        "tags": [
          "Labs"
        ],
        "summary": "List Lab programmes",
        "description": "Returns the visible Labs catalogue. Each programme belongs to one or more tracks; the site presents a non-technical and a technical track.",
        "operationId": "listWorkshops",
        "responses": {
          "200": {
            "description": "The catalogue.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workshops"
                  ],
                  "properties": {
                    "workshops": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Workshop"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/workshops/{slug}": {
      "get": {
        "tags": [
          "Labs"
        ],
        "summary": "Get one Lab programme",
        "description": "Returns a single programme including its modules, outcomes and prerequisites.",
        "operationId": "getWorkshop",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The programme's URL slug, as it appears at /labs/{slug}.",
            "schema": {
              "type": "string"
            },
            "example": "agentic-governance-non-tech"
          }
        ],
        "responses": {
          "200": {
            "description": "The programme.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "workshop"
                  ],
                  "properties": {
                    "workshop": {
                      "$ref": "#/components/schemas/Workshop"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No visible programme with that slug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "tags": [
          "Feeds"
        ],
        "summary": "Atom feed of published articles",
        "description": "An Atom 1.0 feed of the Insights catalogue. Also served at /api/feed.xml.",
        "operationId": "getAtomFeed",
        "responses": {
          "200": {
            "description": "The feed.",
            "content": {
              "application/atom+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/contact": {
      "post": {
        "tags": [
          "Contact"
        ],
        "summary": "Submit an enquiry",
        "description": "Sends an enquiry to the Rayify team. Rate limited per client.",
        "operationId": "submitContact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The enquiry was accepted."
          },
          "400": {
            "description": "A required field is missing or the email is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/waitlist": {
      "post": {
        "tags": [
          "Contact"
        ],
        "summary": "Join the waitlist",
        "description": "Adds an address to the waitlist and sends a confirmation email. Rate limited per client.",
        "operationId": "joinWaitlist",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The address was accepted."
          },
          "400": {
            "description": "The email is missing or not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "InsightList": {
        "type": "object",
        "required": [
          "posts",
          "total"
        ],
        "properties": {
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsightSummary"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total published articles, ignoring limit and offset."
          }
        }
      },
      "InsightSummary": {
        "type": "object",
        "description": "An article as it appears in the catalogue listing. The body is omitted; fetch /api/blog/{slug} for it.",
        "required": [
          "id",
          "slug",
          "title"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "subtitle": {
            "type": "string"
          },
          "tags": {
            "type": "string",
            "description": "Comma-separated tags."
          },
          "type": {
            "type": "string"
          },
          "cover_image_url": {
            "type": "string"
          },
          "word_count": {
            "type": "integer"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "Insight": {
        "type": "object",
        "description": "A published article with its full body.",
        "required": [
          "id",
          "slug",
          "title"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "subtitle": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "description": "The body as markdown."
          },
          "content_html": {
            "type": "string",
            "description": "The body rendered to HTML."
          },
          "meta_description": {
            "type": "string"
          },
          "cover_image_url": {
            "type": "string"
          },
          "tags": {
            "type": "string",
            "description": "Comma-separated tags."
          },
          "status": {
            "type": "string",
            "description": "Only published articles are returned by this endpoint.",
            "enum": [
              "published"
            ]
          },
          "newsletter_include": {
            "type": "boolean"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Workshop": {
        "type": "object",
        "description": "A Lab programme in the public catalogue (the API still names the record a workshop).",
        "required": [
          "id",
          "slug",
          "title"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "Short programme code, e.g. EXEC-001."
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "context": {
            "type": "string"
          },
          "track": {
            "type": "string",
            "description": "Primary track.",
            "example": "non-technical"
          },
          "tracks": {
            "type": "array",
            "description": "Every track this programme appears under.",
            "items": {
              "type": "string"
            }
          },
          "audience": {
            "type": "string"
          },
          "duration": {
            "type": "string"
          },
          "format": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "description": "Site-relative or absolute URL to the programme's artwork."
          },
          "featured": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "visibility": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "itReadiness": {
            "type": "string"
          },
          "itLeadTime": {
            "type": "string"
          },
          "sessionDetails": {
            "type": "string"
          },
          "parts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "outcomes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prerequisites": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ContactRequest": {
        "type": "object",
        "required": [
          "name",
          "email",
          "message"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "company": {
            "type": "string"
          },
          "job_title": {
            "type": "string"
          },
          "enquiry_type": {
            "type": "string"
          },
          "budget": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "WaitlistRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "organisation": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "email",
              "google"
            ]
          },
          "marketing_consent": {
            "type": "boolean"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable message."
          },
          "code": {
            "type": "string",
            "description": "Stable machine-readable code."
          }
        }
      }
    }
  }
}
