Spaces
Spaces organize wins and can be shared with collaborators. Each collaborator has read_only, owner_edit, or full_access access.
List spaces
Section titled “List spaces”GET /api/v1/spacesReturns a paginated list of spaces the authenticated user owns or can access, in display order.
Example
Section titled “Example”curl https://app.myhypedoc.com/api/v1/spaces \ -H "Authorization: Bearer $HYPEDOC_TOKEN"[ { "id": 1, "name": "Work", "emoji": "💼", "position": 0, "wins_count": 28, "owner_id": "24bf52cb-f1a8-4b69-a69f-9c456a3bd652", "access_level": "owner", "created_at": "2026-01-01T00:00:00Z", "updated_at": "2026-01-15T10:00:00Z" }, { "id": 2, "name": "Personal", "emoji": "🌱", "position": 1, "wins_count": 12, "owner_id": "85a1c981-ae8e-4278-893d-c80489926162", "access_level": "read_only", "created_at": "2026-01-01T00:00:00Z", "updated_at": "2026-01-10T08:00:00Z" }]Get a space
Section titled “Get a space”GET /api/v1/spaces/:idReturns a single space by ID.
owner_id identifies the user charged for the space and all wins inside it. access_level is owner for owned spaces, otherwise read_only, owner_edit, or full_access.
Create a space
Section titled “Create a space”POST /api/v1/spacesRequest body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
space[name] | string | Yes | Space name |
space[emoji] | string | No | Emoji icon for the space |
space[position] | integer | No | Display order (lower = first) |
Example
Section titled “Example”curl -X POST https://app.myhypedoc.com/api/v1/spaces \ -H "Authorization: Bearer $HYPEDOC_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "space": { "name": "Side Project", "emoji": "🚀", "position": 2 } }'{ "id": 3, "name": "Side Project", "emoji": "🚀", "position": 2, "wins_count": 0, "owner_id": "24bf52cb-f1a8-4b69-a69f-9c456a3bd652", "access_level": "owner", "created_at": "2026-03-01T12:00:00Z", "updated_at": "2026-03-01T12:00:00Z"}Update a space
Section titled “Update a space”PATCH /api/v1/spaces/:idAccepts the same fields as create. Only the space owner can update it.
Delete a space
Section titled “Delete a space”DELETE /api/v1/spaces/:idReturns 204 No Content on success. Only the space owner can delete it. Deleting a space also deletes all wins in that space.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
401 | Missing or invalid token |
402 | Free plan limit reached (3 spaces) |
404 | Space not found |
422 | Validation error (e.g. missing name) |