---
title: "Updates or creates a cache time"
method: PUT
path: "/cache-times/{id}"
tags: ["cache times", "private"]
---

# Updates or creates a cache time

`PUT /cache-times/{id}`

Updates a cache time if it exists or creates a new one for a given id

## Path parameters

- `id` string, required

## Request body

- CacheTimePutRequest
  - `path` string, required — Path for which caching is set
  - `collection_id` string — Collection ID - used for grouping and filtering of cache time objects
  - `collection_title` string — Collection title - used for describing the collection in a human-readable format
  - `release_time` string, date-time — Release time in ISO-8601 format

## Response `204`

Cache time successfully updated or created

## Other responses

- `400` — Invalid request, reasons can be one of the following: * cache time id was incorrect * missing required fields * empty request body * unknown extra fields * wrong type for field

---

[API](https://skmtc.net/office-of-national-statistics/apis/legacy-cache-api.md) · [All operations](https://skmtc.net/office-of-national-statistics/apis/legacy-cache-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/office-of-national-statistics/legacy-cache-api/versions/eea11da5c81c/schema)
