Create a Space

Create a container for documentation. New Spaces are private unless you explicitly publish them.

{
    "title": "Create a Space",
    "description": "",
    "method": "POST",
    "baseUrl": "https://app.docuwriter.ai",
    "endpoint": "/api/spaces",
    "headers": [
        {
            "key": "Authorization",
            "value": "Bearer YOUR_API_TOKEN",
            "type": "string",
            "required": true
        },
        {
            "key": "Accept",
            "value": "application/json",
            "type": "string",
            "required": true
        },
        {
            "key": "Content-Type",
            "value": "application/json",
            "type": "string",
            "required": true
        }
    ],
    "queryParams": [],
    "pathParams": [],
    "bodyType": "json",
    "requestBody": "{\n  \"name\": \"Payments documentation\",\n  \"description\": \"Architecture and integration reference\",\n  \"is_public\": false\n}",
    "formData": [],
    "rawBody": "",
    "responses": {
        "201": {
            "description": "HTTP 201: success: true, message, and data containing id, name, description, is_public, slug, sort, user_id, created_at. Public Spaces also return public_url. Illustrative JSON example; sample values are fictional. Some optional or additional resource fields may be omitted.",
            "body": "{\n  \"success\": true,\n  \"data\": {\n    \"id\": 123,\n    \"name\": \"Payments\",\n    \"description\": \"Payment service documentation\",\n    \"is_public\": false,\n    \"slug\": null,\n    \"sort\": 0,\n    \"user_id\": 123,\n    \"created_at\": \"2026-09-28T10:00:00.000000Z\"\n  },\n  \"message\": \"Space created successfully\"\n}"
        },
        "401": {
            "description": "Missing or invalid account API token.Missing or invalid account API token. Example JSON response.",
            "body": "{\n  \"message\": \"Unauthenticated.\"\n}"
        }
    }
}

Request fields

Field Requirement
name name is required, string, maximum 250 characters.
description Optional description is a nullable string
is_public is_public is boolean (default false)
slug slug is a nullable unique string, maximum 255 characters.
Behavior When a public Space omits its slug, a unique slug is generated from the name.
Behavior Private Spaces store no slug.

Usage notes

  • 403 if the account has reached its Space quota; the response includes current count and plan information.
  • 422 for invalid fields or duplicate slug.
  • Setting is_public: true publishes the Space; choose that only for content intended for external readers.
  • See Create a document.

API authentication.

Updated