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

# Overview

## MovieKnight backend (Node/Express + MongoDB, TMDB and Gemini proxied server-side).

### Base URL:

set `{{baseUrl}}` to `http://localhost:3000` (dev) or the deployed Render URL - `https://movieknight-server-7d8h.onrender.com` (prod).

### Base path:

every route lives under `/api` except `GET /` (health).

### Response envelope (all `/api` routes):

* **Success**:

```javascript
{ 
  "ok": true, 
  "data": {...} 
}

```

```python
{ 
  "ok": true, 
  "data": {...} 
}

```

```java
{ 
  "ok": true, 
  "data": {...} 
}

```

```curl
{ 
  "ok": true, 
  "data": {...} 
}

```

```bash
{ 
  "ok": true, 
  "data": {...} 
}

```

* **Error**:

```javascript
{ 
  "ok": false, 
  "error": "message",
  "code"?: "..."
}

```

```python
{ 
  "ok": false, 
  "error": "message",
  "code"?: "..."
}

```

```java
{ 
  "ok": false, 
  "error": "message",
  "code"?: "..."
}

```

```curl
{ 
  "ok": false, 
  "error": "message",
  "code"?: "..."
}

```

```bash
{ 
  "ok": false, 
  "error": "message",
  "code"?: "..."
}

```

### Auth:

protected routes need `Authorization: Bearer` header. The collection sends `{{token}}` as a Bearer token by default; public routes override this with No Auth. Signup and Login save the returned token into `{{token}}` automatically (see their Tests tab).

**Status codes used**: 200, 201, 400, 401, 404, 429, 500, 502, 504.

**Variables**: `baseUrl`, `token`, `userId`, `collectionId`, `tmdbId`, `personId`.