> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dezerx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a blog post (public)

> One post with its Markdown content. The key API accepts the id or the slug and returns posts in any status; the public API takes the slug of a published post.

This is the public, keyless version. It only returns what an anonymous visitor can see on your site, is cached for 60 seconds (edits in the admin area show up at once) and allows 60 requests per minute per IP.

**Authentication:** none, no API key needed.

**Rate limit:** 60 requests per minute per IP.



## OpenAPI

````yaml /docs/modules-api.yaml get /public/modules/blog/posts/{post}
openapi: 3.1.0
info:
  title: Spartan Module API
  version: '2026.11'
  description: >-
    Endpoints added by modules. Key endpoints live under
    `/api/application/modules/<module>/` and need an API key with the module
    permission. Content modules (Blog, News, Knowledge Base, Status) also offer
    keyless read only endpoints under `/api/public/modules/<module>/` that only
    return what an anonymous visitor can see.
servers:
  - url: https://{domain}/api
    description: Your Spartan installation
    variables:
      domain:
        default: billing.example.com
        description: Domain of your Spartan installation, without https://
security:
  - bearerAuth: []
tags:
  - name: Blog
  - name: Blog (public)
  - name: News
  - name: News (public)
  - name: Knowledge Base
  - name: Knowledge Base (public)
  - name: Status
  - name: Status (public)
  - name: Forms
  - name: Affiliates
  - name: Deprecated endpoints
paths:
  /public/modules/blog/posts/{post}:
    get:
      tags:
        - Blog (public)
      summary: Get a blog post (public)
      description: >-
        One post with its Markdown content. The key API accepts the id or the
        slug and returns posts in any status; the public API takes the slug of a
        published post.


        This is the public, keyless version. It only returns what an anonymous
        visitor can see on your site, is cached for 60 seconds (edits in the
        admin area show up at once) and allows 60 requests per minute per IP.


        **Authentication:** none, no API key needed.


        **Rate limit:** 60 requests per minute per IP.
      operationId: getBlogPostPublic
      parameters:
        - name: post
          in: path
          required: true
          description: Post slug. The key API also accepts the numeric id.
          schema:
            type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BlogPost'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - data
                  - meta
              example:
                data:
                  id: 1
                  title: 'Spring sale: 30 percent off game servers'
                  slug: spring-sale
                  url: https://billing.example.com/blog/spring-sale
                  description: >-
                    All Minecraft and Rust plans are 30 percent off until
                    Sunday.
                  featured_image: >-
                    https://billing.example.com/storage/blog/featured-images/LL6G2vWRsmwuKfg5NUpQ5wkyxOG0wgnRZc1n8pM3.png
                  is_featured: false
                  views: 1
                  author:
                    name: Alex Morgan
                  meta_title: Spring sale
                  meta_description: 30 percent off all game servers until Sunday.
                  published_at: '2026-03-03T13:32:09Z'
                  created_at: '2026-03-03T13:32:09Z'
                  updated_at: '2026-03-03T13:35:14Z'
                  content: "# Welcome to Your Blog Post\r\n\r\nWrite your content here using markdown syntax.\r\n\r\n## Getting Started\r\n\r\nReplace this content with your own blog post. You can use standard Markdown syntax:\r\n\r\n- **Bold text** for emphasis\r\n- *Italic text* for subtle emphasis\r\n- [Links](https://example.com) to external resources\r\n- > Blockquotes for important information\r\n- `Inline code` for technical terms\r\n\r\n## Code Examples\r\n\r\n```javascript\r\nfunction greet(name) {\r\n    return `Hello, ${name}!`;\r\n}\r\n```\r\n\r\nWrite your blog post content below and customize as needed."
                meta:
                  request_id: 76781610-0ea3-464f-be72-5865cce8bb31
          headers:
            Cache-Control:
              description: '`public, max-age=60`.'
              schema:
                type: string
            X-Cache:
              description: '`HIT` when served from the 60 second cache, `MISS` otherwise.'
              schema:
                type: string
                enum:
                  - HIT
                  - MISS
            X-RateLimit-Limit:
              description: Requests allowed per minute.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in the current minute.
              schema:
                type: integer
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_found:
                  summary: Unknown or unpublished post
                  value:
                    error:
                      code: not_found
                      message: Blog post not found.
                      details: {}
                    request_id: beddec97-2688-4831-908a-6c4d90758cb1
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security: []
components:
  schemas:
    BlogPost:
      type: object
      properties:
        id:
          type: integer
          description: Post id.
        title:
          type: string
        slug:
          type: string
        url:
          type: string
          format: uri
          description: Public URL of the post.
        description:
          type:
            - string
            - 'null'
          description: Short summary.
        featured_image:
          type:
            - string
            - 'null'
          format: uri
          description: Absolute image URL.
        is_featured:
          type: boolean
        views:
          type: integer
          description: Unique views.
        author:
          type:
            - object
            - 'null'
          properties:
            id:
              type: integer
              description: Key API only.
            name:
              type: string
          description: Author. The public API only returns the name.
        meta_title:
          type:
            - string
            - 'null'
        meta_description:
          type:
            - string
            - 'null'
        published_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Publish date. Falls back to the creation date for posts published
            straight away.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        status:
          type: string
          enum:
            - published
            - scheduled
            - draft
          description: Key API only.
        content:
          type: string
          description: >-
            Markdown body. On single post responses, or lists with
            `include_content=1`.
    Meta:
      type: object
      properties:
        request_id:
          type: string
          format: uuid
          description: Request id, also sent in the `X-Request-ID` response header.
      required:
        - request_id
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                Machine readable error code, for example `unauthorized`,
                `forbidden`, `not_found`, `invalid_service_state`.
            message:
              type: string
              description: Human readable explanation.
            details:
              type: object
              properties: {}
              description: Extra context. An empty object for most errors.
              additionalProperties: true
          required:
            - code
            - message
            - details
        request_id:
          type: string
          format: uuid
          description: >-
            Request id. Also returned in the `X-Request-ID` header. Send your
            own with `X-Request-ID` to correlate logs.
      description: Error envelope returned by every failed request.
      required:
        - error
        - request_id
  responses:
    TooManyRequests:
      description: Rate limit reached. Wait `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds until the limit resets.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Requests allowed per minute.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left in the current minute.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: too_many_requests
              message: >-
                Too many requests. Retry after the number of seconds in the
                Retry-After header.
              details: {}
            request_id: db4f5a74-f1c8-4554-a36b-7dced81670a8
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key created in Admin, API. Send it as `Authorization: Bearer <key>`.
        Each key has its own permissions and optional IP allow list.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.