Wiki.js

Overview

Your Wiki.js installation exposes a REST API at path /_api. It's fully documented and OpenAPI 3.0 compliant.

Open https://wiki.example.com/_api in your browser to see the list of all available endpoints and their parameters.

API Keys

In the Administration Area API Access page, click the Enable API button in the top-right corner to allow API tokens to be used.

Note

  • Disabling the API doesn't turn off the API endpoints. It only prevents API keys from being used.
  • API keys are not tied to any user. They act with the permissions of the groups chosen, so they cannot perform content actions that must be attributed to a user, such as saving a page or posting a comment. Use a personal access token for those instead.

Create API Key

  1. In the Administration Area API Access page, click the New API Key button in the top-right corner.
  2. Enter a name, expiration and select the group(s) the key will inherit the permissions from. It's recommended to create a group with permissions tailored to your use of the API.
  3. Copy the key value.

Warning

Make sure to save the key value in a safe place. It will not be shown again!

Revoke an API Key

  1. In the Administration Area API Access page, click the Revoke button next to the key to revoke.
  2. Upon confirmation, the key will no longer be usable.

Tip

  • Revoked keys can be purged from the Utilities admin page.
  • All keys can be instantly invalidated from the Utilities admin page.

Usage

To authenticate your requests, add an Authorization header with the key value as the Bearer token. e.g.:

Authorization: Bearer eyJhbGciOi...