artifacts

Create a new artifact (document)

post/artifacts

Request

  • The document declares no server URL.
  • Auth: none declared

Request body

titlestring required

Title of the document

contentstring required

HTML content of the document

threadIdstring uuid required

The thread this artifact belongs to

authorType'USER' | 'ASSISTANT' required

Who authored this version

letterheadIdstring uuid

Optional letterhead to apply to this artifact

Example request

{
  "title": "Meeting Notes Q1 2026",
  "content": "<p>Meeting notes content...</p>",
  "threadId": "123e4567-e89b-12d3-a456-426614174000",
  "authorType": "ASSISTANT",
  "letterheadId": "123e4567-e89b-12d3-a456-426614174000"
}

Response

The artifact has been created

idstring required

Unique identifier of the artifact

type'document' | 'diagram' | 'spreadsheet' required

The kind of artifact — document (HTML) or diagram (mermaid)

threadIdstring required

The thread this artifact belongs to

userIdstring required

The user who owns this artifact

titlestring required

Title of the document

letterheadIdstring uuid nullable

The letterhead applied to this artifact

currentVersionNumbernumber required

Current version number

createdAtstring required

When the artifact was created

updatedAtstring required

When the artifact was last updated

Example response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "type": "document",
  "threadId": "123e4567-e89b-12d3-a456-426614174000",
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "title": "Meeting Notes Q1 2026",
  "letterheadId": "123e4567-e89b-12d3-a456-426614174000",
  "currentVersionNumber": 3,
  "versions": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "artifactId": "123e4567-e89b-12d3-a456-426614174000",
      "versionNumber": 1,
      "content": "<p>Document content...</p>",
      "authorType": "ASSISTANT",
      "createdAt": "2026-01-15T10:30:00.000Z"
    }
  ],
  "createdAt": "2026-01-15T10:00:00.000Z",
  "updatedAt": "2026-01-15T10:30:00.000Z"
}

Changes

No recorded changes to this operation across all 51 revisions of this API.