> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.makeswift.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.makeswift.com/_mcp/server.

# Authentication

> Create an app and get your API key to authenticate with the Makeswift REST API.

Create an app and get your API key to authenticate with the Makeswift REST API.

To use the Makeswift REST API, you'll need to create an app and obtain an API key. This guide walks you through the setup process.

> **Note**
>
> While both API Key and Bearer Token authentication methods are supported, you must use **only one** authentication method per request. Requests that include both an API Key and Bearer Token will be rejected.

## Create an app

To create your first app:

1. Open **Settings** in the Makeswift builder
2. Navigate to **Workspace** → **Apps**
3. Click **Create app**

![Apps settings page](/_fern-img/ddd8e37da318b101a67ab9ed970962a15629abd1991c45cfec24462282d27edf.webp)

4. Enter a **Name** for your app
5. Optionally, choose an **Icon** and add a **Description**
6. Click **Continue**

![Create app dialog](/_fern-img/c6dadaeee60dbbe5beb3b64b7a7460b13b3fee2d9e588039a3e38d110fd17f80.webp)

## Copy your API key

After creating your app, you'll be shown your API key. This is the only time the key will be displayed.

> **Warning**
>
> Save your API key immediately. It won't be shown again after you close the
> dialog. If you lose it, you'll need to create a new app.

![App API key dialog](/_fern-img/db4b4574442035fb5d783e761066eb964e05066e5b533b0c8181fd90af1cc0c5.webp)

1. Click the **Copy** button or **Copy and Close** to copy the API key
2. Store the key securely (e.g., in environment variables or a secrets manager)

## Get your Site ID

Many API endpoints require a Site ID. To find it:

1. Open **Settings** in the Makeswift builder
2. Navigate to **Site** → **Site**
3. Copy the **Site Id** value

![Site settings showing Site Id](/_fern-img/f476cc0159193d0557b2657cf9e74db86c0c38559ef7e511f205d1dbe4e59791.webp)

## Get your Workspace ID

Some API endpoints operate at the workspace level and require a Workspace ID:

1. Open **Settings** in the Makeswift builder
2. Navigate to **Workspace** → **Workspace**
3. Copy the **Workspace Id** value

![Workspace settings showing Workspace Id](/_fern-img/182aac248e8e0906ce285cf13aafe1b2bf2d83716029b24c1327e957379efbfc.webp)

## Using your API key

Include your API key in the `x-api-key` header with every request:

```bash
curl https://api.makeswift.com/v2/sites \
  -H "x-api-key: your-api-key"
```

> **Note**
>
> Keep your API key secure and never expose it in client-side code. Use
> environment variables to store your key in your application.

## Next steps

Now that you have your API key, you can start making requests to the API:

* [List your sites](/developer/api-reference/rest/sites/list-sites)
* [List your pages](/developer/api-reference/rest/pages/list-pages)
* [Configure locales](/developer/api-reference/rest/locales/create-locale)