Skip to content

Add Task Attachment

Add an attachment to a task in Last Mile Intelligence.

addTaskAttachment

task

ParameterTypeRequiredDefaultDescription
Task IDstringYes-The ID of the task to attach to
AttachmentbinaryYes-File to attach
{
"success": true,
"taskId": "task_abc123",
"attachment": {
"id": "att_new123",
"name": "maintenance_photo.jpg",
"mimeType": "image/jpeg",
"size": 245000,
"url": "https://storage.lmi.com/attachments/att_new123.jpg",
"createdAt": "2024-06-21T09:00:00Z"
}
}
{
"success": false,
"error": "Task not found",
"taskId": "invalid_id"
}
  • Missing API Token: LMI credential is missing API token
  • Task Not Found: Task with specified ID does not exist
  • File Too Large: Attachment exceeds maximum file size
  • Invalid File Type: File type not allowed
  • Permission Denied: API token lacks permission for this operation