---
title: CampusZen Developer Resources
description: API docs, OpenAPI spec, and agent integration guidance for the CampusZen student social network.
canonical: https://campuszen.tech/developers
last-updated: 2026-08-26
---

# CampusZen Developer Resources

CampusZen exposes a small public REST API plus an OpenAPI document so agents and
developers can integrate programmatically.

## API

- OpenAPI spec: https://campuszen.tech/openapi.json
- API index: https://campuszen.tech/api
- llms.txt (agent guidance): https://campuszen.tech/llms.txt

## Authentication

Most endpoints require a session cookie (Appwrite `a_session_<projectId>` or the
legacy `campusx_token`). Log in with `POST /api/auth/login` (identifier +
password). OTP flow: `POST /api/auth/send-otp` then `POST /api/auth/verify-otp`.

## Public endpoints (no auth)

- `GET /api/communities` — list communities or fetch one by `name`.
- `GET /api/public/stats` — platform counts.
- `GET /api/health` — liveness probe.
- `GET /api/leaderboard` — top contributors.
- `GET /api/events` — upcoming events.

## Error format

All errors are structured JSON:

```json
{ "error": { "code": "validation_error", "message": "...", "hint": "..." } }
```
