---
title: "REST API: Get All Spaces"
type: "wiki"
space: "Axero Documentation"
author: "Anonymous User"
created: 2015-03-31T13:59:16Z
updated: 2026-09-28T01:12:26Z
tags: ["API"]
url: "https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/4772/rest-api-get-all-spaces"
---

# REST API: Get All Spaces

[Open API Guide](https://my.axerosolutions.com/spaces/5/axero-documentation/api-guide?id=4772)
GET/api/spaces

List the spaces the caller is a member of, plus the public top-level spaces. Use it to show people which spaces they can open or join.

## Request

### Request Header
| Header | Required | Value | Description |
| :--- | :--- | :--- | :--- |
| `Authorization` | YES | `Bearer YOUR_TOKEN` | Bearer token for the authenticated user. [Learn how to create Bearer tokens](https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/108973/creating-bearer-tokens). |
### Optional Parameters
| Parameter | Type | Required | Location | Description |
| :--- | :--- | :--- | :--- | :--- |
| `Status` | Integer | NO | Query | Status of the spaces to return: PendingWorkflow = 0, Published = 1, Declined = 3, All = 7. Default: 1 \(Published\); a value that is not a number is read as 1. |
| `Visibility` | Integer | NO | Query | Specifies the visibility of the spaces to be returned. All spaces are returned by default.<br><br>Private = 0,<br>Public = 1,<br>All = 2,<br>Isolated = 3.<br><br>A number that is not one of these returns no spaces. A value that is not a number is ignored and every visibility is returned. |
| `GetNonMemberPublicSpacesOnly` | Boolean | NO | Query | If true, only the spaces you're a member of and public top-level spaces are returned. If false, a site administrator gets every space, and anyone else still gets their member spaces and the public top-level spaces. True by default. A value that is not true or false is ignored, as if the parameter were left out. |
| `IsMobile` | Boolean | NO | Query | Set to true to return the short list the mobile app uses: each space carries only SpaceID, SpaceName, SpaceIconURL, and SpaceVisibilityText. A value that is not true or false is read as false. |
| `AddTopLevelCommunity` | Boolean | NO | Query | Set to true to include the top-level community as the first item in the response. A value that is not true or false is read as false. |
| `TruncateLimit` | Integer | NO | Query | Maximum number of characters in each space name. Set to 0 to leave names whole. Descriptions are cut at 600 characters while the RemoveHTMLinSpaceList system property is on, which is the default. A value that is not a whole number is ignored and names are left whole. |
| `GetAllSpaces` | Boolean | NO | Query | Set to true to return every space when you can create or update Journeys; for anyone else it has no effect. The Visibility filter still applies. A value that is not true or false is read as false. |
## Example

### Request Header

```
Authorization: Bearer YOUR_TOKEN
```

### Request URL

`https://your-site.com/api/spaces`

### Success Response

```
{
  "IsError": false,
  "ResponseMessage": "",
  "ResponseData": [
    {
      "SpaceID": 313,
      "ParentSpaceID": 0,
      "IsFeatured": false,
      "Stub": "product-team",
      "TotalMembers": 1,
      "CreatedBy": 630,
      "UserID": 630,
      "SpaceName": "Product Team",
      "Description": "Space for the product team to share files, tasks, and announcements.",
      "UserName": "jane.doe",
      "UserFirstName": "Jane",
      "UserLastName": "Doe",
      "UserEmail": "jane.doe@example.com",
      "StatusID": 1,
      "MembershipType": 0,
      "SpaceVisibility": 0,
      "DateCreated": "2026-09-05T04:01:35.43",
      "IsAttendee": false,
      "EventID": 0,
      "InviteSpaceID": 0,
      "WorkFlowID": 0,
      "CurrentWorkFlowStepID": 0,
      "IsArticleWorkflowActive": false,
      "IsBlogWorkflowActive": false,
      "IsEventWorkflowActive": false,
      "IsForumWorkflowActive": false,
      "IsWikiWorkflowActive": false,
      "IsFileWorkflowActive": false,
      "IsPhotoWorkFlowActive": false,
      "IsJobWorkflowActive": false,
      "IsVideoWorkFlowActive": false,
      "EnableForums": false,
      "EnableJobs": false,
      "EnableSurveys": false,
      "EnablePhotos": false,
      "EnableTaskManager": false,
      "EnableFiles": false,
      "EnableWiki": false,
      "EnableEvents": false,
      "EnableArticles": false,
      "EnableBlogs": false,
      "EnableVideos": false,
      "EnableIssueTracker": false,
      "EnableFileControl": false,
      "GroupPictureFileName": "",
      "SpaceIconFileName": "",
      "SpaceIconURL": "https://your-site.com/assets/Themes/default/images/space-default.png",
      "MediaServerID": 90,
      "SpaceMediaServerRootURL": "https://your-site.com/Assets/Uploaded-CMS-Files",
      "UserMediaServerRootURL": "https://your-site.com/Assets/Uploaded-Photos",
      "SpaceURL": "/spaces/313/product-team",
      "UserAvatarFileName": "avatar.jpg",
      "UpdatedByUserID": 0,
      "InvitationExpiryInDays": 0,
      "DisableWallEmailNotifications": false,
      "AutoSubscribeEmail": true,
      "SpaceImageURL": "https://your-site.com/assets/Themes/default/images/space-default.png",
      "IsArticleCommentWorkflowActive": false,
      "IsBlogEntryCommentWorkflowActive": false,
      "IsEventCommentWorkflowActive": false,
      "IsForumPostWorkflowActive": false,
      "IsPhotoCommentWorkflowActive": false,
      "IsVideoCommentWorkflowActive": false,
      "IsWikiCommentWorkflowActive": false,
      "IsFileCommentWorkflowActive": false,
      "IsIdeaCommentWorkflowActive": false,
      "IsJobCommentWorkflowActive": false,
      "EnableUpcomingBirthdaysControl": false,
      "EnableContentReadConfirmation": false,
      "HasManageSpacePerm": false,
      "AutoSubscribeForums": false,
      "EnableCalendarImportFromExternalSources": false,
      "EnableEventsFromOtherSpacesInCalendar": false,
      "EnableContentExpiration": false,
      "EnableTaskRating": false,
      "ActivityURL": "/spaces/313/product-team",
      "NewContentCount": 0,
      "DescriptionUnProcessed": "Space for the product team to share files, tasks, and announcements.",
      "SyncAChannelInChat": false,
      "RecursivelyPublic": false,
      "TenantID": 0
    }
  ]
}
```

### Error Response

```
You do not have sufficient permissions to perform this action.
```

## Error Handling

| Status Code | Likely Cause | Next Action |
| :--- | :--- | :--- |
| 400 Bad Request | Not returned: the endpoint has no required parameters. | No action needed. |
| 401 Unauthorized | Missing or invalid Bearer token. | Check token validity. [Learn how to create Bearer tokens →](https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/108973/creating-bearer-tokens) |
| 403 Forbidden | Not returned: spaces you cannot see are left out of the list. | No action needed. |
| 500 Server Error | Internal failure. | Retry later. |

## Rate Limits

While Axero does not enforce hard rate limits by default, we recommend the following best practices to ensure optimal performance:

- **Sustained Request Rate:** Do not exceed 5 API calls per second
- **Sequential Processing:** Wait for each request to complete before sending the next in automated workflows
- **Concurrent Connections:** If parallel processing is required, limit to 3 or fewer simultaneous requests
- **Response Timeout:** Ensure API responses complete within 15 seconds during testing

Axero may implement temporary rate restrictions if excessive API usage affects overall site performance. For high-volume integrations, contact Axero to discuss your requirements.
