Source: https://dinakar-rewind.docs.pageloop.ai/api-reference/watching/adminwatchingupdatemovie

# Edit watch event

PUT `https://api.rewind.rest/v1/watching/admin/movies/{id}`

Update fields on an existing watch event.

## Authorization

#### Authorization (header, string, required)

API key. Read keys (rw\_live\_...) access GET endpoints. Admin keys (rw\_admin\_...) access all endpoints.

## Path Parameters

#### id (path, string, required)

## Body

#### watched\_at (body, string)

#### rating (body, number)

#### rewatch (body, boolean)

## Response

#### 200

Watch event updated

#### id (number, required)

#### movie\_id (number, required)

#### watched\_at (string, required)

#### source (string, required)

#### user\_rating (number, required)

#### rewatch (boolean, required)

#### 400

Bad request

#### error (string, required)

#### status (integer, required)

#### 401

Unauthorized

#### error (string, required)

#### status (integer, required)

#### 404

Not found

#### error (string, required)

#### status (integer, required)

#### Request

```bash cURL
curl -X PUT 'https://api.rewind.rest/v1/watching/admin/movies/{id}' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"watched_at": "string", "rating": 0, "rewatch": true}'
```

```javascript JavaScript
const res = await fetch('https://api.rewind.rest/v1/watching/admin/movies/{id}', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"watched_at": "string", "rating": 0, "rewatch": true}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.put(
    'https://api.rewind.rest/v1/watching/admin/movies/{id}',
    headers={'Authorization': 'Bearer <token>'},
    json={"watched_at": "string", "rating": 0, "rewatch": true}
)
data = res.json()
```

#### Response

```json 200
{
  "id": 0,
  "movie_id": 0,
  "watched_at": "string",
  "source": "string",
  "user_rating": 0,
  "rewatch": true
}
```

```json 400
{
  "error": "Not found",
  "status": 404
}
```

```json 401
{
  "error": "Not found",
  "status": 404
}
```

```json 404
{
  "error": "Not found",
  "status": 404
}
```
