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/blogBase URL
https://leadgenjay.com/api/admin/blogEndpoints
POST
/api/admin/blogCreate a new blog post. Automatically generates SEO metadata unless skip_seo is true.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Post title |
| content | string | Yes | Markdown content |
| slug | string | No | URL slug (auto-generated from title if omitted) |
| excerpt | string | No | Short excerpt for previews |
| featured_image_url | string | No | Featured image URL |
| author_name | string | No | Author name (default: Jay Feldman) |
| status | string | No | "draft" | "published" | "scheduled" (default: draft) |
| scheduled_at | string | No | ISO 8601 datetime for scheduled publishing |
| category_slug | string | No | Category slug (e.g., "cold-email") |
| tags | string[] | No | Array of tag names |
| primary_keyword | string | No | Target SEO keyword |
| meta_title | string | No | Custom meta title (auto-generated if omitted) |
| meta_description | string | No | Custom meta description (auto-generated if omitted) |
| skip_seo | boolean | No | Skip 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
| Field | Type | Required | Description |
|---|---|---|---|
| id | uuid | No | Unique identifier |
| title | string | No | Post title |
| slug | string | No | URL slug |
| content | string | No | Markdown content |
| excerpt | string | null | No | Short excerpt |
| featured_image_url | string | null | No | Featured image |
| author_name | string | No | Author display name |
| status | string | No | draft | published | scheduled | archived |
| published_at | string | null | No | Publish timestamp |
| scheduled_at | string | null | No | Scheduled publish time |
| reading_time_minutes | number | No | Estimated reading time |
| meta_title | string | null | No | SEO meta title |
| meta_description | string | null | No | SEO meta description |
| primary_keyword | string | null | No | Target SEO keyword |
| view_count | number | No | Page view count |
| category | BlogCategory | null | No | Joined category |
| tags | BlogTag[] | No | Joined tags |
| created_at | string | No | Creation timestamp |
| updated_at | string | No | Last update timestamp |
BlogCategory
| Field | Type | Required | Description |
|---|---|---|---|
| id | uuid | No | Unique identifier |
| name | string | No | Display name |
| slug | string | No | URL slug |
| description | string | null | No | Category description |
| color | string | No | Hex 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).