Developer Documentation
jekcms API Reference
Integrate jekcms into your applications. Comprehensive REST API for content management, media uploads, webhook triggers, and statistics.
https://yourdomain.com/api/v1
Authentication
All API requests require an API key that must be sent with every request. Generate your key from the jekcms admin panel under Settings → API.
Header Authentication (Recommended)
cURL Example
Security note: Never embed your API key in client-side code (JavaScript, HTML). Use it only in server-side integrations or automation tools like n8n.
Posts
/api/v1/posts
List all posts
/api/v1/posts/{id}
Get single post
/api/v1/posts
Create new post
/api/v1/posts/{id}
Update post
/api/v1/posts/{id}
Delete post
Parameters — GET /posts
Create Post — POST /posts
n8n integration: Use HTTP Request node in n8n to post to jekcms. Method: POST, URL: /api/v1/posts, Headers: X-API-Key. Prepare JSON body with Set node.
Media
/api/v1/media
Upload image
/api/v1/media
Media library
/api/v1/media/{id}
Delete media
jekcms automatically converts uploaded images to AVIF and WebP formats. The original file is also retained. The response includes all three URLs.
Upload Image — POST /media
Response Example
Categories
/api/v1/categories
List all categories
/api/v1/categories/{slug}
Category detail
Category List Response
Webhooks
jekcms sends an HTTP POST request to a URL when specific events occur. Combined with n8n, you can build powerful automation workflows.
/api/v1/webhook/trigger
Trigger webhook
/api/v1/webhook/list
List webhooks
Webhook Payload Structure
Trigger Events
Using with n8n: Create a Webhook node in n8n, save the generated URL as your webhook address in jekcms. When post.published fires, the n8n workflow starts automatically.
Statistics
/api/v1/stats
Site metrics
/api/v1/stats/posts
Post statistics
/api/v1/stats/traffic
Traffic summary
GET /stats Response
Error Codes
All error responses use the same structure: {"status":"error","code":401,"message":"..."}. The table below lists possible error codes and recommended solutions.
| Code | Meaning | Resolution |
|---|---|---|
| 400 | Bad Request | Check JSON format and required fields. |
| 401 | Unauthorized | Send your API key in the X-API-Key header. |
| 403 | Forbidden | Your API key does not have permission to access this resource. |
| 404 | Not Found | Check the ID or slug. |
| 422 | Validation Error | Check the errors array in the response for field-level details. |
| 429 | Too Many Requests | Rate limit exceeded. Check the Retry-After header and wait accordingly. |
| 500 | Internal Server Error | An unexpected server-side error occurred. If the problem persists, contact support. |
Retry on 429: Use exponential backoff — wait 1s, then 2s, then 4s between retries. In n8n, use the Wait node for this.
Start Using the API
Purchase jekcms, generate your API key, and start building integrations within minutes.
View Pricing- Full REST API access
- n8n automation integration
- AVIF/WebP auto-conversion
- Webhook support
- API key management