---
title: "REST API: Bulk Add Users to Spaces"
type: "wiki"
space: "Axero Documentation"
author: "Anonymous User"
created: 2018-11-28T18:23:11Z
updated: 2026-09-28T01:07:51Z
tags: ["API"]
url: "https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/29455/rest-api-bulk-add-users-to-spaces"
---

# REST API: Bulk Add Users to Spaces

[Open API Guide](https://my.axerosolutions.com/spaces/5/axero-documentation/api-guide?id=29455)
POST/api/spaces/users

Adds multiple users to several spaces with the default member role.

## 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 |
| :--- | :--- | :--- | :--- | :--- |
| `UserIDCSV` | String | YES | Query | A comma-separated list of user IDs, with no spaces. An ID that names no user is skipped and not counted in userCount. A value that is not a whole number answers 500. |
| `SpaceIDCSV` | String | YES | Query | A comma-separated list of space IDs. spaceCount counts every ID sent. A value that is not a whole number, or an ID listed twice, answers 500. |
## Example

### Request Header

```
Authorization: Bearer YOUR_TOKEN
```

### Request URL

`https://your-site.com/api/spaces/users?userIDCSV=194,199,203&spaceIDCSV=5,6`

### Success Response

```
{
  "IsError": false,
  "ResponseMessage": "",
  "ResponseData": {
    "userCount": 1,
    "spaceCount": 1
  }
}
```

### Error Response

```
{
  "Message": "The requested resource does not support http method 'POST'."
}
```

## Error Handling

| Status Code | Likely Cause | Next Action |
| :--- | :--- | :--- |
| 400 Bad Request | Not returned by this endpoint. An empty userIDCSV or spaceIDCSV adds no one and returns a userCount and spaceCount of 0. | Verify the request payload against the required parameters |
| 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 | The caller lacks the Space administration permission \(Admin Entity View on spaces\). | Call with a site administrator token or grant the permission. |
| 500 Server Error | An ID in either list is not an integer, or a space ID is listed twice. | Send each ID once, as a whole number. |
| 404 or 405 | A required query parameter was left out, so the request matched a different action or none. The message reads No HTTP resource was found or The requested resource does not support http method. | Send every required query parameter. 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.
