Skip to main content

Tutorial: Build a Blog

Create a full blog with authors, tags, categories, and published posts — then deploy it live.


Prerequisites

  • SpiderIQ credentials (Bearer token or PAT)
  • MCP server connected (see Quick Install)
  • Site settings and navigation already configured (see Build a Homepage Steps 2-3)

Step 1: Create an Author

POST /api/v1/dashboard/content/authors
{
"name": "Sarah Chen",
"slug": "sarah-chen",
"bio": "VP Engineering at TechFlow. Writes about AI, developer tools, and scaling engineering teams.",
"role": "author",
"agent_type": "human",
"avatar_url": "https://media.cdn.spideriq.ai/authors/sarah-chen.webp",
"social_links": {
"twitter": "https://twitter.com/sarahchen",
"linkedin": "https://linkedin.com/in/sarahchen"
}
}

Save the returned id — you'll need it for posts.


Step 2: Create Tags

POST /api/v1/dashboard/content/tags
{ "name": "AI", "slug": "ai" }

POST /api/v1/dashboard/content/tags
{ "name": "Engineering", "slug": "engineering" }

POST /api/v1/dashboard/content/tags
{ "name": "Product Updates", "slug": "product-updates" }

Step 3: Create a Category

POST /api/v1/dashboard/content/categories
{ "name": "Engineering Blog", "slug": "engineering-blog" }

Step 4: Write Your First Post

POST /api/v1/dashboard/content/posts
{
"title": "How We Cut Deploy Time from 3 Hours to 30 Seconds",
"slug": "deploy-time-30-seconds",
"excerpt": "Our journey from manual deployments to one-click shipping — and the 5 architectural decisions that made it possible.",
"cover_image_url": "https://media.cdn.spideriq.ai/blog/deploy-speed.webp",
"author_id": "<author-uuid-from-step-1>",
"tags": ["engineering", "product-updates"],
"body": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{ "type": "text", "text": "When we started Acme, deploys took 3 hours. Today they take 30 seconds. Here's how we got there." }
]
},
{
"type": "heading",
"attrs": { "level": 2 },
"content": [
{ "type": "text", "text": "The Problem" }
]
},
{
"type": "paragraph",
"content": [
{ "type": "text", "text": "Our deployment pipeline had 47 steps. Each step had to pass before the next could start. A single flaky test could block the entire team for hours." }
]
},
{
"type": "heading",
"attrs": { "level": 2 },
"content": [
{ "type": "text", "text": "The Solution: 5 Key Decisions" }
]
},
{
"type": "orderedList",
"content": [
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{ "type": "text", "marks": [{ "type": "bold" }], "text": "Parallel test execution" },
{ "type": "text", "text": " — Split tests across 20 workers instead of running sequentially." }
]
}
]
},
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{ "type": "text", "marks": [{ "type": "bold" }], "text": "Incremental builds" },
{ "type": "text", "text": " — Only rebuild what changed, not the entire monorepo." }
]
}
]
},
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{ "type": "text", "marks": [{ "type": "bold" }], "text": "Edge deployment" },
{ "type": "text", "text": " — Deploy to Cloudflare Workers instead of managing servers." }
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{ "type": "text", "text": "The result: 30-second deploys, zero downtime, and a much happier engineering team." }
]
}
]
}
}

Step 5: Create a Second Post

POST /api/v1/dashboard/content/posts
{
"title": "Introducing AI Code Generation in Acme",
"slug": "ai-code-generation",
"excerpt": "Write code in natural language. Our new AI engine generates production-ready code in 20+ languages.",
"cover_image_url": "https://media.cdn.spideriq.ai/blog/ai-code.webp",
"author_id": "<author-uuid>",
"tags": ["ai", "product-updates"],
"is_featured": true,
"body": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{ "type": "text", "text": "Today we're launching AI Code Generation — describe what you want in plain English, and Acme writes the code for you." }
]
}
]
}
}

Step 6: Publish Both Posts

POST /api/v1/dashboard/content/posts/{post-1-id}/publish
POST /api/v1/dashboard/content/posts/{post-2-id}/publish

Step 7: Deploy

# Apply theme (if not already done)
POST /api/v1/dashboard/templates/apply-theme
{ "theme": "default" }

# Deploy
POST /api/v1/dashboard/content/deploy

Step 8: Verify

# Blog listing page
curl -sL https://yoursite.com/blog | grep "deploy-time"

# Individual post
curl -sL https://yoursite.com/blog/deploy-time-30-seconds | grep "3 Hours"

# Featured posts (API)
GET /api/v1/content/posts/featured?limit=3

# Search posts (API)
GET /api/v1/content/posts/search?q=deploy

Blog Public API Endpoints

These are unauthenticated — perfect for external frontends:

EndpointDescription
GET /content/postsList published posts (paginated)
GET /content/posts/featuredFeatured posts
GET /content/posts/search?q=Full-text search
GET /content/posts/{slug}Single post with body
GET /content/authorsList authors
GET /content/authors/{slug}Author profile
GET /content/tagsList tags with post counts
GET /content/categoriesList categories

What's Next?