Embeddable clock
GET /v1/time/clockOpenAPI YAMLReturns a self-bootstrapping HTML fragment (host div + JSON config + CSS/JS includes) that renders a live clock.
What do I need to send?
style is required. Choose one of the named analog or digital styles.
Choose one target selector and an optional timestamp to pin the clock.
Rule: This endpoint returns text/html and does not support sign or bulk selectors.
| Name | Needed? | Use it for |
|---|---|---|
style | Required | One of 30 named styles. See list below. |
tz | Choose one target | Target IANA timezone. |
ip | Choose one target | Target via IP address. |
lat | Pair parameter | Target latitude. Pair with lon. |
lon | Pair parameter | Target longitude. |
offset | Choose one target | Target fixed UTC offset (URL-encode + as %2B). |
unix | Choose one input | Pin the clock to a specific Unix-second instant. |
unix_ms | Choose one input | Pin the clock to a specific Unix-millisecond instant. |
iso | Choose one input | Pin the clock to a specific ISO 8601 instant. |
source_tz | Conditional hint | Interpret a local iso= against this IANA zone. |
format | Optional | strftime pattern for digital styles, e.g. %H:%M:%S. |
Code samples
Copy a request in your preferred language and replace YOUR_TIMELOGIC_API_KEY with your direct API key.
curl "https://api.timelogicapi.com/v1/time/clock?tz=Europe/Paris&style=analog-station" \
-H "Authorization: Bearer $TIMELOGIC_API_KEY"Example response
<div id="clock-...-1" class="timelogic-clock-host" data-timelogic-clock data-clock-config-id="clock-...-1-config"></div>
<script type="application/json" id="clock-...-1-config">
{
"version": "v1",
"style": "analog-station",
"styleDefinition": { "family": "analog", "renderer": "svg", "...": "..." },
"unix_ms": 1778093028429,
"offset_minutes": 120,
"timezone": "Europe/Paris",
"timezone_label": "Europe/Paris",
"format": null,
"refresh": { "path": "/v1/time/current", "selector": { "kind": "tz", "tz": "Europe/Paris" } }
}
</script>
<link rel="stylesheet" href="/v1/time/clock/assets/v1/clock.css">
<script src="/v1/time/clock/assets/v1/clock.js"></script>
Additional endpoint notes
style is required and must be one of these 30 names:
Analog — analog-station, analog-aviation, analog-bauhaus, analog-graphite, analog-arctic, analog-brass, analog-marine, analog-grid, analog-slate, analog-executive.
Digital — digital-segment-red, digital-segment-amber, digital-segment-ice, digital-terminal-green, digital-terminal-white, digital-broadcast, digital-dashboard, digital-control-room, digital-slate, digital-onyx, digital-frost, digital-card, digital-glass, digital-matrix, digital-timetable, digital-split-flap, digital-cyan, digital-emerald, digital-monolith, digital-minimal.
curl "https://api.timelogicapi.com/v1/time/clock?tz=Europe/Paris&style=analog-station" \
-H "Authorization: Bearer $TIMELOGIC_API_KEY"
The response is text/html (uncached, Cache-Control: no-store). Drop the entire snippet into a page — the included JS upgrades the host <div> and refreshes against /v1/time/current.
This route is single-target only — no comma-separated selectors. sign is not supported.
Common errors
400 INVALID_PARAMETER— missing or unknownstyle. The error body lists allvalid_styles.
When to use this endpoint
Use Embeddable clock when you want TimeLogic to return a ready-to-render live clock fragment for websites, internal dashboards, landing pages, or customer portals without building the display logic yourself.
Request model
Select a required style, then choose the time target with a timezone, IP, coordinates, fixed offset, or timestamp. Optional presentation parameters control labeling and display behavior while the endpoint returns the HTML bootstrap fragment.
Embedding guidance
Treat the returned fragment as presentation output. For application logic, use JSON endpoints such as current time or convert time; for visual widgets, the clock endpoint keeps markup and behavior together.