> For the complete documentation index, see [llms.txt](https://docs.deepwriter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.deepwriter.com/api-access/project-management.md).

# Project Management

Operations for managing projects and project data

## Fetch user documents

> Retrieves a list of documents (jobs and projects) for the authenticated user.\
> Returns job-based data with project information included.<br>

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Project Management","description":"Operations for managing projects and project data"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"DocumentResponse":{"type":"object","description":"Combined job and project data for dashboard display","properties":{"id":{"type":"string","format":"uuid","description":"The job ID (primary identifier)"},"projectId":{"type":"string","format":"uuid","description":"The associated project ID"},"jobId":{"type":"string","format":"uuid","description":"The job ID (same as id, for compatibility)"},"title":{"type":"string","description":"The title of the document/project"},"status":{"type":"string","enum":["draft","in_progress","completed","failed","moderated"],"description":"The current status of the job"},"progress":{"type":"number","format":"float","minimum":0,"maximum":100,"description":"The completion progress"},"is_starred":{"type":"boolean","description":"Whether the document is starred"},"created_at":{"type":"string","format":"date-time","description":"When the job was created"},"updated_at":{"type":"string","format":"date-time","description":"When the job was last updated"}},"required":["id","projectId","jobId","title","status","created_at","updated_at"]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/fetchDocuments":{"get":{"summary":"Fetch user documents","description":"Retrieves a list of documents (jobs and projects) for the authenticated user.\nReturns job-based data with project information included.\n","tags":["Project Management"],"responses":{"200":{"description":"Documents retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentResponse"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Duplicate an existing project

> Creates a copy of an existing project with all its settings and files

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Project Management","description":"Operations for managing projects and project data"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/duplicateProject":{"post":{"summary":"Duplicate an existing project","description":"Creates a copy of an existing project with all its settings and files","tags":["Project Management"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId"],"properties":{"projectId":{"type":"string","format":"uuid","description":"ID of the project to duplicate"}}}}}},"responses":{"200":{"description":"Project duplicated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"ID of the newly created duplicate project"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Star or unstar a document

> Toggles the starred status of a document (job)

```json
{"openapi":"3.0.3","info":{"title":"DeepWriter API","version":"2.0.0"},"tags":[{"name":"Project Management","description":"Operations for managing projects and project data"}],"servers":[{"url":"/api","description":"API base path"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for user session authentication."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"A message describing the error"}},"required":["error"]}}},"paths":{"/starDocument":{"post":{"summary":"Star or unstar a document","description":"Toggles the starred status of a document (job)","tags":["Project Management"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jobId"],"properties":{"jobId":{"type":"string","format":"uuid","description":"ID of the job to star/unstar"}}}}}},"responses":{"200":{"description":"Document starred/unstarred successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.deepwriter.com/api-access/project-management.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
