Skip to main content
POST
/
files
Upload a file using a publicly accessible URL.
curl --request POST \
  --url https://app.timelines.ai/integrations/api/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "download_url": "https://acme.com/somefile.png",
  "filename": "anotherfile.jpeg",
  "content_type": "image/jpeg"
}
'
{
  "status": "ok",
  "data": {
    "temporary_download_url": "http://acme.com/somefile.png",
    "uid": "90d353e6-44c1-48ff-b15b-69b7721e5450",
    "filename": "somefile.png",
    "size": 10000,
    "mimetype": "image/png",
    "uploaded_by_email": "john.doe@acme.com",
    "uploaded_at": "2023-06-18 15:19:23 +0300"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

_

download_url
string
required

A publicly accessible URL for the file (excluding download URLs from services like Google Drive or OneDrive).

Example:

"https://acme.com/somefile.png"

filename
string

(optional) A filename, to be used instead of the original filename specified by the download URL.

Example:

"anotherfile.jpeg"

content_type
string

(optional) A mime-type of the file, to be used instead of the original filename specified by the download URL.

Example:

"image/jpeg"

Response

Success

status
enum<string>
required
Available options:
ok,
error
Example:

"ok"

data
object
required