Skip to content
Developers
GuidesAPI reference
slimwiki.comGet an API key

Guides

  • Quickstart
  • Authentication
  • Errors
  • Pagination
  • Rate limits
  • Content format
  • Versioning

Tools and agents

  • CLI
  • MCP server
  • Agent skill

API reference

  • Overview

Users

  • Retrieve the key ownerget

Accounts

  • List accountsget

Wikis

  • List wikisget
  • Retrieve a wikiget

Pages

  • List pages in a wikiget
  • Search pages in a wikiget
  • Find a page by slug or hashget
  • Create a pagepost
  • Retrieve a pageget
  • Delete a pagedelete
  • Archive a pagepost
  • Restore a pagepost

Guides

Errors

A failed request returns a 4xx or 5xx status and a JSON body that says what went wrong. Every error has the same shape.

On this page

  • The error body
  • Error codes
  • 404 also means “not visible to this key”
  • Handling errors

The error body

Response · 404
{
  "error": {
    "code": "not_found",
    "message": "The resource does not exist, or this API key cannot see it.",
    "request_id": "2f9d6c1e-7a4b-4d3c-8e5f-1a2b3c4d5e6f"
  }
}
Fields of the error body
FieldDescription
error
object
—
error.code
string

A stable, machine-readable error code.

One of invalid_request, unauthorized, insufficient_scope, forbidden, not_found, conflict, rate_limited, internal_error.

error.message
string

A description for people. The wording may change.

error.details
object[]optional

For invalid_request: the fields that failed validation.

error.details[].field
stringoptional
—
error.details[].message
stringoptional
—
error.request_id
string | nulloptional

Quote this when contacting support.

For invalid_request, details names the fields that failed validation:

Response · 400
{
  "error": {
    "code": "invalid_request",
    "message": "The request is not valid.",
    "details": [
      {
        "field": "title",
        "message": "Invalid value."
      }
    ],
    "request_id": "2f9d6c1e-7a4b-4d3c-8e5f-1a2b3c4d5e6f"
  }
}

Error codes

Error codes and their HTTP status
StatusCodeMeaning
400invalid_requestA parameter or the request body is missing or not valid. details lists the fields that failed.
401unauthorizedThe API key is missing, invalid, revoked or expired.
403insufficient_scopeA read-only key was used for a request that writes.
403forbiddenThe key's owner is not allowed to make this change.
404not_foundThe resource does not exist, or this API key cannot see it.
409conflictThe request conflicts with the current state of the resource.
429rate_limitedToo many requests. Wait for the time given in Retry-After, then try again.
500internal_errorSomething went wrong on SlimWiki's side.

Two codes share the status 403. insufficient_scope is about the key: it is read-only and the request writes. forbidden is about the person: the key's owner is not allowed to make the change. See Authentication.

404 also means “not visible to this key”

404 not_found is returned when a resource does not exist, and also when it exists but the key cannot see it. The response does not tell the two cases apart.

If a request for something you know exists returns 404, check that the key's owner has access to it in SlimWiki.

Handling errors

  • Decide what to do from code, together with the HTTP status. Codes are stable.
  • Show or log message, but do not match on it. Its wording may change.
  • Log request_id and quote it when you contact support.
  • On 429 rate_limited, wait before retrying. See Rate limits.

Previous

Authentication
How API keys work: sending one, what it can access, scopes, expiry and revoking.

Next

Pagination
The shape of list responses and how to page through pages and search results.

SlimWiki Developers

slimwiki.com