latestOpenAPI 3.1.02026-08-211061591.1 MB

69a962f1578f

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

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"
}