# PATCH /service-requests/:id/notes/:noteId

**Resource:** [Service Requests](./service-requests.md)  
**Scopes:** `service-requests:write`  
**Write operation:** yes

Edit an existing note on a service request. Only the original note author (matched by user_id of the API key owner) can edit their own notes. Adds an edited_at timestamp to the note object on success. Does NOT change the request status.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | string | yes | Service request UUID |
| `noteId` | path | string | yes | Note UUID (from the id field inside the notes array) |
| `content` | body | string | yes | Replacement content for the note (max 20000 chars) |

## Request example

```bash
curl -X PATCH https://ucqwijexmjctglmrxlej.supabase.co/functions/v1/api/v1/service-requests/f112de7b-c7df-4193-bacd-2d43c31c1f11/notes/572f46fd-a78b-4115-8636-215cdd5c204a \
  -H "Authorization: Bearer tp_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Confirmed the filter parameter is missing. Now affects list_companies too. Escalating priority."
  }'
```

## Response example

```json
{
  "data": {
    "id": "f112de7b-c7df-4193-bacd-2d43c31c1f11",
    "title": "Add status filter to list_opportunities",
    "notes": [
      {
        "id": "572f46fd-a78b-4115-8636-215cdd5c204a",
        "user_id": "771a4a38-3a5d-4a9b-98c3-e10879850c9d",
        "content": "Confirmed the filter parameter is missing. Now affects list_companies too. Escalating priority.",
        "created_at": "2026-04-19T20:47:11.328Z",
        "edited_at": "2026-04-19T21:05:33.000Z"
      }
    ],
    "status": "pending",
    "updated_at": "2026-04-19T21:05:33.000Z"
  },
  "meta": { "credits_remaining": 3453 }
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`