v1

latestOpenAPI 3.1.02026-07-265094114.0 KB
Documents

Create document

Create a new document in your workspace

post/v1/documents

Request body

userIdstring required

The ID of the user creating the document

contentstring required

The content of the document

namestring required

The name of the document

status'DRAFT' | 'PUBLISHED' | 'IN PROGRESS' | 'IN REVIEW' | 'COMPLETED'

The status of the document

projectIdstring

The ID of the project to associate the document with. When provided, the document is attached to the project so it appears under that project in Jasper.

Example request

{
  "userId": "user123",
  "content": "This is the content of the document.",
  "name": "Document Title",
  "status": "DRAFT",
  "projectId": "prj_E8F0457A95B04D87A11F6B1DD6AA2356"
}

Response

Create document

requestIdstring
resourcestring

Example response

{
  "requestId": "bce766ea-a4ef-48e5-9da1-d9602bfecf2d",
  "resource": "documents",
  "data": [
    {
      "id": "doc_073D2D49094A4AED991A47B614522579",
      "content": "This is the content of the document.",
      "createdAt": "2023-01-01T12:00:00.000Z",
      "updatedAt": "2023-01-02T12:00:00.000Z",
      "name": "My Document",
      "status": "active",
      "userId": "usr_535B1EC15F5F41EAB1B400E9ED4077B6",
      "projectId": "prj_E8F0457A95B04D87A11F6B1DD6AA2356"
    }
  ]
}