---
title: "REST API: Create Space"
type: "wiki"
space: "Axero Documentation"
author: "Anonymous User"
created: 2011-03-29T06:16:03Z
updated: 2026-09-28T01:09:55Z
tags: ["API"]
url: "https://my.axerosolutions.com/spaces/5/axero-documentation/wiki/view/508/rest-api-create-space"
---

# REST API: Create Space

[Open API Guide](https://my.axerosolutions.com/spaces/5/axero-documentation/api-guide?id=508)
POST/api/spaces

Create a space. When the space is created, ResponseMessage is ToBePublished and ResponseData is its SpaceID. A name another space already uses answers 200 with ResponseMessage Duplicate and ResponseData 0.

## 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 |
| :--- | :--- | :--- | :--- | :--- |
| `Space JSON` | String | YES | Body | The space to create, as a JSON object \(a set of named fields and their values\) like the example below. SpaceName and Description are required. A field whose value has the wrong type, such as "abc" for a true or false field, is ignored and keeps its default. |
| `Description` | String | YES | Body | Summary text displayed on the space landing page, describing the space's purpose to members. |
| `SpaceName` | String | YES | Body | Name of the space. It must not match another space's name: a name already in use answers 200 with ResponseMessage Duplicate and ResponseData 0. |
### Optional Parameters
| Parameter | Type | Required | Location | Description |
| :--- | :--- | :--- | :--- | :--- |
| `EnableArticles` | Boolean | NO | Body | Set "articles" module on/off |
| `EnableBlogs` | Boolean | NO | Body | Set "blogs" module on/off |
| `EnableEvents` | Boolean | NO | Body | Set "events" module on/off |
| `EnableFiles` | Boolean | NO | Body | Set "files" module on/off |
| `EnableForums` | Boolean | NO | Body | Set "forums" module on/off |
| `EnableIssueTracker` | Boolean | NO | Body | Set "issues" module on/off |
| `EnablePhotos` | Boolean | NO | Body | Set "photos" module on/off |
| `EnableVideos` | Boolean | NO | Body | Set "videos" module on/off |
| `EnableWiki` | Boolean | NO | Body | Set "wiki" module on/off |
| `IsFeatured` | Boolean | NO | Body | Make the space featured |
| `SpaceVisibility` | Integer | NO | Body | It defines the visibility of the space. Accepted values are:<br><br>Private = 0,<br>Public = 1,<br>Isolated = 3. A number outside these values is saved as sent. |
| `IsArticleWorkflowActive` | Boolean | NO | Body | Set "article" workflow on/off |
| `IsBlogWorkflowActive` | Boolean | NO | Body | Set "blog" workflow on/off |
| `IsEventWorkflowActive` | Boolean | NO | Body | Set "event" workflow on/off |
| `IsFileWorkflowActive` | Boolean | NO | Body | Set "file" workflow on/off |
| `IsForumWorkflowActive` | Boolean | NO | Body | Set "forum" workflow on/off |
| `IsPhotoWorkFlowActive` | Boolean | NO | Body | Set "photo" workflow on/off |
| `IsVideoWorkFlowActive` | Boolean | NO | Body | Set "video" workflow on/off |
| `IsWikiWorkflowActive` | Boolean | NO | Body | Set "wiki" workflow on/off |
| `MembershipType` | Integer | NO | Body | Specifies the space moderation. Accepted values are:<br><br>Unmoderated = 0,<br>Moderated = 1. Any other number except 0 is saved as Moderated \(1\). |
| `ParentSpaceID` | Integer | NO | Body | ID of the space to create this space under. Default: 0, a top-level space. Creating a space under another needs permission to create nested spaces in that space. |
| `StatusID` | Integer | NO | Body | Ignored: the site sets the status. A site administrator's new space is always Published \(1\). For anyone else, an active space workflow can hold the space for approval. |
## Example

### Request Header

```
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
```

### Request URL

`https://your-site.com/api/spaces`

### Request Body

```
{
  "Description": "A collaborative workspace for the engineering team to share knowledge and updates.",
  "SpaceName": "Engineering Hub"
}
```

### Success Response

```
{
  "IsError": false,
  "ResponseMessage": "ToBePublished",
  "ResponseData": 466
}
```

### Error Response

```
HTTP 500 with an empty body
```

## Error Handling

| Status Code | Likely Cause | Next Action |
| :--- | :--- | :--- |
| 500 Server Error | A required parameter is missing. A request with no body answers 400; a body without a required field fails with 500 instead of reporting the missing value. | Verify the request against the required parameters before treating the 500 as a server fault. |
| 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 does not have permission to create spaces, or to create a space under the parent space. | Confirm the user has the required roles for this action. |
| 400 Bad Request | The body is the JSON literal null, or is not valid JSON. | Send a JSON space object. |
| 200 with ResponseMessage Duplicate | Another space already has this SpaceName. ResponseData is 0 and no space is created. | Choose another name, or check it first with Check Space Name Availability. |

## 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.
