POST
/
v1
/
data
/
import
/
file
Import file to data
curl --request POST \
  --url https://dovetail.com/api/v1/data/import/file \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "fields": [
    {
      "label": "<string>",
      "value": "<string>",
      "type": "BOOLEAN"
    }
  ],
  "mime_type": "<string>",
  "project_id": "<string>",
  "title": "My data",
  "url": "<string>",
  "created_at": "2023-10-01T12:00:00Z",
  "author_id": "<string>"
}'
{
  "data": {
    "id": "<string>",
    "type": "data",
    "title": "<string>",
    "project": {
      "id": "<string>",
      "title": "<string>"
    },
    "fields": [
      {
        "label": "<string>",
        "value": "<string>",
        "type": "BOOLEAN"
      }
    ],
    "files": [
      {
        "id": "<string>",
        "name": "<string>",
        "type": "<string>",
        "status": "completed",
        "author": {
          "id": "<string>",
          "name": "<string>"
        },
        "created_at": "<string>"
      }
    ],
    "created_at": "<string>",
    "deleted": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Body

project_id
string
required

Unique identifier of the project that the data is associated with.

title
string
required

The data's title.

Example:

"My data"

url
string<uri>
required

Public url to the file that you want to import.

fields
object[]

The data's fields.

mime_type
string

The nature and format of file want to import.

created_at
string

The creation date and time to associate with the file, in ISO 8601 format.

Example:

"2023-10-01T12:00:00Z"

author_id
string

Unique identifier of the Dovetail user that the file is associated with.

Response

201

data
object
required