Mark as watched
Log movies and episodes as watched, with the date of the watch.
POST https://cotlet.dev/api/v1/trakt/histories
write
Adds plays to your history. A show with no seasons logs every episode, so name seasons and episodes when you mean a few. A watched_at in the past is accepted. Trakt does not check for duplicate plays, so use get_history first. It reaches no one and remove_from_history undoes it, so it needs no confirmation.
Parameters
| Name | Type | Description |
|---|---|---|
| items array required | array | Titles to change. Each item is an object: type ('movie', 'show', 'season' or 'episode'), title and year, or trakt_id from search_titles. Seasons and episodes also take season and episode numbers. add_to_history also takes watched_at, rate_titles takes rating. |
Request
curl -X POST https://cotlet.dev/api/v1/trakt/histories \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"items":[{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":1,"watched_at":"2026-10-10T20:00:00Z"},{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":2,"watched_at":"2026-10-10T20:50:00Z"},{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":3,"watched_at":"2026-10-10T21:40:00Z"}]}' result = client.call("trakt", "add_to_history", {"items":[{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":1,"watched_at":"2026-10-10T20:00:00Z"},{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":2,"watched_at":"2026-10-10T20:50:00Z"},{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":3,"watched_at":"2026-10-10T21:40:00Z"}]}) const result = await cotlet.call('trakt', 'add_to_history', {"items":[{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":1,"watched_at":"2026-10-10T20:00:00Z"},{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":2,"watched_at":"2026-10-10T20:50:00Z"},{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":3,"watched_at":"2026-10-10T21:40:00Z"}]}); cotlet call trakt add_to_history --data '{"items":[{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":1,"watched_at":"2026-10-10T20:00:00Z"},{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":2,"watched_at":"2026-10-10T20:50:00Z"},{"type":"episode","title":"Slow Horses","year":2022,"season":4,"episode":3,"watched_at":"2026-10-10T21:40:00Z"}]}' Example response
{
"added": {
"movies": 0,
"episodes": 3
},
"skipped_duplicates": 0,
"not_found": []
}