Skip to content

Work with responses

Caching

Conditional requests with ETag and If-None-Match.

Every successful /v1 response carries an ETag. Send it back as If-None-Match on your next request to the same resource, and an unchanged answer costs a 304 with no body:

cURL
curl -sS -D - -o /dev/null -H "X-API-Key: $TAILEND_API_KEY" \
  -H 'If-None-Match: W/"TD64uXep9BDu_tA9n6OF_Zwl3IA"' \
  https://api.tailend.dev/v1/philadelphia/events
# HTTP/1.1 304 Not Modified

Responses are private — cacheable only by you, never a shared cache — and vary by key. Follow Cache-Control for how long to hold a response before revalidating; /v1/changes is the one exception, always revalidate it rather than trusting a cached copy.

What to do

  • Store the ETag alongside the response body and send it back as If-None-Match on your next request for the same resource.
  • A 304 still counts as a request — see Limits & usage.
  • See the API reference for every header this API sends.