API Reference

Every public endpoint on the SpaceKeep API, with parameters, responses, and examples.

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

Conventions

  • All endpoints are relative to https://api.spacekeep.dev
  • Requests and responses use JSON
  • Endpoints marked No in the Auth column need no token
  • Your token is sent as the access_token cookie and expires after 7 days

Try it now

These three endpoints are unauthenticated. Pick your language:

curl -s https://api.spacekeep.dev/health \
  -H "Accept: application/json"
const res = await fetch("https://api.spacekeep.dev/health", {
  headers: { Accept: "application/json" },
});
console.log(await res.json());
import requests

res = requests.get("https://api.spacekeep.dev/health", timeout=10)
res.raise_for_status()
print(res.json())

GET /health responds with:

{
  "status": "ok",
  "service": "spacekeep-api",
  "timestamp": "2026-01-01T00:00:00.000Z"
}

Profile object

Public profile endpoints return this shape:

{
  "id": "prof_e73b522356d2ff181156",
  "displayName": "Space Dev",
  "bio": null,
  "avatarUrl": "/profile/nopicture.png",
  "bannerUrl": null,
  "location": null,
  "theme": "minimal",
  "views": 0,
  "likes": 0,
  "profilePublic": true,
  "allowIndexing": true,
  "showAnalyticsBadge": false,
  "userId": "cmuo6ttoh0000l2opsq3jeyit",
  "createdAt": "2026-10-01T13:49:45.882Z",
  "updatedAt": "2026-10-01T13:49:45.882Z",
  "user": { "username": "spacedev" }
}

The username you use in /profiles/:username is user.username.

Endpoints

Health

Method Endpoint Auth Description
GET /health No Basic health check

Auth

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

Profiles

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

GET /profiles/count returns a single integer:

{ "total": 21 }

Profile content

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

Badges

Method Endpoint Auth Description
GET /badges No List all badges with stats
GET /badges/me Yes Get your earned badges
POST /badges/me/evaluate Yes Trigger badge evaluation
PATCH /badges/me/dismiss-discovery Yes Dismiss badge discovery banner

Settings

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

Uploads

Method Endpoint Auth Description
POST /upload/avatar Yes Upload an avatar image
POST /upload/banner Yes Upload a banner image

Network

The Network is the social surface: posts, feeds, follows, and discovery. All endpoints are relative to https://api.spacekeep.dev/social.

Method Endpoint Auth Description
GET /social/feed Yes Following or For You feed
GET /social/explore Yes Discovery overview
GET /social/suggestions Yes People you may know
GET /social/posts/:postId No A single post
GET /social/posts/:postId/comments Yes Comments on a post
GET /social/posts/by-author/:authorId Yes One author's posts
GET /social/followers/:userId Yes Who follows this account
GET /social/following/:userId Yes Who this account follows
GET /social/relationships/:userId Yes Counts plus your relationship
GET /social/notifications Yes Recent notifications
GET /social/notifications/unread-count Yes Unread badge count
GET /community/posts No Recent public posts, no session
POST /social/posts Yes Create a post
POST /social/uploads/images Yes Upload a post image
POST /social/follow/:userId Yes Follow
POST /social/posts/:postId/reactions Yes Toggle an appreciation
POST /social/posts/:postId/saves Yes Toggle a save
POST /social/posts/:postId/comments Yes Comment or reply
POST /social/comments/:commentId/reactions Yes React to a comment
POST /social/reports Yes Report content
POST /social/notifications/read Yes Mark notifications read
DELETE /social/follow/:userId Yes Unfollow
DELETE /social/posts/:postId Yes Delete your post
DELETE /social/comments/:commentId Yes Delete your comment

GET /social/posts/:postId and GET /community/posts need no session, but a globally restricted account still cannot reach them — JwtAuthGuard consults Global Enforcement first. Every other Network endpoint requires a session.

The actor is always the session user. No Network endpoint accepts an author, actor, owner, or recipient id from the request body, and none accepts a recipient as a query parameter.

Errors

Failed requests return a non-2xx status and a JSON body. Check the status code before parsing the response.