Créez des expériences CMS headless avec RobotSpeed. Récupérez vos articles générés par IA via l'API REST et intégrez-les facilement dans vos applications.
X-API-Key header to requestsBase URL: https://robot-speed.com/api/public
API keys start with rs_. Include in X-API-Key header.
rs_c42abff3f9d5c35dfb66118caf451eacedd8846caf493e45f2279b02da11cf8e# List all published articles
curl -X GET 'https://robot-speed.com/api/public/articles?limit=10' \
-H 'X-API-Key: rs_your_api_key_here'// Fetch all published articles
const response = await fetch('https://robot-speed.com/api/public/articles', {
headers: {
'X-API-Key': 'rs_your_api_key_here'
}
});
const { data } = await response.json();
console.log(data.articles);⚠️ Never expose keys in client-side code. Use environment variables.
/api/public/articlesReturns published articles with pagination.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Max 100 |
offset | integer | 0 | Pagination offset |
status | string | published | published, approved, pending |
debug | boolean | false | Include debug info in response |
{
"success": true,
"data": {
"articles": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "How to Build a SaaS in 2025",
"excerpt": "Learn the best practices for building a SaaS...",
"slug": "how-to-build-saas-2025",
"status": "published",
"seo_keywords": ["saas", "startup", "2025"],
"meta_description": "Complete guide to building a SaaS in 2025",
"target_keyword": "build saas",
"featured_image_url": "https://xmphiscbmexupobiaivk.supabase.co/storage/v1/object/public/article-images/ai-images/featured-image-123.png",
"featured_image_alt": "SaaS dashboard screenshot",
"word_count": 1200,
"reading_time": 6,
"categories": ["startup", "technology"],
"tags": ["saas", "business"],
"created_at": "2025-01-15T10:00:00.000Z",
"published_at": "2025-01-15T12:00:00.000Z",
"platform_url": "https://yourblog.com/how-to-build-saas-2025",
"platform_post_id": "wp-12345"
}
],
"pagination": {
"total": 150,
"limit": 50,
"offset": 0
}
}
}• List endpoint excludes content for performance
• excerpt = first ~160 chars of article text
• For full HTML, use GET /api/public/articles/:id
/api/public/articles/:idReturns a single article by ID.
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | The unique identifier of the article |
{
"success": true,
"data": {
"article": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "How to Build a SaaS in 2025",
"content": "<h1>How to Build a SaaS in 2025</h1><p>Building a SaaS requires careful planning...</p>",
"excerpt": "Learn the best practices...",
"slug": "how-to-build-saas-2025",
"status": "published",
"seo_keywords": ["saas", "startup"],
"meta_description": "Complete guide...",
"target_keyword": "build saas",
"featured_image_url": "https://xmphiscbmexupobiaivk.supabase.co/storage/v1/object/public/article-images/ai-images/featured-image-123.png",
"featured_image_alt": "SaaS dashboard",
"word_count": 1200,
"reading_time": 6,
"categories": ["startup", "technology"],
"tags": ["saas", "business"],
"internal_links": [
{
"text": "Getting Started Guide",
"url": "/getting-started"
}
],
"created_at": "2025-01-15T10:00:00.000Z",
"published_at": "2025-01-15T12:00:00.000Z",
"approved_at": "2025-01-15T11:30:00.000Z",
"platform_url": "https://yourblog.com/article",
"platform_post_id": "wp-12345"
}
}
}Note: Includes internal_links and approved_at (not in list endpoint)
Receive HTTP POST requests when articles are published, updated, or deleted.
Configure in Dashboard → Settings → Webhooks
| Event | Description |
|---|---|
article.published | New article published |
article.updated | Published article modified |
article.deleted | Article deleted |
POST https://your-endpoint.com/webhook
Content-Type: application/json
User-Agent: RobotSpeed-Webhooks/1.0{
"event": "article.published",
"timestamp": "2025-01-15T12:34:56.789Z",
"website_id": "46fb1544-e8d7-4c71-9015-b8f1ae5b3984",
"data": {
"article_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "How to Build a SaaS in 2025",
"slug": "how-to-build-saas-2025",
"published_at": "2025-01-15T12:00:00.000Z",
"api_url": "/api/public/articles/550e8400-e29b-41d4-a716-446655440000",
"content": {
"html": "<h1>How to Build a SaaS in 2025</h1><p>Building a SaaS...</p>",
"markdown": "# How to Build a SaaS in 2025\n\nBuilding a SaaS...",
"text": "How to Build a SaaS in 2025 Building a SaaS..."
},
"meta_description": "Complete guide to building a SaaS in 2025",
"seo_keywords": ["saas", "startup", "2025"],
"target_keyword": "build saas",
"categories": ["startup", "technology"],
"tags": ["saas", "business"],
"featured_image_url": "https://xmphiscbmexupobiaivk.supabase.co/storage/v1/object/public/article-images/ai-images/featured-image-123.png",
"featured_image_alt": "SaaS dashboard",
"status": "published",
"created_at": "2025-01-15T10:00:00.000Z",
"user_id": "user-uuid"
}
}{
"event": "article.updated",
"timestamp": "2025-01-15T14:30:00.789Z",
"website_id": "46fb1544-e8d7-4c71-9015-b8f1ae5b3984",
"data": {
"article_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "How to Build a SaaS in 2025 [Updated]",
"slug": "how-to-build-saas-2025",
"updated_at": "2025-01-15T14:30:00.000Z",
"updated_fields": ["title", "content", "meta_description"],
"api_url": "/api/public/articles/550e8400-e29b-41d4-a716-446655440000",
"content": {
"html": "<h1>How to Build a SaaS in 2025 [Updated]</h1><p>Updated content...</p>",
"markdown": "# How to Build a SaaS in 2025 [Updated]\n\nUpdated content...",
"text": "How to Build a SaaS in 2025 [Updated] Updated content..."
},
"meta_description": "Updated guide to building a SaaS",
"seo_keywords": ["saas", "startup", "2025"],
"target_keyword": "build saas",
"categories": ["startup", "technology"],
"tags": ["saas", "business"],
"featured_image_url": "https://xmphiscbmexupobiaivk.supabase.co/storage/v1/object/public/article-images/ai-images/featured-image-123.png",
"featured_image_alt": "SaaS dashboard",
"status": "published",
"created_at": "2025-01-15T10:00:00.000Z",
"user_id": "user-uuid"
}
}{
"event": "article.deleted",
"timestamp": "2025-01-15T16:00:00.789Z",
"website_id": "46fb1544-e8d7-4c71-9015-b8f1ae5b3984",
"data": {
"article_id": "550e8400-e29b-41d4-a716-446655440000",
"deleted_at": "2025-01-15T16:00:00.000Z",
"api_url": "/api/public/articles/550e8400-e29b-41d4-a716-446655440000"
}
}Note: article.deleted only contains basic fields (no content/metadata)
• Respond within 10 seconds
• 3 retries with exponential backoff on failure
• Webhook disabled after 10 consecutive failures
• Events may be delivered multiple times (handle idempotency)
import requests
# Your API key
api_key = "rs_your_api_key_here"
headers = {"X-API-Key": api_key}
# Fetch all published articles
response = requests.get(
"https://robot-speed.com/api/public/articles",
headers=headers
)
data = response.json()
articles = data["data"]["articles"]
for article in articles:
print(f"{article['title']} - {article['published_at']}")<?php
$api_key = "rs_your_api_key_here";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://robot-speed.com/api/public/articles");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: " . $api_key
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
$articles = $data['data']['articles'];
foreach ($articles as $article) {
echo $article['title'] . " - " . $article['published_at'] . "\n";
}// app/blog/page.tsx - Next.js 14 Server Component
export default async function BlogPage() {
const response = await fetch('https://robot-speed.com/api/public/articles', {
headers: {
'X-API-Key': 'YOUR_API_KEY_HERE'
},
next: { revalidate: 3600 } // Cache for 1 hour
});
const { data } = await response.json();
const articles = data.articles;
return (
<div className="grid gap-6">
{articles.map((article) => (
<article key={article.id} className="border p-6 rounded">
<h2 className="text-2xl font-bold mb-2">{article.title}</h2>
<p className="text-gray-600 mb-4">{article.excerpt}</p>
<div dangerouslySetInnerHTML={{ __html: article.content }} />
</article>
))}
</div>
);
}| Code | Meaning | |
|---|---|---|
200 | Success | |
400 | Bad Request | |
401 | Invalid/missing API key | |
404 | Resource not found | |
500 | Internal Server Error | Something went wrong on our end |
{
"error": "Invalid or missing API key",
"message": "Please provide a valid API key in the X-API-Key header"
}{
"error": "Internal server error",
"details": "Database connection failed"
}Can't find what you're looking for? We're here to help.