Upload Attachment
POST/api/upload/attachment
Upload an attachment to Backblaze B2 with tenant isolation.
This endpoint handles various file types for email/SMS attachments including:
- Documents (PDF, DOC, DOCX, TXT)
- Spreadsheets (XLS, XLSX, CSV)
- Archives (ZIP, RAR, 7Z)
- Images (JPG, PNG, GIF)
- Data files (JSON, XML)
Args: file: The attachment file to upload upload_service: Upload service instance with tenant context
Returns: Dict with the attachment URL and metadata
Raises: 400: Invalid file type or size 503: Storage service unavailable 500: Internal server error
Request
Responses
- 200
- 422
Successful Response
Validation Error