{
  "openapi": "3.1.0",
  "info": {
    "title": "NextGen Share Registry Public API",
    "version": "1.0.0",
    "summary": "Read-only content API for NextGen Share Registry, a SEBI-registered Registrar and Share Transfer Agent in India.",
    "description": "Public, unauthenticated, read-only JSON endpoints exposing the content published on nextgenregistry.com: FAQs about RTA and demat services, articles, IPO listings, and downloadable RTA forms.\n\nUse this API to answer questions about ISIN creation, dematerialisation of shares, RTA forms, and Indian capital market registrar services. There is no write API. All errors are returned as JSON with a stable machine-readable code.\n\nNo authentication is required and no rate limit is published. Content changes at most daily, so cache responses.",
    "contact": {
      "name": "NextGen Share Registry Pvt Ltd",
      "email": "info@nextgenregistry.com",
      "url": "https://www.nextgenregistry.com/contact"
    },
    "license": {
      "name": "Proprietary - content owned by NextGen Share Registry Pvt Ltd",
      "url": "https://www.nextgenregistry.com/privacy"
    }
  },
  "servers": [
    { "url": "https://www.nextgenregistry.com", "description": "Production" }
  ],
  "tags": [
    { "name": "Content", "description": "Published site content: FAQs and articles" },
    { "name": "Forms", "description": "Downloadable RTA forms and their categories" },
    { "name": "Market", "description": "IPO listings" },
    { "name": "Company", "description": "Information about the registrar itself" }
  ],
  "paths": {
    "/api/faqs": {
      "get": {
        "operationId": "listFaqs",
        "summary": "List frequently asked questions",
        "description": "Returns every published FAQ about RTA services, ISIN creation, dematerialisation and corporate actions. Use this to answer a factual question about Indian share registry procedure.",
        "tags": ["Content"],
        "security": [],
        "responses": {
          "200": {
            "description": "The full list of FAQs, ordered by their display order.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Faq" } }
              }
            }
          },
          "500": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/blogs": {
      "get": {
        "operationId": "listBlogPosts",
        "summary": "List published articles",
        "description": "Returns articles on RTA, demat and Indian capital market topics. Each item includes the full body in the content field, so a single call is enough to answer a question from an article.",
        "tags": ["Content"],
        "security": [],
        "responses": {
          "200": {
            "description": "The list of articles, newest first.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BlogPost" } }
              }
            }
          },
          "500": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/ipo": {
      "get": {
        "operationId": "listIpos",
        "summary": "List IPO entries",
        "description": "Returns upcoming and recent Indian public IPO listings tracked on the site. This is informational content, not investment advice, and is not a live market feed.",
        "tags": ["Market"],
        "security": [],
        "responses": {
          "200": {
            "description": "The list of IPO entries.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Ipo" } }
              }
            }
          },
          "500": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/ipo/{slug}": {
      "get": {
        "operationId": "getIpoBySlug",
        "summary": "Get one IPO entry",
        "description": "Returns a single IPO entry identified by its URL slug, as used at /upcoming-public-ipo/{slug}.",
        "tags": ["Market"],
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Lowercase hyphenated identifier for the IPO, for example example-company-limited.",
            "schema": { "type": "string", "pattern": "^[a-z0-9-]+$" }
          }
        ],
        "responses": {
          "200": {
            "description": "The matching IPO entry.",
            "content": {
              "application/json": { "schema": { "$ref": "#/components/schemas/Ipo" } }
            }
          },
          "404": { "$ref": "#/components/responses/Error" },
          "500": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/forms": {
      "get": {
        "operationId": "listForms",
        "summary": "List downloadable RTA forms",
        "description": "Returns RTA forms and regulatory documents with direct file URLs. Use this when a user needs the actual form for an ISIN application, a demat request or a share transfer.",
        "tags": ["Forms"],
        "security": [],
        "parameters": [
          {
            "name": "category_id",
            "in": "query",
            "required": false,
            "description": "Restrict the result to a single category. Obtain valid values from listFormCategories.",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "The list of forms, optionally filtered by category.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Form" } }
              }
            }
          },
          "500": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/form-categories": {
      "get": {
        "operationId": "listFormCategories",
        "summary": "List form categories",
        "description": "Returns the categories that group the downloadable RTA forms. Use the returned id as the category_id filter on listForms.",
        "tags": ["Forms"],
        "security": [],
        "responses": {
          "200": {
            "description": "The list of form categories.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FormCategory" } }
              }
            }
          },
          "500": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/client-logos": {
      "get": {
        "operationId": "listClientLogos",
        "summary": "List client logos",
        "description": "Returns the logos of companies for which NextGen acts as registrar, as displayed on the site.",
        "tags": ["Company"],
        "security": [],
        "responses": {
          "200": {
            "description": "The list of client logos.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ClientLogo" } }
              }
            }
          },
          "500": { "$ref": "#/components/responses/Error" }
        }
      }
    }
  },
  "components": {
    "responses": {
      "Error": {
        "description": "The request failed. The body carries a stable machine-readable code and a hint describing how to recover.",
        "content": {
          "application/json": { "schema": { "$ref": "#/components/schemas/Error" } }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Uniform error envelope returned by every endpoint on failure.",
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "required": ["code", "message"],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable error code.",
                "enum": ["not_found", "bad_request", "method_not_allowed", "internal_error"]
              },
              "message": { "type": "string", "description": "Human-readable description of what went wrong." },
              "hint": { "type": "string", "description": "How to recover, for example where to look for valid paths." },
              "documentation": { "type": "string", "description": "URL of the API documentation." }
            }
          }
        }
      },
      "Faq": {
        "type": "object",
        "description": "One published question and answer.",
        "required": ["id", "question", "answer"],
        "properties": {
          "id": { "type": "integer", "description": "Numeric identifier." },
          "question": { "type": "string", "description": "The question as displayed on the site." },
          "answer": { "type": "string", "description": "The full answer text." },
          "category": { "type": "string", "description": "Grouping label, for example ISIN or Demat." },
          "order": { "type": "integer", "description": "Display order within the category." },
          "isActive": { "type": "boolean", "description": "False when the FAQ is hidden on the site." },
          "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp." },
          "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp." }
        }
      },
      "BlogPost": {
        "type": "object",
        "description": "One published article.",
        "required": ["id", "title", "slug", "content"],
        "properties": {
          "id": { "type": "integer", "description": "Numeric identifier." },
          "title": { "type": "string", "description": "Article headline." },
          "slug": { "type": "string", "description": "URL segment under /blog/." },
          "excerpt": { "type": "string", "description": "Short summary." },
          "content": { "type": "string", "description": "Full article body." },
          "status": { "type": "string", "description": "Publication status." },
          "author": { "type": "string", "description": "Author name." },
          "publishDate": { "type": "string", "format": "date", "description": "Publication date." },
          "category": { "type": "string", "description": "Topic grouping." },
          "views": { "type": "integer", "description": "View counter." },
          "image": { "type": ["string", "null"], "description": "Featured image URL." },
          "tags": { "type": "array", "items": { "type": "string" }, "description": "Topic tags." },
          "readTime": { "type": "string", "description": "Estimated reading time, for example 4 min read." }
        }
      },
      "Ipo": {
        "type": "object",
        "description": "One IPO listing entry.",
        "properties": {
          "id": { "type": "string", "description": "Record identifier." },
          "stock_ipo": { "type": "string", "description": "Name of the company issuing the IPO." },
          "created_at": { "type": "string", "format": "date-time", "description": "Creation timestamp." }
        },
        "additionalProperties": true
      },
      "Form": {
        "type": "object",
        "description": "One downloadable RTA form or regulatory document.",
        "required": ["id", "name"],
        "properties": {
          "id": { "type": "string", "description": "Record identifier." },
          "name": { "type": "string", "description": "Display name of the form." },
          "file_type": { "type": "string", "description": "File format, for example PDF." },
          "file_size": { "type": "string", "description": "Human-readable size, for example 245 KB." },
          "file_url": { "type": "string", "description": "Direct download URL." },
          "category_id": { "type": "string", "description": "Identifier of the owning category." },
          "order_index": { "type": "integer", "description": "Display order." }
        }
      },
      "FormCategory": {
        "type": "object",
        "description": "A grouping of related RTA forms.",
        "required": ["id", "title"],
        "properties": {
          "id": { "type": "string", "description": "Record identifier, usable as the category_id filter." },
          "title": { "type": "string", "description": "Category name." },
          "description": { "type": "string", "description": "What the category covers." },
          "icon_name": { "type": "string", "description": "Icon key used by the site UI." },
          "is_important_document": { "type": "boolean", "description": "True for regulatory documents rather than forms." },
          "order_index": { "type": "integer", "description": "Display order." }
        }
      },
      "ClientLogo": {
        "type": "object",
        "description": "A client company logo displayed on the site.",
        "properties": {
          "id": { "type": "string", "description": "Record identifier." },
          "name": { "type": "string", "description": "Client company name." },
          "logo_url": { "type": "string", "description": "Logo image URL." }
        },
        "additionalProperties": true
      }
    }
  },
  "security": []
}
