1. Source Items
Source Wiki (External APIs)
  • Categories
    • List categories (paginated)
      GET
    • Create a category
      POST
    • Get a single category
      GET
    • Update a category
      PATCH
    • Delete a category
      DELETE
  • Spaces
    • List spaces in a category (paginated)
      GET
    • Create a space
      POST
    • Get a single space
      GET
    • Update a space
      PATCH
    • Delete a space
      DELETE
  • Source Items
    • ProseMirror JSON Schema Reference
    • List source items in a space (paginated)
      GET
    • Create a source item
      POST
    • Get a single source item
      GET
    • Update a source item
      PATCH
    • Delete a source item
      DELETE
  • Schemas
    • User
    • SourceDocument
    • Category
    • Space
    • SourceItem
    • PublishedCategory
    • SuccessEnvelope
    • PaginationMeta
    • PaginationLinks
    • ValidationErrorResponse
    • UnauthenticatedResponse
    • NotFoundResponse
    • ConflictResponse
  1. Source Items

Create a source item

POST
https://api-dev.thesource.wiki/api/v1/spaces/{space}/source-items
Creates a source item inside the given space. For types document or handbook, an optional contents body can be provided to immediately create the initial source document. The content_type field controls how the content is interpreted:
html (default) — stored as-is in contents
markdown — parsed to HTML via CommonMark before storing in contents
json — must be a valid ProseMirror JSON document ({"type":"doc","content":[...]}); stored in json_content
Folders do not support contents.

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Path Params

Body Params application/json

Examples

Responses

🟢201Created
application/json
Source item created successfully
Bodyapplication/json

🟠401Unauthorized
🟠404Not Found
🟠422Unprocessable Entity
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api-dev.thesource.wiki/api/v1/spaces//source-items' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "type": "document",
    "title": "Getting Started Guide",
    "status": "published",
    "content_type": "html",
    "contents": "<h1>Welcome</h1><p>This is the introduction.</p>"
}'
Response Response Example
201 - Example 1
{
    "success": true,
    "message": "string",
    "data": {
        "id": 12,
        "project_id": 7,
        "parent_id": null,
        "title": "Getting Started Guide",
        "description": "An introduction to our onboarding process",
        "slug": "getting-started-guide",
        "type": "folder",
        "status": "draft",
        "icon": "📄",
        "color": "#4F46E5",
        "public_cover_image_url": "https://example.com/cover.png",
        "sort": 0,
        "autosave": false,
        "general_access": "everyone",
        "tiptap_document_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "is_public": false,
        "public_id": "abc123",
        "has_unpublished_changes": false,
        "can_review": false,
        "requires_approval": false,
        "has_active_approval_instance": false,
        "can_publish_directly": true,
        "has_approval_for_current_draft": false,
        "first_published_at": "2019-08-24T14:15:22.123Z",
        "first_published_by": {
            "id": 1,
            "name": "Jane Doe",
            "email": "jane@example.com",
            "first_name": "Jane",
            "last_name": "Doe",
            "public_image_url": "https://example.com/avatar.png",
            "role": "admin",
            "initials": "JD",
            "status": "active",
            "created_at": "2019-08-24T14:15:22.123Z",
            "updated_at": "2019-08-24T14:15:22.123Z"
        },
        "last_published_at": "2019-08-24T14:15:22.123Z",
        "last_published_by": {
            "id": 1,
            "name": "Jane Doe",
            "email": "jane@example.com",
            "first_name": "Jane",
            "last_name": "Doe",
            "public_image_url": "https://example.com/avatar.png",
            "role": "admin",
            "initials": "JD",
            "status": "active",
            "created_at": "2019-08-24T14:15:22.123Z",
            "updated_at": "2019-08-24T14:15:22.123Z"
        },
        "created_at": "2026-01-01T00:00:00Z",
        "updated_at": "2026-01-15T12:00:00Z",
        "deleted_at": "2019-08-24T14:15:22.123Z",
        "can_edit": true,
        "can_publish": true,
        "can_delete": false,
        "author": {
            "id": 1,
            "name": "Jane Doe",
            "email": "jane@example.com",
            "first_name": "Jane",
            "last_name": "Doe",
            "public_image_url": "https://example.com/avatar.png",
            "role": "admin",
            "initials": "JD",
            "status": "active",
            "created_at": "2019-08-24T14:15:22.123Z",
            "updated_at": "2019-08-24T14:15:22.123Z"
        },
        "current_document": {
            "id": 55,
            "source_item_id": 12,
            "title": "Getting Started Guide",
            "contents": "<h1>Getting Started</h1><p>Welcome to the guide.</p>",
            "json_content": {
                "type": "doc",
                "content": [
                    {}
                ]
            },
            "status": "draft",
            "is_current": true,
            "version": 3,
            "version_note": "Major revision",
            "tiptap_version": 2,
            "word_count": 420,
            "read_time_minutes": 2,
            "featured_in_updates": false,
            "published_at": "2019-08-24T14:15:22.123Z",
            "created_at": "2019-08-24T14:15:22.123Z",
            "updated_at": "2019-08-24T14:15:22.123Z"
        },
        "latest_draft": {
            "id": 55,
            "source_item_id": 12,
            "title": "Getting Started Guide",
            "contents": "<h1>Getting Started</h1><p>Welcome to the guide.</p>",
            "json_content": {
                "type": "doc",
                "content": [
                    {}
                ]
            },
            "status": "draft",
            "is_current": true,
            "version": 3,
            "version_note": "Major revision",
            "tiptap_version": 2,
            "word_count": 420,
            "read_time_minutes": 2,
            "featured_in_updates": false,
            "published_at": "2019-08-24T14:15:22.123Z",
            "created_at": "2019-08-24T14:15:22.123Z",
            "updated_at": "2019-08-24T14:15:22.123Z"
        },
        "source_documents": [
            {
                "id": 55,
                "source_item_id": 12,
                "title": "Getting Started Guide",
                "contents": "<h1>Getting Started</h1><p>Welcome to the guide.</p>",
                "json_content": {
                    "type": "doc",
                    "content": [
                        {}
                    ]
                },
                "status": "draft",
                "is_current": true,
                "version": 3,
                "version_note": "Major revision",
                "tiptap_version": 2,
                "word_count": 420,
                "read_time_minutes": 2,
                "featured_in_updates": false,
                "published_at": "2019-08-24T14:15:22.123Z",
                "created_at": "2019-08-24T14:15:22.123Z",
                "updated_at": "2019-08-24T14:15:22.123Z"
            }
        ],
        "parent": {},
        "parents": [
            {}
        ],
        "parent_ids": [
            0
        ],
        "children_count": 4,
        "acknowledgments_count": 10,
        "acknowledgments_acknowledged_count": 7,
        "is_favorite": true
    },
    "errors": null
}
Modified at 2026-03-17 23:07:23
Previous
List source items in a space (paginated)
Next
Get a single source item
Built with