Skip to main content

API Reference

Reference guide for interacting with our platform programmatically.

Introduction

The Null MDX API allows you to interact with your content and assets programmatically. It follows RESTful principles and uses JSON for communication.

Base URL

https://api.null-mdx.com/v1

Authentication

To use the API, you first need an API key. You can generate one in your project settings. Include your API key in the Authorization header prefixed with Bearer.

Authorization: Bearer YOUR_API_KEY

Endpoints

Content

Fetch Posts Retrieve a list of all blog posts. GET /posts

Get Post by Slug Fetch a single post's content and metadata. GET /posts/:slug

Assets

List Assets List all assets currently in your storage bucket. GET /assets

Upload Image Upload a new image to the assets folder. POST /assets

Error Handling

Standard HTTP response codes are used.

  • 200: Success
  • 401: Unauthorized
  • 404: Not Found
  • 500: Server Error