Lead Gen JayLead Gen Jay

Blog API Documentation

Create, update, and manage blog posts programmatically.

Authentication

All endpoints require the x-api-secret header with your BLOG_API_SECRET value.

curl -H "x-api-secret: YOUR_SECRET" \
  https://leadgenjay.com/api/admin/blog

Base URL

https://leadgenjay.com/api/admin/blog

Endpoints

POST/api/admin/blog

Create a new blog post. Automatically generates SEO metadata unless skip_seo is true.

Request Body

FieldTypeRequiredDescription
titlestringYesPost title
contentstringYesMarkdown content
slugstringNoURL slug (auto-generated from title if omitted)
excerptstringNoShort excerpt for previews
featured_image_urlstringNoFeatured image URL
author_namestringNoAuthor name (default: Jay Feldman)
statusstringNo"draft" | "published" | "scheduled" (default: draft)
scheduled_atstringNoISO 8601 datetime for scheduled publishing
category_slugstringNoCategory slug (e.g., "cold-email")
tagsstring[]NoArray of tag names
primary_keywordstringNoTarget SEO keyword
meta_titlestringNoCustom meta title (auto-generated if omitted)
meta_descriptionstringNoCustom meta description (auto-generated if omitted)
skip_seobooleanNoSkip AI metadata generation

Example: Create a Scheduled Post

curl -X POST https://leadgenjay.com/api/admin/blog \
  -H "x-api-secret: YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "How to Write Cold Emails That Get Replies",
    "content": "## Introduction\n\nCold email is...",
    "status": "scheduled",
    "scheduled_at": "2026-03-17T13:00:00Z",
    "category_slug": "cold-email",
    "primary_keyword": "cold email",
    "tags": ["cold-email", "outreach"]
  }'

Response

{
  "success": true,
  "post": {
    "id": "uuid",
    "title": "How to Write Cold Emails That Get Replies",
    "slug": "how-to-write-cold-emails-that-get-replies",
    "status": "scheduled",
    "scheduled_at": "2026-03-17T13:00:00Z",
    "published_at": null,
    "reading_time_minutes": 7,
    "meta_title": "Cold Emails That Get Replies: Proven Framework",
    "meta_description": "Learn the exact cold email...",
    "primary_keyword": "cold email",
    "created_at": "2026-03-09T..."
  },
  "seo_generated": true,
  "google_indexed": false
}

Schemas

BlogPost
FieldTypeRequiredDescription
iduuidNoUnique identifier
titlestringNoPost title
slugstringNoURL slug
contentstringNoMarkdown content
excerptstring | nullNoShort excerpt
featured_image_urlstring | nullNoFeatured image
author_namestringNoAuthor display name
statusstringNodraft | published | scheduled | archived
published_atstring | nullNoPublish timestamp
scheduled_atstring | nullNoScheduled publish time
reading_time_minutesnumberNoEstimated reading time
meta_titlestring | nullNoSEO meta title
meta_descriptionstring | nullNoSEO meta description
primary_keywordstring | nullNoTarget SEO keyword
view_countnumberNoPage view count
categoryBlogCategory | nullNoJoined category
tagsBlogTag[]NoJoined tags
created_atstringNoCreation timestamp
updated_atstringNoLast update timestamp
BlogCategory
FieldTypeRequiredDescription
iduuidNoUnique identifier
namestringNoDisplay name
slugstringNoURL slug
descriptionstring | nullNoCategory description
colorstringNoHex color for UI badges

Scheduled Publishing

Posts with status: "scheduled" and a scheduled_at timestamp are automatically published by a Vercel cron job that runs every hour.

When published, the cron sets published_at, revalidates the blog pages, and requests Google indexing.

Schedule format: ISO 8601 datetime in UTC (e.g., 2026-03-17T13:00:00Z for 8am ET).