4e064cf81dae

latestOpenAPI 3.1.02026-08-131831,331960.0 KB
caches

Update a cached response

Update the expiry date of a cached response identified by its public cache key.

patch/api/caches/{cache_key}/

Path parameters

cache_keystring required

Organization-scoped cache key returned by the cache list endpoint.

Headers

Authorizationstring required

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

Request body

expiry_datestring date-time nullable

New expiry time; null clears it.

Response

Updated cached response.

idinteger

Internal numeric ID. Present only for dashboard-JWT responses.

cache_keystring required

Organization-scoped public cache key.

prompt_contentstring required

Prompt text extracted from the cached request.

response_contentstring required

Response text extracted from the cached response.

request_contentstring

Stored request text preview. The current backend serializer truncates this field to roughly the first 100 characters.

prompt_messagesApiCachesCacheKeyPatchResponsesContentApplicationJsonSchemaPromptMessagesItems[]

Original prompt message array stored with the cache entry.

full_responseApiCachesCacheKeyPatchResponsesContentApplicationJsonSchemaFullResponse

Full cached provider response object.

hit_countinteger required

Live cache hit count enriched from ClickHouse.

response_timenumber double

Stored response time for the cached entry, in seconds.

timestampstring date-time required

When the cache entry was created.

updated_atstring date-time required

When the cache entry was last updated.

expiry_datestring date-time nullable

When the cache entry expires. null means no expiry date is set.