events

Translate Event On Demand

Translate an event into lang on demand from the frontend (#659).

Idempotent: if the cache is already warm for (slug, lang), the agent is NOT re-run (the source_hash short-circuit fires) and the cached entry is returned verbatim. Frontend can call this on every cache-miss without worrying about double-billing.

Returns the persisted translation payload — the caller doesn't need a second read.

post/events/{slug}/translations/{lang}

Request

  • Base URL
    https://api.imperfect.co (the document declares no server; this is the origin it was published from)
  • URL
    https://api.imperfect.co/events/{slug}/translations/{lang}
  • Auth
    none declared

Path parameters

slugstring required

Event slug.

langstring required

Target BCP47 locale (de-DE, es-MX, ca-ES, en-GB, …). Any code langcodes resolves to a real (language, territory) pair is accepted; de-DE, es-MX are pre-warmed during enrichment so cache hits are cheap, but other locales are translated on first request and cached the same way.

Headers

x-revalidate-secretstring nullable

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 64 revisions of this API.