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

Update a source item

PATCH
https://api-dev.thesource.wiki/api/v1/source-items/{sourceItem}
All fields are optional — only send what you want to change. Providing contents will create or update the current source document. Use content_type to control how contents is interpreted (html, markdown, or json); defaults to html.

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/jsonRequired

Examples

Responses

🟢200OK
application/json
Source item updated successfully
Bodyapplication/json

🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
🟠409Conflict
🟠422Unprocessable Entity
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://api-dev.thesource.wiki/api/v1/source-items/' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "title": "Updated Title",
    "description": "Updated description",
    "parent_id": null,
    "status": "draft",
    "general_access": "everyone",
    "color": "#10B981",
    "icon": "📘",
    "sort": 2,
    "shared": true,
    "expanded": false,
    "featured_in_updates": true,
    "has_unpublished_changes": true,
    "contents": "string",
    "content_type": "html",
    "tiptap_version": 2,
    "is_major_update": false,
    "mentioned_user_ids": [
        3,
        7
    ]
}'
Response Response Example
200 - 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 04:07:50
Previous
Get a single source item
Next
Delete a source item
Built with