---
title: "REST API: Get User Space IDs"
type: "wiki"
space: "Axero Documentation"
author: "Anonymous User"
created: 2011-03-29T06:43:47Z
updated: 2026-10-02T12:56:34Z
tags: ["API"]
url: "https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/514/rest-api-get-user-space-ids"
---

# REST API: Get User Space IDs

[Open API Guide](https://my.axerosolutions.com/spaces/5/axero-documentation/api-guide?id=514)
GET/api/users/\{UserID\}/spaces/ids

List the IDs of the spaces a user belongs to, limited to the spaces the caller can view.

## 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). |
### Required Parameters
| Parameter | Type | Required | Location | Description |
| :--- | :--- | :--- | :--- | :--- |
| `UserID` | Integer | YES | Path | Unique identifier for a particular user. An ID that belongs to no user returns an empty list. |
| `Status` | Integer | YES | Query | Specifies the status of the spaces to be returned.<br><br>Pending Workflow = 0,<br>Published = 1,<br>Declined = 3,<br>All = 7. Any other number is matched against each space's status in the same way, so a number that no joined space has returns an empty list. |
## Example

### Request Header

```
Authorization: Bearer YOUR_TOKEN
```

### Request URL

`https://your-site.com/api/users/376/spaces/ids?status=1`

### Success Response

```
{
  "IsError": false,
  "ResponseMessage": "",
  "ResponseData": [
    291
  ]
}
```

### Error Response

```
{
  "Message": "No HTTP resource was found that matches the request URI 'https://your-site.com/api/users/376/spaces/ids'."
}
```

## Error Handling

| Status Code | Likely Cause | Next Action |
| :--- | :--- | :--- |
| 400 Bad Request | UserID or Status is not an integer. | Send UserID and Status as whole numbers. |
| 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 | This endpoint does not return 403: spaces the caller cannot view are left out of the list. | No action needed. |
| 500 Server Error | Internal failure. | Retry later. |
| 404 Not Found | Status was left out, so the request matched no route. The message reads No HTTP resource was found. | Send Status in the query string. The message does not mean the item you asked for is missing. |

## 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.
