๐ Update a Complaint
Endpoint: PATCH /api/complaints/{id}/
Auth Required: โ
Yes (Bearer Token)
Content-Type: application/json
๐ Description
This endpoint allows a citizen to update their previously submitted complaint โ only if it hasnโt been assigned or marked as resolved. Typically, users can update fields like title, description, or location.
๐ Authentication
Include the JWT access token in the Authorization header:
๐ Path Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
UUID | โ | Unique complaint ID |
๐งพ Request Body (Partial)
Send only the fields you want to update:
```json { "title": "Updated garbage issue", "description": "Now also affecting the nearby drainage.", "location": "Ward 12, Park Avenue - near temple" }
{ "success": true, "message": "Complaint updated successfully.", "data": { "id": "f8e2a5b4-2b47-4d3f-bdc9-75f6a3df9fc2", "status": "open", "updated_at": "2025-07-07T15:40:10Z" } }