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

# API Overview

> The Enver REST API base URL, versioning, and common conventions.

# API Overview

All API endpoints are under:

```
https://api-staging.enver-os.xyz/api/v1
```

## Request format

* All requests must include `Content-Type: application/json` when sending a body
* Authentication via `Authorization: Bearer <token>` header
* All responses are JSON

## Response format

**Success:**

```json theme={null}
{ "success": true, "data": { ... } }
```

**Error:**

```json theme={null}
{ "success": false, "error": "Description of the error" }
```

## HTTP status codes

| Code  | Meaning                        |
| ----- | ------------------------------ |
| `200` | Success                        |
| `201` | Resource created               |
| `400` | Bad request / validation error |
| `401` | Unauthenticated                |
| `403` | Forbidden (wrong scope or IP)  |
| `404` | Resource not found             |
| `429` | Rate limited                   |
| `500` | Server error                   |

## Rate limiting

The API is limited to **100 requests per minute per IP**. Rate limit headers are included in every response:

```http theme={null}
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1724160000
Retry-After: 10
```

## Endpoint summary

| Method   | Endpoint                       | Auth            | Description                |
| -------- | ------------------------------ | --------------- | -------------------------- |
| `POST`   | `/envs`                        | `write:secrets` | Push encrypted secrets     |
| `GET`    | `/envs/share/:projectId`       | `read:secrets`  | Get shares for decryption  |
| `DELETE` | `/envs/:projectId`             | `write:secrets` | Delete environment secrets |
| `POST`   | `/tokens`                      | Clerk session   | Create API token           |
| `GET`    | `/tokens`                      | Clerk session   | List tokens                |
| `DELETE` | `/tokens/:id`                  | Clerk session   | Revoke token               |
| `GET`    | `/projects/:id/members`        | `read:secrets`  | List project members       |
| `POST`   | `/projects/:id/members`        | `admin`         | Add member                 |
| `DELETE` | `/projects/:id/members/:email` | `admin`         | Remove member              |
| `GET`    | `/auth/me`                     | Any valid token | Get current user           |
