---
updatedAt: 2026-06-01T04:35:17.000Z
agentTools:
  projectIndex: https://developers.dovetail.com/llms.txt
---

# Export data

Export the content body of a data entry in either HTML or Markdown format. Use the `type` path parameter to specify the desired format: `html` or `markdown`.

This is the only GET endpoint that returns the **content body** of a data entry. **List data** and **Get data** return metadata only (no body text).

Returns the same identifying fields as **Get data**, plus either `content_html` or `content_markdown` with the full text content.

**Including file content**: pass `?include_file_content=true` to also read the extracted text of attached document files (PDF, DOCX, PPTX, XLSX) from the search index — in the plain export, attached files appear only as links. The response then additionally includes:

- `content_text` — the entry's full indexed body: its own text with file text inlined, plus any survey content. Each file's pages are preceded by a `<file name> - <page number>` header, so content can be attributed to its source file.
- `files` — the entry's attached files with a per-file `text_status` (`ready` / `pending` / `failed` / `unsupported` / `unavailable`).
- `indexed` — when `false`, the entry has not reached the search index yet and `content_text` is empty; retry shortly.
- `truncated` — when `true`, the indexed body exceeded the search index's size limit and `content_text` is incomplete.

Attached file text is returned under `note:read`: files are part of the data entry, and their visibility is implied by the entry's visibility. (`file:read` gates binary file egress via the file download API, not extracted text.)

With `include_file_content=true`, returns 403 when the workspace has export disabled (HIPAA restriction), and when any attached file is past its retention window: retention removes the file's bytes but its extracted text remains in the search index, so the flag is refused rather than returning content the `files` list would label `unavailable`. The plain export (without the flag) is unaffected in both cases.

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "paths": {
    "/v1/data/{data_id}/export/{type}": {
      "get": {
        "description": "Export the content body of a data entry in either HTML or Markdown format. Use the `type` path parameter to specify the desired format: `html` or `markdown`.\n\nThis is the only GET endpoint that returns the **content body** of a data entry. **List data** and **Get data** return metadata only (no body text).\n\nReturns the same identifying fields as **Get data**, plus either `content_html` or `content_markdown` with the full text content.\n\n**Including file content**: pass `?include_file_content=true` to also read the extracted text of attached document files (PDF, DOCX, PPTX, XLSX) from the search index — in the plain export, attached files appear only as links. The response then additionally includes:\n\n- `content_text` — the entry's full indexed body: its own text with file text inlined, plus any survey content. Each file's pages are preceded by a `<file name> - <page number>` header, so content can be attributed to its source file.\n- `files` — the entry's attached files with a per-file `text_status` (`ready` / `pending` / `failed` / `unsupported` / `unavailable`).\n- `indexed` — when `false`, the entry has not reached the search index yet and `content_text` is empty; retry shortly.\n- `truncated` — when `true`, the indexed body exceeded the search index's size limit and `content_text` is incomplete.\n\nAttached file text is returned under `note:read`: files are part of the data entry, and their visibility is implied by the entry's visibility. (`file:read` gates binary file egress via the file download API, not extracted text.)\n\nWith `include_file_content=true`, returns 403 when the workspace has export disabled (HIPAA restriction), and when any attached file is past its retention window: retention removes the file's bytes but its extracted text remains in the search index, so the flag is refused rather than returning content the `files` list would label `unavailable`. The plain export (without the flag) is unaffected in both cases.",
        "summary": "Export data",
        "tags": [
          "Data"
        ],
        "parameters": [
          {
            "name": "data_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Unique identifier of the data."
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "html",
                "markdown"
              ]
            }
          },
          {
            "name": "include_file_content",
            "in": "query",
            "description": "When `true`, the response additionally includes the extracted text of attached document files (PDF, DOCX, PPTX, XLSX) read from the search index: `content_text`, `files` (with per-file `text_status`), `indexed`, and `truncated`. Defaults to `false`.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "The URL of this resource in the Dovetail web app. This field is experimental and may change without notice."
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "data"
                                  ]
                                },
                                "title": {
                                  "type": "string"
                                },
                                "created_at": {
                                  "type": "string"
                                },
                                "deleted": {
                                  "type": "boolean"
                                },
                                "speakers": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string",
                                        "nullable": true,
                                        "description": "Display name of the linked speaker. `null` when the speaker has no display name, or when the token does not include `contact:read` (for contacts) or `user:read` (for users). The speaker `id` is still returned."
                                      },
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "contact",
                                          "user"
                                        ],
                                        "description": "`contact` for a person in the contacts database, `user` for a workspace member linked as a transcript speaker."
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "type"
                                    ]
                                  },
                                  "description": "Contacts and workspace users linked as transcript speakers. Empty when the entry has none."
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "title",
                                "created_at",
                                "deleted",
                                "speakers"
                              ]
                            },
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "content_html": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "content_html"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "content_markdown": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "content_markdown"
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "content_text": {
                              "type": "string",
                              "description": "The data entry's full indexed content: its own text with the extracted text of attached document files inlined, plus any survey content. Each file's text is inlined per page, every page preceded by a `<file name> - <page number>` header, so content can be attributed to its source file. The body is markdown-flavoured (tables render as pipe syntax). Present only with `include_file_content=true`."
                            },
                            "files": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "Unique identifier of the file."
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "The file's original name."
                                  },
                                  "type": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "The file's MIME type (e.g. 'image/png', 'video/mp4'). Null if unknown."
                                  },
                                  "text_status": {
                                    "type": "string",
                                    "enum": [
                                      "ready",
                                      "pending",
                                      "failed",
                                      "unsupported",
                                      "unavailable"
                                    ],
                                    "description": "Extraction status of this file's text: `ready` (text extracted and present in content_text, modulo indexing lag), `pending` (upload, conversion, or extraction in progress or about to be queued — unprocessed PDFs are picked up automatically; retry later), `failed` (conversion or extraction failed, or completed with no extractable text), `unsupported` (images, audio/video, other non-document types), `unavailable` (past retention window — the request fails with 403 when any attached file is in this state)."
                                  },
                                  "page_count": {
                                    "type": "number",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "type",
                                  "text_status",
                                  "page_count"
                                ]
                              },
                              "description": "The entry's attached files with per-file text extraction status. Present only with `include_file_content=true`."
                            },
                            "indexed": {
                              "type": "boolean",
                              "description": "Whether the data entry has been indexed for search yet. When false, content_text is empty — retry shortly. Present only with `include_file_content=true`."
                            },
                            "truncated": {
                              "type": "boolean",
                              "description": "Whether the indexed content was truncated to the search index's size limit. When true, content_text is incomplete. Present only with `include_file_content=true`."
                            }
                          }
                        }
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "InvalidOperation"
                                ]
                              },
                              "title": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "title"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "enum": [
                                  "ValidationError"
                                ]
                              },
                              "title": {
                                "type": "string",
                                "enum": [
                                  "Contract violation"
                                ]
                              },
                              "message": {
                                "type": "string"
                              },
                              "path": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "title",
                              "message",
                              "path"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "errors"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "Unauthorized"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "title"
                        ]
                      }
                    }
                  },
                  "required": [
                    "errors"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "Forbidden"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "title"
                        ]
                      }
                    }
                  },
                  "required": [
                    "errors"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "NotFound"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "title"
                        ]
                      }
                    }
                  },
                  "required": [
                    "errors"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "UnprocessableContent"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "title",
                          "message"
                        ]
                      }
                    }
                  },
                  "required": [
                    "errors"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "TooManyRequests"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "title"
                        ]
                      }
                    }
                  },
                  "required": [
                    "errors"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "InternalError"
                            ]
                          },
                          "title": {
                            "type": "string",
                            "enum": [
                              "Internal server error"
                            ]
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "title"
                        ]
                      }
                    }
                  },
                  "required": [
                    "errors"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "info": {
    "title": "Dovetail Public API",
    "version": "0.0.1",
    "description": "The Dovetail Public API provides programmatic access to your Dovetail workspace.\n\n## Core concepts\n\n- **Projects** — Containers for organizing qualitative research. They hold data, docs, highlights, tags, and insights.\n- **Data** — Documents within a project that capture raw research data such as interview transcripts, survey responses, and session recordings. Available via `/v1/data`. The legacy `/v1/notes` endpoints access the same underlying resource.\n- **Docs** — Rich-text documents for writing up research reports, sharing findings, and publishing deliverables. Docs replace the deprecated insights resource.\n- **Highlights** — Selected passages of text or time ranges in transcripts that have been marked as significant during analysis.\n- **Tags** — Labels applied to highlights to categorize findings (e.g. 'Usability Issue', 'Feature Request').\n- **Channels** — Automated AI-powered pipelines that continuously analyze high-volume customer feedback (app reviews, NPS, support tickets) into structured topics.\n- **Contacts** — People in your contacts database such as interview participants or customers.\n- **Folders** — Hierarchical containers for organizing projects, docs, channels, and other content.\n- **Files** — Attachments (images, documents, audio, video) that can be embedded in docs, data entries, or insights.\n\n## Authentication\n\nAll requests require a Bearer token in the `Authorization` header. Generate API tokens from your Dovetail workspace settings.\n\n## Base URL\n\nAll API endpoints are served under `https://dovetail.com/api`."
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "https://dovetail.com/api"
    },
    {
      "url": "https://dovetailapp.com/api"
    }
  ]
}
```