---
title: Archbee CLI Authentication Guide
slug: docs/archbee-cli-authentication-guide
docTags: 
createdAt: 2026-08-25T09:37:14.437Z
---

# Authentication Overview

Most Archbee CLI API commands require:

- `--api-key`
- `--doc-space-id`

Example:

```bash
archbee search-docs --api-key YOUR_API_KEY --doc-space-id YOUR_SPACE_ID
```

# Types of API Keys

## Space API Keys

Space API keys are scoped to a single documentation space.

You can generate them from:

```text
Space Settings → API keys
```

## Team API Keys

Team API keys start with:

```text
abteam_
```

Team admins can create them from:

```text
Settings → Developer
```

Team API keys can access multiple spaces.

# When `--doc-space-id` Is Required

Most commands require a `--doc-space-id` value even when using a team API key.

Example:

```bash
archbee get-doc --api-key abteam_xxx --doc-space-id SPACE_ID
```

# Commands That Do Not Require `--doc-space-id`

These team-level commands can run using only a team API key:

- `export`
- `display-rules`
- `create-space`
- `upload`
- `list-files`
- `delete-file`
- `move-file`
- `replace-file`

# Read-Only API Keys

Read-only team API keys cannot modify content.

Commands such as these will fail with read-only keys:

- `create-doc`
- `delete-doc`
- `publish-space`
- `update-space`

# Authentication Troubleshooting

## Invalid API Key

Verify:

- The key has not expired
- The key belongs to the correct team or space
- There are no extra spaces or quotes in the command

## Space Access Errors

Make sure the API key has permission to access the specified space.

## Command Permission Denied

Use a write-enabled team key for commands that change data.
