---
title: "REST API: Approve/Decline Space User"
type: "wiki"
space: "Axero Documentation"
author: "Anonymous User"
created: 2011-03-29T08:10:43Z
updated: 2026-09-28T01:07:31Z
tags: ["API"]
url: "https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/526/rest-api-approve-decline-space-user"
---

# REST API: Approve/Decline Space User

[Open API Guide](https://my.axerosolutions.com/spaces/5/axero-documentation/api-guide?id=526)
PUT/api/spaces/\{SpaceID\}/users/\{UserID\}/membership/status

Approve or decline a user's request to join a moderated space. Send true in the body to approve, which makes the user a member with the Member role. Send false to decline, which removes the request. The user is emailed either way. ResponseData is true whenever the user and the space exist, even when no request was pending. Declining a user who is already a member removes them from the space, and approving someone with no request changes nothing.

## 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) |
| `Content-Type` | YES | `application/json` | Must be set to `application/json` |
### Required Parameters
| Parameter | Type | Required | Location | Description |
| :--- | :--- | :--- | :--- | :--- |
| `SpaceID` | Integer | YES | Path | ID of the space which the user wants to join |
| `UserID` | Integer | YES | Path | ID of the user who wants to join space |
| `Approve` | Boolean | YES | Body | The value true or false, sent on its own as the request body: true to approve the membership request, false to decline it |
## Example

### Request Header

```
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
```

### Request URL

`https://your-site.com/api/spaces/240/users/1350/membership/status`

### Request Body

```
true
```

### Success Response

```
{
  "IsError": false,
  "ResponseMessage": "",
  "ResponseData": true
}
```

### Error Response

```
{
  "Message": "The request is invalid."
}
```
ImportantA ResponseData value of true means the user and the space exist. It does not confirm that a request was pending.
## Error Handling

| Status Code | Likely Cause | Next Action |
| :--- | :--- | :--- |
| 400 Bad Request | SpaceID or UserID in the path is not an integer, or the body is not true or false. An omitted body is not an error: it is read as false and the request is declined. | 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 cannot manage the space's members. A site administrator, an administrator of the space, or someone with the member-administration permission in it can. | Confirm the user has the required roles for this action |
| 500 Server Error | Internal failure | Retry later |
| 200 with ResponseData false | SpaceID is 0, no user has that UserID, or the body is false and the user is not in the space. A caller who cannot manage the space's members gets 403 instead. | Check both IDs. |

## 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.
