---
title: "Import file to insight"
method: POST
path: "/v1/insights/import/file"
tags: ["Insights"]
deprecated: true
---

# Import file to insight

`POST /v1/insights/import/file`

> **Deprecated.**

Create a new insight by importing a file from a publicly accessible URL. Supported file types include documents (PDF, DOCX), audio files (MP3, WAV, M4A), and video files (MP4, MOV).

**Note:** This endpoint is deprecated. Use **Import file to doc** (`POST /v1/docs/import/file`) instead.

If the imported file is audio or video, Dovetail will automatically queue it for transcription. The resulting transcript will be added to the insight body once processing completes.

The insight can be placed inside a project (via `project_id`) or a folder (via `folder_id`), but not both.

Returns the newly created insight object (without content).

> 🚧 Permissions
>
> Please check you have the relevant permissions required to access this resource. This may include specific permissions on the object itself or its parent, or having the correct user role if you're making updates.


> 🚧 Supported URLs
>
> Only publicly accessible URLs that link directly to a downloadable file are supported. If the URL does not include a file extension, you must provide the `mime_type` parameter so Dovetail can determine how to process the file.

> 📘 Transcription notifications
>
> When a transcription completes or fails, the account linked to the API token will receive a notification. You can manage notification preferences in [notification settings](https://dovetail.com/settings/user/notifications).

## Request body

- object
  - `fields` object[] — The insight's fields.
    - `label` string, required — The field's label (name). Must match an existing field label when updating, or will create a new field when creating.
    - `value` union, required — The field's value. Type depends on the field type: string for TEXT/EMAIL/URL/PHONE, boolean for BOOLEAN, number for NUMBER/NPS, string (ISO 8601) for DATETIME, string array for SELECT, or string (contact name) for PERSON. Null to clear the value.
      - string
      - boolean
      - number
      - string[]
    - `type` 'BOOLEAN' | 'DATETIME' | 'EMAIL' | 'NPS' | 'NUMBER' | 'PERSON' | 'PHONE' | 'SELECT' | 'TEXT' | 'URL' — Include the desired type when creating a new field. If omitted or left empty, the field type defaults to TEXT. Do not include this property when referencing an existing field.
  - `mime_type` string — The nature and format of file want to import.
  - `project_id` string, nullable — Unique identifier of the project that the insight is associated with. Cannot be used together with folder_id.
  - `folder_id` string, nullable — Unique identifier of the folder to place the insight in. Cannot be used together with project_id. Cannot be combined with fields in the same request.
  - `author_id` string — Unique identifier of the user to set as the author. Only workspace admins can use this field. If omitted, defaults to the authenticated user. Can only be set at creation time. When an admin sets this field, the author change is recorded in workspace audit logs with the API user as the actor, so overrides remain traceable.
  - `title` string, required — The insight's title.
  - `url` string, uri, required — Public url to the file that you want to import.
  - `cover_image_file_id` string, nullable — Unique identifier of a file to use as the insight's cover image.

## Response `201`

201

- object
  - `data` object, required
    - `id` string, required
    - `url` string — The URL of this resource in the Dovetail web app. This field is experimental and may change without notice.
    - `title` string, required
    - `type` 'insight', required
    - `fields` object[], required
      - `label` string, required — The field's label (name). Must match an existing field label when updating, or will create a new field when creating.
      - `value` union, required — The field's value. Type depends on the field type: string for TEXT/EMAIL/URL/PHONE, boolean for BOOLEAN, number for NUMBER/NPS, string (ISO 8601) for DATETIME, string array for SELECT, or string (contact name) for PERSON. Null to clear the value.
        - string
        - boolean
        - number
        - string[]
      - `type` 'BOOLEAN' | 'DATETIME' | 'EMAIL' | 'NPS' | 'NUMBER' | 'PERSON' | 'PHONE' | 'SELECT' | 'TEXT' | 'URL' — Include the desired type when creating a new field. If omitted or left empty, the field type defaults to TEXT. Do not include this property when referencing an existing field.
    - `created_at` string, required
    - `deleted` boolean, required
    - `project` object, required
      - `id` string, nullable, required
    - `folder` object, nullable, required
      - `id` string, required
    - `files` object[], required
      - `id` string, required — Unique identifier of the file.
      - `name` string, required — The file's original name.
      - `type` string, nullable, required — The file's MIME type (e.g. 'image/png', 'video/mp4'). Null if unknown.
      - `size` number, nullable, required — Size of the file in bytes. Null if unknown.
      - `status` 'completed' | 'pending' | 'failed', required — Processing status of the file. 'pending' while being processed, 'completed' when ready, or 'failed' if processing encountered an error.
      - `author` union, required — The user who uploaded the file, or null if the author is unknown.
        - object
          - `id` string, required
          - `name` string
        - string, null, nullable
      - `created_at` union, required — ISO 8601 timestamp when the file was created.
        - string
        - string, null, nullable
      - `url` string, nullable, required — Permanent URL pointing at the **Download a file** endpoint. Safe to cache and store — the URL itself never expires, but calling it requires the same authentication as other API endpoints and returns a short-lived presigned URL each time. The endpoint performs its own readiness and access checks.
    - `cover_image` object, nullable, required
      - `id` string, required — Unique identifier of the file.
      - `name` string, required — The file's original name.
      - `type` string, nullable, required — The file's MIME type (e.g. 'image/png', 'video/mp4'). Null if unknown.
      - `size` number, nullable, required — Size of the file in bytes. Null if unknown.
      - `status` 'completed' | 'pending' | 'failed', required — Processing status of the file. 'pending' while being processed, 'completed' when ready, or 'failed' if processing encountered an error.
      - `author` union, required — The user who uploaded the file, or null if the author is unknown.
        - object
          - `id` string, required
          - `name` string
        - string, null, nullable
      - `created_at` union, required — ISO 8601 timestamp when the file was created.
        - string
        - string, null, nullable
      - `url` string, nullable, required — URL to download the cover image. Only available when the file has been fully processed.

## Other responses

- `400` — 400
- `401` — 401
- `403` — 403
- `404` — 404
- `422` — 422
- `429` — 429
- `500` — 500

---

[API](https://skmtc.net/dovetail/apis/dovetail-public-api.md) · [All operations](https://skmtc.net/dovetail/apis/dovetail-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dovetail/dovetail-public-api/versions/4107f5fdf8b2/schema)
