> For the complete documentation index, see [llms.txt](https://developer.abacum.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.abacum.ai/api-reference/spaces/list-spaces.md).

# List Spaces

Retrieve a paginated list of spaces the authenticated user has view access to.

```json
{"openapi":"3.0.0","info":{"title":"Abacum public API","version":"1.0.0"},"tags":[{"name":"Spaces","description":"List the Spaces a user can view, find their tables, and read table data."}],"servers":[{"url":"https://api.abacum.io","description":"Prod environment"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An access token from the token endpoint, sent as `Authorization: Bearer <access_token>`. Use it to try an endpoint from this page. The token carries the permissions of its user, so use a user with the lowest role that fits the call."}},"schemas":{"Space":{"type":"object","required":["id","parent","title","emoji","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the Space."},"parent":{"type":"string","format":"uuid","nullable":true,"description":"ID of the parent Space. `null` for a top-level Space, or when you cannot view the parent."},"title":{"type":"string","description":"Title of the Space."},"emoji":{"type":"string","description":"Emoji shown next to the title of the Space."},"created_at":{"type":"string","format":"date-time","description":"When the Space was created."},"updated_at":{"type":"string","format":"date-time","description":"When the Space was last updated."}}},"DetailMessage":{"type":"object","required":["detail"],"properties":{"detail":{"type":"string"}}}},"responses":{"Forbidden":{"description":"The bearer token is missing, invalid or expired. The response has an empty body. The API answers `403` for these cases, not `401`.","headers":{"X-Request-ID":{"$ref":"#/components/headers/XRequestID"}}},"TooManyRequests20PerMinute":{"description":"Rate limit exceeded: 20 requests per minute for the same user and URL. Wait the number of seconds in the `Retry-After` header, then retry.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}},"X-Request-ID":{"$ref":"#/components/headers/XRequestID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailMessage"}}}},"InternalServerError":{"description":"An unexpected error on our side. The response has an empty body. Repeat the request, and contact support if it keeps failing.","headers":{"X-Request-ID":{"$ref":"#/components/headers/XRequestID"}}}},"headers":{"XRequestID":{"description":"Identifier of this request. Quote it when you contact support so they can find the exact request. A server-side client can set it by sending an `X-Request-ID` request header of 1 to 64 characters from `A-Za-z0-9_-`; any other value is replaced by a generated one. Browsers can read this header but cannot send their own. The value identifies a request for support, but it is not proof that only one request used it.","schema":{"type":"string"}}}},"paths":{"/public-api/spaces":{"get":{"summary":"List Spaces","description":"Retrieve a paginated list of spaces the authenticated user has view access to.","operationId":"listSpaces","tags":["Spaces"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number (1-indexed). A value that is not a positive integer, or that is beyond the last page, returns `404`."},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"description":"Items per page. A value above 100 is capped at 100, and a value that is not a positive integer is ignored, so the default applies."}],"responses":{"200":{"description":"A paginated list of spaces.","content":{"application/json":{"schema":{"type":"object","required":["data","metadata"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Space"}},"metadata":{"type":"object","required":["pagination"],"properties":{"pagination":{"type":"object","required":["count","next","previous"],"properties":{"count":{"type":"integer"},"next":{"type":"string","format":"uri","nullable":true},"previous":{"type":"string","format":"uri","nullable":true}}}}}}}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not found - `page` is not a valid page number or is beyond the last page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailMessage"}}}},"429":{"$ref":"#/components/responses/TooManyRequests20PerMinute"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```
