Uploads

Upload File

Upload a file to Todoist.

This endpoint accepts file uploads via two methods:

  1. Multipart form-data (recommended):

    • Send the file as a form field with the actual file content
    • Optionally include project_id as another form field
    • The filename will be extracted from the Content-Disposition header
  2. Raw binary stream:

    • Send the file content directly in the request body
    • Set Content-Type header to the file's MIME type
    • Set X-File-Name header with the desired filename
    • Optionally include project_id as a query parameter

The optional project_id parameter can be used to apply workspace-specific upload limits when uploading to a workspace project.

post/api/v1/uploads

Request

  • Base URL
    https://api.todoist.com
  • URL
    https://api.todoist.com/api/v1/uploads
  • Auth
    none declared

Request body multipart/form-data

file_namestring nullable

Name for the uploaded file. If not provided, will be extracted from Content-Disposition header (multipart) or X-File-Name header (raw binary).

project_idstring nullable

Project ID to apply workspace-specific upload limits when uploading to a workspace project.

filestring binary required

Example request

{
  "file_name": "document.pdf",
  "project_id": "6XGgm6PHrGgMpCFX"
}

Response

Successful Response

file_urlstring required

URL of the uploaded file.

file_namestring required

Name of the uploaded file.

file_sizeinteger required

Size of the uploaded file in bytes.

file_typestring required

MIME type of the uploaded file.

resource_typestring required

Detected resource type of the upload.

imagestring nullable

Image URL for image uploads, or null for non-image files.

image_widthinteger nullable

Image width in pixels, or null for non-image files.

image_heightinteger nullable

Image height in pixels, or null for non-image files.

upload_state'pending' | 'completed'

Upload processing state.

Example response

{
  "file_url": "https://files.todoist.com/abc123/by/1234567/as/file.pdf",
  "file_name": "document.pdf",
  "file_size": 12345,
  "file_type": "application/pdf",
  "resource_type": "file",
  "image_width": 1200,
  "image_height": 800,
  "upload_state": "completed"
}

Changes

No recorded changes to this operation across all 34 revisions of this API.