~sircmpwn/sr.ht-docs

629afc3d112f39ad1c4ece23f2ab6a5d0a014164 — Drew DeVault 24 days ago 6d1e92a
todo.sr.ht: document new comment editing API
1 files changed, 24 insertions(+), 0 deletions(-)

M todo.sr.ht/api.md
M todo.sr.ht/api.md => todo.sr.ht/api.md +24 -0
@@ 415,6 415,30 @@ implies the authenticated user.

**OAuth scope**: `tickets:read`

### PUT /api/user/:username/trackers/:tracker-name/tickets/:ticket-id/comments/:comment-id

Edits a comment. Note that the *comment* ID is required, not the event ID.

**Request body**

```json
{
  "text": "new comment text (markdown)"
}
```

List of [event resources](#event-resource) associated with this ticket.

**OAuth scope**: `tickets:write`

### PUT /api/trackers/:tracker-name/tickets/:ticket-id/comments/:comment-id

Equivalent to
[/api/user/:username/trackers/:tracker-name/tickets/:ticket-id/comments/:comment-id](#get-apiuserusernametrackerstrackernameticketsticketidcommentscommentid),
implies the authenticated user.

**OAuth scope**: `tickets:write`

## Webhooks

### /api/user/...