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

# API Overview

> Base URL, authentication, endpoints, and error handling for the Snipp API.

## Overview

The Snipp API is the public, third-party integration surface. Use it to upload media, manage your files, fetch posts, and build apps and SDKs on top of Snipp.

For first-party clients (for example, the Snipp mobile app) that need account-level features such as the discover feed, likes, comments, blocking, and profile editing, use the [Relay API](/relay-reference/introduction) instead.

## Base URL

The default base URL is:

```
api.snipp.gg
```

`api.snipp.gg` is proxied and load-balanced through Cloudflare. It picks the closest healthy region for you, so it's the fastest option for most requests. Because Cloudflare proxies the traffic, uploads on this host are capped at **100 MB per request**.

### Regional endpoints

For uploads larger than 100 MB (or when you want to pin a specific region), use a regional endpoint instead. Regional endpoints are unproxied, so there is no 100 MB cap. Your file size limit is whatever your plan allows.

| Region  | Host                     |
| ------- | ------------------------ |
| EU West | `eu-west-1.api.snipp.gg` |
| US West | `us-west-1.api.snipp.gg` |

You can mix and match. Use `api.snipp.gg` for everyday calls and switch to a regional endpoint only when an upload exceeds 100 MB.

To confirm which region served a request, hit [`GET /region`](/api-reference/endpoint/region) on any host.

## Authentication

Include your API key in the `api-key` header with every request. See [Authentication](/authentication) for details on locating your key and security best practices.

```
api-key: YOUR_API_KEY
```

## Endpoints

| Method   | Endpoint         | Description                                                      |
| -------- | ---------------- | ---------------------------------------------------------------- |
| `GET`    | `/users/{id}`    | Fetch a user profile. Use `@me` for your own account.            |
| `GET`    | `/posts/{code}`  | Fetch a single post by share code.                               |
| `POST`   | `/upload`        | Upload an image or video file.                                   |
| `GET`    | `/uploads`       | List your 30 most recent uploads.                                |
| `PATCH`  | `/editUpload`    | Update title, description, or privacy of a post.                 |
| `POST`   | `/appendUpload`  | Add files to an existing album.                                  |
| `DELETE` | `/deleteUpload`  | Delete a file or post.                                           |
| `POST`   | `/report-post`   | Report a post.                                                   |
| `POST`   | `/report-user`   | Report a user.                                                   |
| `GET`    | `/gifs`          | Browse public GIFs across Snipp, newest first. No auth required. |
| `GET`    | `/usage-history` | Fetch your daily upload activity for the last 365 days.          |
| `GET`    | `/analytics`     | Fetch your analytics over time plus lifetime totals. Plus only.  |
| `GET`    | `/region`        | Return the region serving the request. No auth required.         |

Looking for the discover feed, likes, comments, blocking, profile editing, avatar uploads, or anything that powers the full Snipp experience? See the [Relay API](/relay-reference/introduction).

## Rate Limits

Rate limits apply per endpoint, not per account. See [Rate Limits](/concepts/rate-limits) for the full table and details on handling `429` responses.

## Error Format

All errors return a JSON object with an `error` field:

```json theme={null}
{
  "error": "Unauthorized. No api-key header found."
}
```

## HTTP Status Codes

| Code  | Meaning                                                               |
| ----- | --------------------------------------------------------------------- |
| `200` | Success                                                               |
| `400` | Bad request. Invalid input, unsupported file type, or file too large. |
| `401` | Unauthorized. Missing or invalid API key.                             |
| `403` | Forbidden. Account suspended or insufficient permissions.             |
| `404` | Not found                                                             |
| `413` | Payload too large. File exceeds your plan's size limit.               |
| `429` | Rate limit exceeded                                                   |
| `500` | Internal server error                                                 |
