> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindblix.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Secure your API requests with API keys and OAuth 2.0.

## API Keys

The simplest way to authenticate. Generate keys from your dashboard.

```bash theme={null}
curl -H "Authorization: Bearer mb_live_abc123xyz" \
  https://api.mindblix.com/v1/agents
```

### Key Types

| Type | Prefix | Use Case |
| - | - | - |
| Live | `mb_live_` | Production requests |
| Test | `mb_test_` | Development and testing |

> [!WARNING]
>
> Live keys have full access to your account. Never expose them in client-side code or public repositories.

***

## OAuth 2.0

For user-facing applications, use OAuth:

**1. Register Application**

Create an OAuth application in your dashboard settings.

**2. Authorization**

Redirect users to:

```
https://api.mindblix.com/oauth/authorize?
  client_id=YOUR_CLIENT_ID&
  redirect_uri=YOUR_REDIRECT_URI&
  response_type=code&
  scope=agents:read agents:write
```

**3. Token Exchange**

Exchange the authorization code for an access token:

```bash theme={null}
curl -X POST https://api.mindblix.com/oauth/token \
  -d "grant_type=authorization_code" \
  -d "code=AUTH_CODE" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET"
```

***

## Scopes

| Scope | Description |
| - | - |
| `agents:read` | List and view agents |
| `agents:write` | Create, update, delete agents |
| `workflows:read` | List and view workflows |
| `workflows:write` | Create, update, delete workflows |
| `integrations:manage` | Manage integrations |
| `admin` | Full account access |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.