List documents in a Space

Retrieve a Space hierarchy before reading or changing individual pages.

{
    "title": "List documents in a Space",
    "description": "",
    "method": "GET",
    "baseUrl": "https://app.docuwriter.ai",
    "endpoint": "/api/spaces/{space}/documents",
    "headers": [
        {
            "key": "Authorization",
            "value": "Bearer YOUR_API_TOKEN",
            "type": "string",
            "required": true
        },
        {
            "key": "Accept",
            "value": "application/json",
            "type": "string",
            "required": true
        }
    ],
    "queryParams": [],
    "pathParams": [
        {
            "key": "space",
            "value": "Numeric Space ID.",
            "type": "integer",
            "required": true
        }
    ],
    "bodyType": "none",
    "requestBody": "",
    "formData": [],
    "rawBody": "",
    "responses": {
        "200": {
            "description": "HTTP 200: success: true, message, and data array ordered by item order. Each item contains id, name, type, parent_id, space_id, url, created_at, updated_at; public Spaces add public_url. Content is not included. parent_id connects items into a tree; the list can include folders. Illustrative JSON example; sample values are fictional. Some optional or additional resource fields may be omitted.",
            "body": "{\n  \"success\": true,\n  \"data\": [\n    {\n      \"id\": 456,\n      \"name\": \"Payment lifecycle\",\n      \"parent_id\": null,\n      \"space_id\": 123\n    }\n  ],\n  \"message\": \"Documents retrieved 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 notes

  • Replace 123 with the numeric Space ID.
  • No pagination parameter is defined.

Usage notes

  • The token account must be able to manage the Space, even if the Space is public.
  • 403 otherwise.
  • Use a returned item ID in Read a document.
  • Do not assume every item in the array has a document body.

API authentication.

Updated