Skip to main content
POST
/
api
/
posts
curl -X POST https://api.dyeink.com/api/posts \
  -H "Content-Type: application/json" \
  -H "Cookie: session=your_session_token" \
  -d '{
    "title": "My First Blog Post",
    "slug": "my-first-blog-post",
    "content": "# Welcome\n\nThis is my first blog post!",
    "excerpt": "An introduction to my blog",
    "coverImage": "https://example.com/cover.jpg",
    "published": true
  }'
{
  "id": "507f1f77bcf86cd799439011",
  "userId": "507f191e810c19729de860ea",
  "title": "My First Blog Post",
  "slug": "my-first-blog-post",
  "content": "# Welcome\n\nThis is my first blog post!",
  "excerpt": "An introduction to my blog",
  "coverImage": "https://example.com/cover.jpg",
  "published": true,
  "publishedAt": "2026-03-04T10:30:00.000Z",
  "views": 0,
  "shares": 0,
  "createdAt": "2026-03-04T10:30:00.000Z",
  "updatedAt": "2026-03-04T10:30:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/subratomandal/dyeink/llms.txt

Use this file to discover all available pages before exploring further.

Creates a new blog post for the authenticated user. The post can be saved as a draft or published immediately.

Authentication

This endpoint requires authentication. Include a valid session token in the request.

Request Body

title
string
required
The title of the post
slug
string
required
URL-friendly identifier for the post. Must be unique for the user.
content
string
The main content of the post (supports markdown)
excerpt
string
A short summary or description of the post
coverImage
string
URL of the post’s cover image
published
boolean
default:"false"
Whether the post should be published immediately. If true, publishedAt will be set to the current timestamp.

Response

id
string
Unique identifier for the created post
userId
string
ID of the user who owns the post
title
string
The title of the post
slug
string
URL-friendly identifier for the post
content
string
The main content of the post
excerpt
string
Short summary of the post
coverImage
string
URL of the cover image
published
boolean
Publication status
publishedAt
string | null
ISO 8601 timestamp of when the post was published, or null if unpublished
views
number
Number of views (starts at 0)
shares
number
Number of shares (starts at 0)
createdAt
string
ISO 8601 timestamp of when the post was created
updatedAt
string
ISO 8601 timestamp of when the post was last updated
curl -X POST https://api.dyeink.com/api/posts \
  -H "Content-Type: application/json" \
  -H "Cookie: session=your_session_token" \
  -d '{
    "title": "My First Blog Post",
    "slug": "my-first-blog-post",
    "content": "# Welcome\n\nThis is my first blog post!",
    "excerpt": "An introduction to my blog",
    "coverImage": "https://example.com/cover.jpg",
    "published": true
  }'
{
  "id": "507f1f77bcf86cd799439011",
  "userId": "507f191e810c19729de860ea",
  "title": "My First Blog Post",
  "slug": "my-first-blog-post",
  "content": "# Welcome\n\nThis is my first blog post!",
  "excerpt": "An introduction to my blog",
  "coverImage": "https://example.com/cover.jpg",
  "published": true,
  "publishedAt": "2026-03-04T10:30:00.000Z",
  "views": 0,
  "shares": 0,
  "createdAt": "2026-03-04T10:30:00.000Z",
  "updatedAt": "2026-03-04T10:30:00.000Z"
}