API Documentation

Welcome to the InkWell API. This guide covers everything you need to integrate with our publishing platform. All requests should be made over HTTPS. Calls made over plain HTTP will fail.

⚠️
Base URL: All API endpoints are relative to https://api.inkwell.io/v1

Authentication

InkWell uses API keys to authenticate requests. You can view and manage your API keys in your dashboard. Include your key in the Authorization header as a Bearer token.

Request Header Authorization: Bearer <YOUR_API_KEY>
⚠️
Never expose your API keys in client-side code or public repositories. They grant full access to your account.

Rate Limits

The API is rate-limited to ensure fair usage. Limits are applied per API key:

PlanRequests / MinuteBurst
Free6010
Pro30050
EnterpriseCustomCustom

When you exceed the rate limit, you will receive a 429 Too Many Requests response. The X-RateLimit-Remaining header indicates how many requests you have left.

Endpoints

GET /posts List all published posts

Retrieves a paginated list of posts. Supports filtering by category, author, and date range.

Query Parameters

ParameterTypeDescription
limitintegerNumber of results (1-100). Default: 20
offsetintegerPagination offset. Default: 0
categorystringFilter by category slug
author_idstringFilter by author UUID

Example Response

200 OK { "data": [ { "id": "pst_8x7k9m2n", "title": "Building Scalable Blog APIs", "slug": "building-scalable-blog-apis", "excerpt": "How we architected InkWell to handle 10k+ requests...", "published_at": "2024-12-15T10:00:00Z", "read_time": 6, "author": { "id": "usr_1a2b3c", "name": "Sarah Kim" } } ], "meta": { "total": 128, "has_more": true } }
POST /posts Create a new post

Creates a new draft post. Requires write permissions.

Request Body (JSON)

FieldTypeDescription
title requiredstringPost title (max 100 chars)
content requiredstringMarkdown or HTML content
categorystringCategory slug
tagsarrayArray of tag strings
publishbooleanSet to true to publish immediately

Example Request

POST Body { "title": "My First InkWell Post", "content": "# Hello World\n\nThis is a test post...", "category": "technology", "tags": ["api", "tutorial"], "publish": false }
GET /posts/:slug Get post by slug

Fetches a single post by its URL slug. Returns full content, metadata, and comments.

200 OK { "id": "pst_8x7k9m2n", "slug": "building-scalable-blog-apis", "title": "Building Scalable Blog APIs", "content": "Full markdown content here...", "published_at": "2024-12-15T10:00:00Z", "views": 4521, "likes": 189 }
PUT /posts/:slug Update a post

Updates an existing post. Only fields provided in the payload will be modified (partial update).

Returns the updated post object on success.

DELETE /posts/:slug Delete a post

Permanently deletes a post. This action cannot be undone. Returns 204 No Content on success.

Error Handling

InkWell uses conventional HTTP status codes to indicate the success or failure of a request. Codes in the 2xx range indicate success, 4xx indicate client errors, and 5xx indicate server errors.

CodeMeaningDescription
400Bad RequestMissing or invalid parameters
401UnauthorizedInvalid or missing API key
403ForbiddenInsufficient permissions for this action
404Not FoundResource does not exist
429Rate LimitToo many requests, slow down
500Server ErrorSomething went wrong on our end

Error Response Format

4xx/5xx Response { "error": { "code": "validation_failed", "message": "The 'title' field is required and must not exceed 100 characters.", "details": { "title": ["value.too_long"] } } }

SDKs & Tools

We provide official SDKs to make integration easier:

LanguagePackageRepository
JavaScript/TypeScript@inkwell/api-clientGitHub
Pythoninkwell-pythonGitHub
Gogithub.com/inkwell/go-sdkGitHub
cURLBuilt-inExamples