> ## 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 news post

> One post with its Markdown content. The public API only returns published posts visible to guests, and answers 404 for everything when the News section is set to members only.

**Permission:** `modules.news.posts.read`



## OpenAPI

````yaml /docs/modules-api.yaml get /application/modules/news/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:
  /application/modules/news/posts/{post}:
    get:
      tags:
        - News
      summary: Get a news post
      description: >-
        One post with its Markdown content. The public API only returns
        published posts visible to guests, and answers 404 for everything when
        the News section is set to members only.


        **Permission:** `modules.news.posts.read`
      operationId: getNewsPost
      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/NewsPost'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - data
                  - meta
              example:
                data:
                  id: 4
                  title: Our new control panel is live
                  slug: new-control-panel
                  url: https://billing.example.com/news/new-control-panel
                  description: >-
                    Short interruptions on Saturday night while we upgrade the
                    network.
                  icon: null
                  layout: authenticated
                  og_image: https://billing.example.com/storage/news/frankfurt.png
                  meta_title: null
                  meta_description: null
                  reactions_enabled: true
                  reaction_counts: {}
                  published_at: '2026-04-03T09:08:43Z'
                  created_at: '2026-04-03T09:08:43Z'
                  updated_at: '2026-04-03T09:08:43Z'
                  status: published
                  visibility: all
                  author: null
                  content: >-
                    # Welcome to Our News Article


                    This is a sample news article written in Markdown. You can
                    edit this content using the editor below.


                    ## Getting Started


                    Replace this content with your own news article. You can use
                    standard Markdown syntax:


                    - **Bold text** for emphasis

                    - *Italic text* for subtle emphasis

                    - [Links](https://example.com) to external resources

                    - > Blockquotes for important information

                    - `Inline code` for technical terms


                    ## Features


                    - Full Markdown support

                    - Responsive design

                    - SEO optimization

                    - User reactions (if enabled)

                    - Custom permissions


                    ## Code Examples


                    ```javascript


                    ...
                meta:
                  request_id: 71ebac1e-3b9e-4516-b0a3-bc474dd53e76
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_found:
                  summary: Unknown, unpublished or members only
                  value:
                    error:
                      code: not_found
                      message: News post not found.
                      details: {}
                    request_id: 3f6c2a1e-8b4d-4f7a-9c2e-5d1b7a9e0c42
components:
  schemas:
    NewsPost:
      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'
        icon:
          type:
            - string
            - 'null'
        layout:
          type: string
          enum:
            - app
            - authenticated
          description: Page layout used on the site.
        og_image:
          type:
            - string
            - 'null'
          description: Absolute image URL.
        meta_title:
          type:
            - string
            - 'null'
        meta_description:
          type:
            - string
            - 'null'
        reactions_enabled:
          type: boolean
        reaction_counts:
          type:
            - object
            - 'null'
          properties: {}
          description: >-
            Reaction emoji to count. `null` when reactions are off or counts are
            hidden in the News settings.
          additionalProperties:
            type: integer
        published_at:
          type:
            - string
            - 'null'
          format: date-time
        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.
        visibility:
          type: string
          enum:
            - all
            - guest_only
            - authenticated_only
          description: Key API only. Who can see the post on the site.
        author:
          type:
            - object
            - 'null'
          properties:
            id:
              type: integer
            name:
              type: string
          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:
    Unauthorized:
      description: Missing, invalid or inactive API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: No Authorization header
              value:
                error:
                  code: unauthorized
                  message: Bearer token required.
                  details: {}
                request_id: 9aca26ca-e06f-4725-8e4b-4385d6c03422
            invalid:
              summary: Unknown or inactive key
              value:
                error:
                  code: unauthorized
                  message: Invalid or inactive token.
                  details: {}
                request_id: 8802a669-6f06-453e-a1d8-0b81621167c3
    Forbidden:
      description: >-
        The key lacks the permission for this endpoint, or the request IP is not
        in the key allow list.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            forbidden:
              summary: Missing permission
              value:
                error:
                  code: forbidden
                  message: Insufficient permissions for this action.
                  details: {}
                request_id: 6bf04242-ac61-44b9-9dbf-b63a114b54c8
            ip_not_allowed:
              summary: IP not allowed
              value:
                error:
                  code: ip_not_allowed
                  message: Access denied from this IP address.
                  details: {}
                request_id: 3f6c2a1e-8b4d-4f7a-9c2e-5d1b7a9e0c42
  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.