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

# Overview

> API authentication, base URL, and conventions

## Base URL

```
http://localhost:8080
```

In production, set `HOSTNAME` to your public URL (e.g., `https://stashy.example.com`).

## Authentication

All `/v1/*` endpoints require a Bearer token:

```bash theme={null}
Authorization: Bearer <your-api-key>
```

Generate API keys from the web dashboard after signing in with Google OAuth.

## Endpoints

| Method   | Path                       | Auth   | Description                 |
| -------- | -------------------------- | ------ | --------------------------- |
| `POST`   | `/v1/files`                | Bearer | Upload a file               |
| `GET`    | `/v1/files/{id}`           | Bearer | Download a file             |
| `PUT`    | `/v1/files/{id}`           | Bearer | Replace a file (owner only) |
| `PATCH`  | `/v1/files/{id}`           | Bearer | Update a file (owner only)  |
| `DELETE` | `/v1/files/{id}`           | Bearer | Delete a file (owner only)  |
| `POST`   | `/v1/files/{id}/publish`   | Bearer | Make a file public          |
| `POST`   | `/v1/files/{id}/unpublish` | Bearer | Remove public access        |

## OpenAPI Spec

The full OpenAPI 3.1 spec is available at [`spec.stashy.sh/openapi.yaml`](https://spec.stashy.sh/openapi.yaml) or at `/openapi.yaml` on your running instance.
