Back to User Guide

Create an API key for the Headless REST API


Raytha offers a Headless REST API for its content automatically. Learn how to create an API key and make a REST API call.

Raytha comes out of the box with a headless mode, providing you CRUD access to the content via a REST API.

Create an api key

In order to use the API, you need an API key. API keys are tied to administrative users and inherit that user's permissions. This means you can have different API keys with corresponding access levels. You may want to create an admin account and/or role just for API usage.

To create an API key, click Admins on the left side navigation under Settings and then edit or create the admin you want to add an API key for. In the right side navigation, click Api keys and then click Create api key.

Create an api key


Copy and paste the resulting API key as you will not be able to refer back to this page to view it again (API keys are hashed).

View the swagger / openapi spec

The API lives at yourwebsite.com/raytha/api which will bring up a Swagger UI for you to browse the API.

Swagger UI for raytha



In order to make API calls, you need to authorize them via the header of the request using your API key. You can test this out by clicking Authorize on the swagger UI and make some sample API calls.

If you are making calls via code or a no-code tool, you have to set the X-API-KEY header in your request with the api key you saved from the first step above.

Request header
X-API-KEY: your-api-key-here


Continue learning