# API Reference

The API Reference documents the public endpoints of the SpaceKeep API.

## Conventions

- All endpoints are relative to `https://api.spacekeep.dev`
- Authenticated endpoints require a valid token
- Requests and responses use JSON

## Endpoints

### Auth

| Method | Endpoint | Description |
| --- | --- | --- |
| `POST` | `/auth/signup` | Create a new account |
| `POST` | `/auth/login` | Log in with email and password |
| `GET` | `/auth/me` | Get the current user |
| `PATCH` | `/auth/me` | Update the current user's username |

### Profiles

| Method | Endpoint | Description |
| --- | --- | --- |
| `GET` | `/profiles/public` | List public profiles |
| `GET` | `/profiles/random` | Get a random public profile |
| `GET` | `/profiles/count` | Get the total user count |
| `GET` | `/profiles/me` | Get your full profile |
| `GET` | `/profiles/:username` | Get a public profile by username |
| `GET` | `/profiles/:username/github` | Get GitHub activity for a profile |
| `GET` | `/profiles/:username/badges` | Get badges for a profile |
| `PATCH` | `/profiles/me` | Update your profile |

### Profile content

| Method | Endpoint | Description |
| --- | --- | --- |
| `POST` | `/profiles/me/links` | Create a link |
| `PATCH` | `/profiles/me/links/:id` | Update a link |
| `DELETE` | `/profiles/me/links/:id` | Delete a link |
| `POST` | `/profiles/me/skills` | Create a skill |
| `DELETE` | `/profiles/me/skills/:id` | Delete a skill |
| `POST` | `/profiles/me/projects` | Create a project |
| `DELETE` | `/profiles/me/projects/:id` | Delete a project |

### Badges

| Method | Endpoint | Description |
| --- | --- | --- |
| `GET` | `/badges` | List all badges |
| `GET` | `/badges/me` | Get your earned badges |
| `POST` | `/badges/me/evaluate` | Trigger badge evaluation |

### Settings

| Method | Endpoint | Description |
| --- | --- | --- |
| `GET` | `/settings/me` | Get your settings |
| `PATCH` | `/settings/me` | Update your settings |
| `GET` | `/settings/me/export` | Export your account data |
| `POST` | `/settings/me/reset` | Reset your account data |
| `DELETE` | `/settings/me` | Delete your account |

### Uploads

| Method | Endpoint | Description |
| --- | --- | --- |
| `POST` | `/upload/avatar` | Upload an avatar image |
| `POST` | `/upload/banner` | Upload a banner image |

### Health

| Method | Endpoint | Description |
| --- | --- | --- |
| `GET` | `/health` | Basic health check |

## Related

- [Authentication](/developers/authentication/) — how to authenticate
- [Webhooks](/developers/webhooks/) — event notifications
