GET /api/v1/me
Return the authenticated user's context, onboarding state, and live document quota for the active workspace.
Auth
API key or session auth.
Request
curl https://api.opendocs.cc/api/v1/me \
-H "Authorization: Bearer od_live_xxxxx"
Query parameters
| Name | Required | Notes |
|---|---|---|
workspaceId | no | If provided, quota.documents is computed for this workspace. The caller must be an active member — if not, quota.documents is silently returned as null. When omitted, quota reflects the caller's onboarding workspace (fine for single-workspace users). |
Multi-workspace callers should pass ?workspaceId= so the quota
matches the workspace they're about to publish to.
/publish/batch always re-checks against the explicit workspaceId
in the request body, so this field is purely advisory.
Success response
{
"authenticated": true,
"userId": "usr_123",
"onboarding": {
"hasUsername": true,
"hasWorkspace": true,
"username": "pat",
"workspace": {
"id": "ws_123",
"name": "Acme",
"slug": "acme",
"defaultVisibility": "workspace"
},
"completed": true
},
"quota": {
"documents": {
"plan": "free",
"limit": 10,
"used": 3,
"remaining": 7
}
}
}
Fields
onboarding
hasUsername/hasWorkspace/completed— three boolean flags the dashboard uses to decide which onboarding step to show next.completedistrueonce both of the others are.username— the user's profile handle. Appears inopendocs.cc/@<username>, not in document URLs.workspace.slug— the workspace slug. This is what document URLs look like:opendocs.cc/<workspace.slug>/<post-slug>.workspace.defaultVisibility— the workspace's default visibility for new posts (private|workspace|public).
quota.documents
The document-cap state for the active workspace:
| Field | Type | Description |
|---|---|---|
plan | "free" | "pro" | "team" | Effective plan tier for this workspace |
limit | number | null | Max published documents allowed. null = unlimited |
used | number | Currently-published documents in this workspace |
remaining | number | null | limit - used, clamped at 0. null = unlimited |
When the tier is Pro or Team (unlimited), limit and remaining are null —
JSON can't serialize Infinity, so null is the signal.
quota.documents is null when the user hasn't completed onboarding yet (no
workspace to quote against).
Why it matters
The CLI uses this endpoint during login and before batch publishes to:
- validate the API key
- discover the current username and workspace ID
- run a client-side pre-check against
quota.documentsbefore sending a batch publish — if the batch would exceed the cap, the CLI aborts before hitting the network.
Common errors
Missing or invalid API key:
{
"error": "unauthorized"
}
Returns 401.
Related pages
- Plans and limits — what determines the quota numbers
- POST /api/v1/publish — where
document_limitenforcement fires - Errors and pagination — the
document_limiterror shape