# Mobile API Agent Requests

This file tracks requests from the mobile team to the backend team for API changes needed to support mobile features.

---

## REQ-20260104-01: Chat Attachment Upload Endpoint

**Status**: `completed` ✅
**Requested**: 2026-01-04
**Completed**: 2026-01-04
**Mobile Feature**: Team Chat (Spec 008)
**Priority**: `high`

### Context
Mobile users can now take photos or select images from their gallery to send as chat attachments.

### Backend Response
**IMPLEMENTED!** ✅

Endpoint: `POST /api/mobile/staff-chat/:typeNum/channels/:channelId/attachments`

```http
POST /api/mobile/staff-chat/:typeNum/channels/:channelId/attachments
Content-Type: multipart/form-data
Authorization: Bearer {access_token}

Form Data:
- file: (binary) The image file

Response (201 Created):
{
  "success": true,
  "attachment": {
    "id": 123,
    "fileName": "uuid.jpg",
    "originalName": "photo.jpg",
    "mimeType": "image/jpeg",
    "fileSize": 1234567,
    "url": "https://.../attachments/123/download?signature=..."
  }
}
```

### Integration Notes
- Upload is scoped to channel (better for access control)
- Backend returns signed URL for downloads (15 min expiry)
- `sendMessage()` accepts `attachmentIds` array
- Mobile client compresses images to <1MB before upload
- Supports JPEG, PNG, GIF up to 10MB

---

### Template for New Requests

```markdown
## REQ-YYYYMMDD-NN: [Brief Title]

**Status**: `pending`
**Requested**: [Date]
**Mobile Feature**: [Spec ID or feature name]
**Priority**: `high` | `medium` | `low`

#### Context
[What mobile feature needs this API]

#### Questions
1. [Specific question about endpoint, payload, response, etc.]

#### Backend Response
*Awaiting response*
```
