Base URL
Base URL: https://kneady.dev/api/v1
Authentication
All endpoints require authentication using an API key passed in the x-api-key
header.
Request Header
x-api-key: your-api-key
GET /sites/{siteId}/posts
Retrieve all posts for a site. Posts are returned in descending order by creation date.
Posts Path Parameters
siteId
: The unique identifier of the site
Posts Query Parameters
limit
(optional): Number of posts to return. If not provided, returns all posts. Example:/sites/\{siteId\}/posts?limit=10
Posts Response
Success Response (200 OK)
{ "count": number, "posts": [ { "id": "string", "title": "string", "description": "string", "image": "string", "imageBlurhash": "string", "slug": "string", "link": "string", "createdAt": "string (ISO date)", "updatedAt": "string (ISO date)", "published": boolean, "author": "string" } ], "url": "string", "customUrl": "string" }
Posts Error Responses
400 Bad Request
: Missing x-api-key header or siteId401 Unauthorized
: Invalid API key404 Not Found
: No posts found500 Internal Server Error
: Server error while processing request
GET /sites/{siteId}/posts/{postId}
Retrieve a specific post by ID.
GET Path Parameters
siteId
: The unique identifier of the sitepostId
: The unique identifier of the post
GET Response
Success Response (200 OK)
{ "title": "string", "description": "string", "image": "string", "imageBlurhash": "string", "slug": "string", "createdAt": "string (ISO date)", "updatedAt": "string (ISO date)", "published": boolean, "author": "string", "link": "string", "url": "string", "customUrl": "string" }
GET Error Responses
400 Bad Request
: Possibly missing x-api-key header401 Unauthorized
: Invalid API key404 Not Found
: Post not found500 Internal Server Error
: Server error while processing request
PATCH /sites/{siteId}/posts/{postId}
Update a specific post by ID.
PATCH Path Parameters
siteId
: The unique identifier of the sitepostId
: The unique identifier of the post
PATCH Request Body
All fields are optional. Only provided fields will be updated.
Request Body
{ "title": "string", "description": "string", "image": "string", "slug": "string", "content": "string", "published": boolean, "link": "string", "author": "string" }
PATCH Notes
- If
slug
is provided as an empty string or null, a new random 7-character slug will be generated - When an image is updated, a new blurhash will be automatically generated
PATCH Response
Success Response (200 OK)
{ "title": "string", "description": "string", "image": "string", "imageBlurhash": "string", "slug": "string", "createdAt": "string (ISO date)", "updatedAt": "string (ISO date)", "published": boolean, "author": "string", "link": "string", "url": "string", "customUrl": "string" }
PATCH Error Responses
-
400 Bad Request
: Missing x-api-key header or required parameters -
401 Unauthorized
: Invalid API key -
500 Internal Server Error
: Server error while processing request
DELETE /sites/{siteId}/posts/{postId}
Delete a specific post by ID.
DELETE Path Parameters
siteId
: The unique identifier of the sitepostId
: The unique identifier of the post
DELETE Response
Success Response (200 OK)
Post successfully deleted
DELETE Error Responses
400 Bad Request
: Missing x-api-key header or required parameters401 Unauthorized
: Invalid API key500 Internal Server Error
: Server error while processing request