Skip to main content
POST
/
api
/
blog
curl -X POST https://api-verifier-2.onrender.com/api/blog \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My Trading Strategy",
    "contentRaw": "# Introduction\n\nThis is my trading strategy...",
    "summary": "A detailed look at my trading approach",
    "tags": ["strategy", "trading"],
    "coverImageUrl": "https://example.com/cover.jpg",
    "publish": true
  }'
{
  "_id": "65a1b2c3d4e5f6g7h8i9j0k1",
  "title": "My Trading Strategy",
  "slug": "my-trading-strategy-xyz789",
  "summary": "A detailed look at my trading approach",
  "content": "# Introduction\n\nThis is my trading strategy...",
  "contentRaw": "# Introduction\n\nThis is my trading strategy...",
  "tags": ["strategy", "trading"],
  "coverImageUrl": "https://example.com/cover.jpg",
  "authorId": "user-id-here",
  "visibility": "pending",
  "createdAt": "2024-01-15T10:00:00.000Z"
}
This endpoint requires authentication.

Request body

title
string
required
Post title
contentRaw
string
required
Post content (markdown or HTML)
summary
string
Brief summary of the post
tags
array
Array of tag strings
coverImageUrl
string
URL of the cover image
publish
boolean
If true, submits for approval. If false, saves as draft.

Response

Returns the created blog post object.
curl -X POST https://api-verifier-2.onrender.com/api/blog \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My Trading Strategy",
    "contentRaw": "# Introduction\n\nThis is my trading strategy...",
    "summary": "A detailed look at my trading approach",
    "tags": ["strategy", "trading"],
    "coverImageUrl": "https://example.com/cover.jpg",
    "publish": true
  }'
{
  "_id": "65a1b2c3d4e5f6g7h8i9j0k1",
  "title": "My Trading Strategy",
  "slug": "my-trading-strategy-xyz789",
  "summary": "A detailed look at my trading approach",
  "content": "# Introduction\n\nThis is my trading strategy...",
  "contentRaw": "# Introduction\n\nThis is my trading strategy...",
  "tags": ["strategy", "trading"],
  "coverImageUrl": "https://example.com/cover.jpg",
  "authorId": "user-id-here",
  "visibility": "pending",
  "createdAt": "2024-01-15T10:00:00.000Z"
}