Skip to content
    Reference

    API Reference

    Use the interactive OpenAPI 3 reference to authorize with a direct Bearer key and try requests from the page. Each endpoint has a concise guide with parameters and code samples below.

    Try requests live: click Authorize, paste a direct API key, then expand any operation and use Try it out → Execute.

    Interactive OpenAPI reference

    The browser version loads Swagger UI so you can authorize and try requests. The endpoint guides below are available as crawlable HTML and include request, response, and authentication details.

    Download the OpenAPI YAML

    Endpoint guides

    Short, copy-ready guides for the request, response, and parameters of each endpoint.

    Get current time

    GET /v1/time/current

    Resolve the precise current time for any timezone, IP, coordinate or UTC offset.

    Parameters
    • tzIANA timezone, e.g. Europe/Paris. Comma-separated values enable bulk mode.
    • ipIPv4 or IPv6 address (resolved via GeoLite2). Comma-separated for bulk.
    • latLatitude in decimal degrees. Pair with lon.
    • lonLongitude in decimal degrees. Pair with lat.
    • offsetFixed UTC offset, URL-encoded e.g. %2B02:00 for +02:00. Comma-separated for bulk.
    • auto_tzSet true to use the request IP's timezone from Cloudflare metadata.
    • formatstrftime pattern for an additional `formatted` field, e.g. %Y-%m-%d %H:%M:%S.
    • signSet true to receive a signed response (Ed25519 headers).
    Code sample
    curl "https://api.timelogicapi.com/v1/time/current?tz=Europe/Paris" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    Sample response
    {
      "unix": 1778093048,
      "unix_ms": 1778093048881,
      "utc": "2026-05-06T18:44:08Z",
      "iso_local": "2026-05-06T20:44:08+02:00",
      "rfc2822": "Wed, 06 May 2026 20:44:08 +0200",
      "human": "May 6, 2026, 8:44 PM Europe/Paris",
      "day_number": 4,
      "day_short": "Wed",
      "day_full": "Wednesday",
      "timezone": "Europe/Paris"
    }
    
    Additional endpoint notes

    Use at most one selector family (tz, ip, lat+lon, or offset) per request. If no selector is provided, the response defaults to UTC. Mixing selector families returns 400 AMBIGUOUS_TARGET.

    curl "https://api.timelogicapi.com/v1/time/current?tz=Europe/Paris" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY" 
    

    Bulk mode — pass a comma-separated list to one selector to receive an array, in input order:

    GET /v1/time/current?tz=Europe/Paris,Asia/Tokyo,America/New_York

    Common errors

    • 400 INVALID_PARAMETER — invalid IANA timezone (e.g. tz=Not/AZone) or malformed offset. Use %2B to URL-encode +.
    • 400 AMBIGUOUS_TARGET — multiple selector families in the same request.

    When to use this endpoint

    Use Get current time when an application needs a canonical "now" value for a single place or for a batch of places. It is the best fit for dashboards, scheduling previews, user profile defaults, countdowns, and systems that need a server-side timestamp rather than a browser clock.

    Request model

    Choose one selector family per request: tz, ip, lat + lon, or offset. Bulk requests use a comma-separated list inside the same family, which keeps validation predictable and preserves the response order for the caller.

    Response notes

    The response includes Unix seconds, Unix milliseconds, UTC, local ISO 8601, RFC 2822, human-readable text, day fields, and the resolved timezone. Prefer unix_ms for ordering events and iso_local for display.

    Convert time

    GET /v1/time/convert

    Convert one input timestamp into a target timezone, offset, IP, coordinate, or UTC. Supports bulk targets.

    Parameters
    • unixInput timestamp as Unix seconds.
    • unix_msInput timestamp as Unix milliseconds.
    • isoInput timestamp as ISO 8601. May include offset (e.g. ...Z) or be local with a source_* hint.
    • source_tzInterpret a local iso= as wall time in this IANA zone.
    • source_ipInterpret local iso= using the timezone of this IP.
    • source_latLatitude for local iso= zone resolution. Pair with source_lon.
    • source_lonLongitude for local iso= zone resolution.
    • source_offsetInterpret local iso= against a fixed UTC offset.
    • tzTarget IANA timezone. Comma-separated for bulk.
    • ipTarget via IP address. Comma-separated for bulk.
    • latTarget latitude. Pair with lon.
    • lonTarget longitude.
    • offsetTarget fixed UTC offset. URL-encode + as %2B. Comma-separated for bulk.
    • utcSet true to render the target in UTC.
    • formatstrftime pattern for the additional `formatted` field, e.g. %Y-%m-%d %H:%M:%S.
    • signSet true for a signed response.
    Code sample
    curl "https://api.timelogicapi.com/v1/time/convert?unix=1711300000&tz=Europe/London" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    Sample response
    {
      "unix": 1711300000,
      "unix_ms": 1711300000000,
      "utc": "2024-03-24T17:06:40Z",
      "iso_local": "2024-03-24T17:06:40+00:00",
      "rfc2822": "Sun, 24 Mar 2024 17:06:40 +0000",
      "human": "March 24, 2024, 5:06 PM Europe/London",
      "day_number": 1,
      "day_short": "Sun",
      "day_full": "Sunday",
      "timezone": "Europe/London"
    }
    
    Additional endpoint notes

    Provide exactly one input timestamp form (unix, unix_ms, or iso) and exactly one target selector family.

    # Numeric input → named zone
    curl "https://api.timelogicapi.com/v1/time/convert?unix=1711300000&tz=Europe/London" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    
    # Local ISO with source zone hint
    .https://api.timelogicapi.com/v1/time/convert?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London
    
    # Bulk targets — one comma-separated selector
    .https://api.timelogicapi.com/v1/time/convert?unix=1711300000&offset=-04:00,%2B00:00,%2B09:00
    
    # strftime
    .https://api.timelogicapi.com/v1/time/convert?unix=1711300000&tz=Europe/London&format=%25Y-%25m-%25d%20%25H:%25M:%25S
    # → adds "formatted": "2024-03-24 17:06:40"
    

    Bulk response — array of payloads, one per target, in input order.

    Common errors

    • 400 INVALID_TIMESTAMP — no input timestamp provided.
    • 400 MISSING_TARGET — no target selector / utc=true provided.
    • 400 AMBIGUOUS_TARGET — multiple input or target families combined, or a bulk selector mixed with another target (including utc=true).
    • 400 INVALID_PARAMETER — invalid timezone, offset, or strftime directive.

    When to use this endpoint

    Use Convert time when you already have a source timestamp and need to project it into another timezone, fixed offset, IP-derived zone, coordinate-derived zone, or UTC. It is designed for meeting planners, notification systems, travel tools, and scheduling interfaces.

    Request model

    Provide exactly one input timestamp (unix, unix_ms, or iso). If an ISO value is a local wall time without an embedded offset, add one source hint such as source_tz so TimeLogic can interpret that wall time safely before converting it.

    Bulk targets

    Bulk conversion is useful for world clocks and availability screens. Send comma-separated target selectors in one target family to get an array of converted values in the same order as the input list.

    Diff between two moments

    GET /v1/time/diff

    Absolute duration between two specifier-encoded instants, with optional business-day count.

    Parameters
    • from(required)Start specifier. One of: now, unix=N, unix_ms=N, iso=..., tz=..., ip=..., offset=...
    • to(required)End specifier. Same forms as from.
    • from_tzWall-clock zone hint for from=iso=... (no embedded offset).
    • from_ipResolve from=iso=... wall clock via this IP's zone.
    • from_latLatitude hint for from=iso=... wall clock. Pair with from_lon.
    • from_lonLongitude hint for from=iso=... wall clock.
    • from_offsetFixed offset hint for from=iso=... wall clock.
    • to_tzWall-clock zone hint for to=iso=... (no embedded offset).
    • to_ipResolve to=iso=... wall clock via this IP's zone.
    • to_latLatitude hint for to=iso=... wall clock. Pair with to_lon.
    • to_lonLongitude hint for to=iso=... wall clock.
    • to_offsetFixed offset hint for to=iso=... wall clock.
    • formatDuration template using %days %hours %minutes %seconds.
    • business_daysSet true to include a business_days count in the response.
    • holiday_countryISO 3166-1 alpha-2 holiday calendar (e.g. FR). Requires business_days=true. Not all countries are supported by the upstream calendar.
    • holiday_subdivisionSubdivision code from python-holidays. Requires holiday_country and business_days=true.
    • signSet true for a signed response.
    Code sample
    curl "https://api.timelogicapi.com/v1/time/diff?from=unix=1711300000&to=tz=America/New_York" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    Sample response
    {
      "seconds": 10195200,
      "minutes": 169920,
      "hours": 2832,
      "days": 118,
      "direction": "forward",
      "human": "2832 hours, 0 minutes, 0 seconds",
      "from": { "unix_ms": 1767312000000 },
      "to":   { "unix_ms": 1777507200000 },
      "business_days": 84
    }
    
    Additional endpoint notes

    from and to are embedded specifier strings — the value itself is a key=value form:

    ?from=unix=1711300000&to=tz=America/New_York ?from=iso=2026-04-16T09:00:00&from_tz=America/New_York&to=iso=2026-04-16T09:00:00&to_tz=Europe/London ?from=now&to=unix=1711300000

    Selector forms (tz=..., ip=..., offset=...) inside from/to resolve to the request-time instant in that zone, not a wall-clock time.

    curl "https://api.timelogicapi.com/v1/time/diff?from=iso=2026-01-02T00:00:00Z&to=iso=2026-04-30T00:00:00Z&business_days=true&holiday_country=FR" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    

    direction is forward, backward, or same. Magnitudes are absolute. format=%25days%20days%20%25hours%20hours adds a formatted field.

    Common errors

    • 400 INVALID_PARAMETER — missing from/to, malformed specifier, or unsupported holiday_country / holiday_subdivision.
    • 400 INVALID_PARAMETERholiday_subdivision without holiday_country, or holiday params without business_days=true.

    When to use this endpoint

    Use Diff between two moments to calculate elapsed duration between any two specifier-encoded instants. It works well for SLA counters, age calculations, countdowns, and workflows that compare a stored event time to a user-local or zone-local target.

    Request model

    The from and to parameters are required. Each can be now, a Unix value, an ISO value, or a selector-backed instant such as a timezone, IP, coordinate, or fixed offset. Zone hints disambiguate local ISO wall times.

    Business-day mode

    Enable business-day counting when product logic needs calendar-aware duration instead of pure elapsed seconds. Pair it with the business-day documentation for holiday calendar and weekend assumptions.

    Add to a timestamp

    GET /v1/time/add

    Add days, hours, minutes, and seconds to a base timestamp. Modifiers may be negative.

    Parameters
    • unixBase timestamp as Unix seconds. Defaults to current request time when omitted.
    • unix_msBase timestamp as Unix milliseconds.
    • isoBase timestamp as ISO 8601.
    • daysWhole days to add. Negative subtracts.
    • hoursHours to add. Negative subtracts.
    • minutesMinutes to add. Negative subtracts.
    • secondsSeconds to add. Negative subtracts.
    • source_tzInterpret a local iso= base as wall time in this IANA zone.
    • source_ipInterpret a local iso= base using this IP address timezone.
    • source_latLatitude hint for local iso=. Pair with source_lon.
    • source_lonLongitude hint for local iso=. Pair with source_lat.
    • source_offsetInterpret a local iso= base against a fixed UTC offset.
    • tzRender the result in this IANA timezone.
    • ipRender the result in the timezone of this IP address.
    • latTarget latitude. Pair with lon.
    • lonTarget longitude. Pair with lat.
    • offsetRender the result against a fixed UTC offset (URL-encode + as %2B).
    • utcSet true to render the target in UTC.
    • formatstrftime pattern for an additional `formatted` field, e.g. %Y-%m-%d %H:%M:%S.
    • signSet true for a signed response.
    Code sample
    curl "https://api.timelogicapi.com/v1/time/add?unix=1711300000&days=3&hours=2" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    Sample response
    {
      "unix": 1711566400,
      "unix_ms": 1711566400000,
      "utc": "2024-03-27T19:06:40Z",
      "iso_local": null,
      "rfc2822": "Wed, 27 Mar 2024 19:06:40 +0000",
      "human": "March 27, 2024, 7:06 PM UTC",
      "day_number": 4,
      "day_short": "Wed",
      "day_full": "Wednesday",
      "timezone": null
    }
    
    Additional endpoint notes
    # Add 3 days and 2 hours to a Unix timestamp
    .https://api.timelogicapi.com/v1/time/add?unix=1711300000&days=3&hours=2
    
    # Add 2h30m to an ISO timestamp
    .https://api.timelogicapi.com/v1/time/add?iso=2026-04-16T09:00:00Z&hours=2&minutes=30
    
    # Subtract one day
    .https://api.timelogicapi.com/v1/time/add?unix=1711300000&days=-1
    

    Provide at most one base form. With no base, the modifier is applied to the current request time.

    Common errors

    • 400 AMBIGUOUS_TARGET — multiple base forms supplied.
    • 400 INVALID_PARAMETER — non-integer modifier values.

    When to use this endpoint

    Use Add to a timestamp when you need deterministic date math around an input moment. Common use cases include trial expiration, reminder scheduling, countdown targets, and generating future or past timestamps from a known base.

    Request model

    Pass one base timestamp (unix, unix_ms, or iso) or omit it to use the current request time. Then provide any combination of days, hours, minutes, and seconds; negative values subtract time.

    Date math guidance

    Use this endpoint when you want server-side consistency across clients. Store machine-readable values such as unix_ms for comparisons, then display the returned ISO or human string in the user's target context.

    Elapsed since

    GET /v1/time/elapsed

    Time between a reference timestamp and now, with direction (passed or upcoming).

    Parameters
    • unixReference timestamp as Unix seconds.
    • unix_msReference timestamp as Unix milliseconds.
    • isoReference timestamp as ISO 8601.
    • source_tzInterpret a local iso= reference as wall time in this IANA zone.
    • source_ipInterpret a local iso= reference using this IP address timezone.
    • source_latLatitude hint for local iso=. Pair with source_lon.
    • source_lonLongitude hint for local iso=. Pair with source_lat.
    • source_offsetInterpret a local iso= reference against a fixed UTC offset.
    • compare_unixOptional comparison timestamp as Unix seconds instead of now.
    • compare_unix_msOptional comparison timestamp as Unix milliseconds instead of now.
    • compare_isoOptional comparison timestamp as ISO 8601 instead of now.
    • compare_source_tzInterpret a local compare_iso= timestamp as wall time in this IANA zone.
    • compare_source_ipInterpret a local compare_iso= timestamp using this IP address timezone.
    • compare_source_latLatitude hint for local compare_iso=. Pair with compare_source_lon.
    • compare_source_lonLongitude hint for local compare_iso=. Pair with compare_source_lat.
    • compare_source_offsetInterpret a local compare_iso= timestamp against a fixed UTC offset.
    • tzCompare against the current time in this IANA timezone.
    • ipCompare against the current time in the timezone of this IP address.
    • latTarget latitude. Pair with lon.
    • lonTarget longitude. Pair with lat.
    • offsetCompare against the current time at this fixed UTC offset.
    • formatDuration template using %days %hours %minutes %seconds for an additional `formatted` field.
    • business_daysSet true to include a business_days count in the response.
    • holiday_countryISO 3166-1 alpha-2 holiday calendar (e.g. FR). Requires business_days=true.
    • holiday_subdivisionSubdivision code from python-holidays. Requires holiday_country and business_days=true.
    • signSet true for a signed response.
    Code sample
    curl "https://api.timelogicapi.com/v1/time/elapsed?unix=1711300000" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    Sample response
    {
      "seconds": 525695,
      "minutes": 8761,
      "hours": 146,
      "days": 6,
      "human": "146 hours, 1 minute, 36 seconds",
      "direction": "passed"
    }
    
    Additional endpoint notes

    Exactly one input form is required (unix, unix_ms, or iso).

    .https://api.timelogicapi.com/v1/time/elapsed?iso=2026-04-30T16:42:11Z
    .https://api.timelogicapi.com/v1/time/elapsed?unix=1711300000
    

    direction is passed if the reference is in the past, left if in the future.

    Common errors

    • 400 INVALID_TIMESTAMP — no input timestamp provided.

    When to use this endpoint

    Use Elapsed since to show how much time has passed since a timestamp or how much time is left until a future timestamp. It is a compact fit for status pages, billing windows, event countdowns, and audit interfaces.

    Request model

    Provide exactly one reference timestamp as unix, unix_ms, or iso. The endpoint compares that reference against the current request time and returns normalized duration fields plus a human-readable string.

    Direction semantics

    The direction field tells you whether the reference is already passed or still left. Use that value to label UI states without reimplementing comparison logic in the browser.

    Calendar projection

    GET /v1/time/calendar

    Calendar fields (year, month, day) for a target instant resolved through any selector.

    Parameters
    • unixInput timestamp as Unix seconds. Defaults to now.
    • unix_msInput timestamp as Unix milliseconds.
    • isoInput timestamp as ISO 8601.
    • tzProject into this IANA zone.
    • ipProject into the zone of this IP.
    • latLatitude, pair with lon.
    • lonLongitude.
    • offsetProject against a fixed UTC offset (URL-encode + as %2B).
    • weekSet true to include the ISO week_number.
    • formatstrftime pattern for an extra `formatted` field.
    • signSet true for a signed response.
    Code sample
    curl "https://api.timelogicapi.com/v1/time/calendar?tz=Europe/Paris&week=true" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    Sample response
    {
      "unix": 1778093026,
      "unix_ms": 1778093026668,
      "utc": "2026-05-06T18:43:46Z",
      "iso_local": "2026-05-06T20:43:46+02:00",
      "rfc2822": "Wed, 06 May 2026 20:43:46 +0200",
      "human": "May 6, 2026, 8:43 PM Europe/Paris",
      "day_number": 4,
      "day_short": "Wed",
      "day_full": "Wednesday",
      "timezone": "Europe/Paris",
      "year": 2026,
      "month": 5,
      "month_name": "May",
      "day": 6,
      "week_number": 19
    }
    
    Additional endpoint notes
    .https://api.timelogicapi.com/v1/time/calendar?tz=Europe/Paris&week=true
    .https://api.timelogicapi.com/v1/time/calendar?unix=1711300000&tz=Europe/Paris
    

    Common errors

    • 400 AMBIGUOUS_TARGET — multiple input or target selector families.
    • 400 INVALID_PARAMETER — bad timezone, offset, or strftime directive.

    When to use this endpoint

    Use Calendar projection when you need calendar fields for a target instant after resolving it through a timezone, IP address, coordinates, or fixed offset. It is useful for reports, date pickers, locale-aware grouping, and analytics labels.

    Request model

    Choose a timestamp input or omit it to project the current request time. Then choose a single target selector family (tz, ip, lat + lon, or offset) to define the calendar context.

    Response notes

    Calendar fields are derived after timezone resolution, so the same UTC instant can produce different year, month, day, weekday, and day-of-year values in different zones.

    DST status

    GET /v1/time/dst

    Whether a zone is currently observing daylight saving time, plus the resolved local time.

    Parameters
    • tzIANA timezone.
    • ipIPv4 or IPv6 address.
    • latLatitude, pair with lon.
    • lonLongitude.
    • offsetFixed UTC offset (URL-encode + as %2B). Always returns dst_active=false.
    • formatstrftime pattern for an additional `formatted` field, e.g. %Y-%m-%d %H:%M:%S.
    • nextSet true to include the next DST transition when available.
    • signSet true for a signed response.
    Code sample
    curl "https://api.timelogicapi.com/v1/time/dst?tz=Europe/Paris" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    Sample response
    {
      "unix": 1778093027,
      "unix_ms": 1778093027004,
      "utc": "2026-05-06T18:43:47Z",
      "iso_local": "2026-05-06T20:43:47+02:00",
      "rfc2822": "Wed, 06 May 2026 20:43:47 +0200",
      "human": "May 6, 2026, 8:43 PM Europe/Paris",
      "day_number": 4,
      "day_short": "Wed",
      "day_full": "Wednesday",
      "timezone": "Europe/Paris",
      "dst_active": true
    }
    
    Additional endpoint notes
    .https://api.timelogicapi.com/v1/time/dst?tz=Europe/Paris
    .https://api.timelogicapi.com/v1/time/dst?ip=8.8.8.8
    

    Use at most one selector family. If no selector is provided, the response defaults to UTC.

    When to use this endpoint

    Use DST status to determine whether a resolved target is currently observing daylight saving time. It is best for timezone diagnostics, support tooling, calendar UI warnings, and systems that need to explain offset changes.

    Request model

    Choose at most one selector family: tz, ip, lat + lon, or offset. If no selector is provided, the response defaults to UTC. Fixed offsets are not zones and therefore always return dst_active=false because a numeric offset has no daylight-saving rules.

    Display guidance

    Pair dst_active with timezone, iso_local, and utc when showing users why local time differs from a standard offset. This is especially helpful around spring-forward and fall-back transitions.

    Resolve timezone

    GET /v1/timezone

    Canonical IANA timezone for an IP or coordinate, with current offset and DST flag.

    Parameters
    • tzIANA timezone to resolve directly.
    • ipIPv4 or IPv6 (resolved via GeoLite2).
    • latLatitude. Pair with lon.
    • lonLongitude.
    • offsetFixed UTC offset for matching zones (URL-encode + as %2B).
    • signSet true for a signed response.
    Code sample
    curl "https://api.timelogicapi.com/v1/timezone?ip=8.8.8.8" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    Sample response
    {
      "unix": 1778093027,
      "unix_ms": 1778093027712,
      "utc": "2026-05-06T18:43:47Z",
      "iso_local": "2026-05-06T20:43:47+02:00",
      "rfc2822": "Wed, 06 May 2026 20:43:47 +0200",
      "human": "May 6, 2026, 8:43 PM Europe/Paris",
      "day_number": 4,
      "day_short": "Wed",
      "day_full": "Wednesday",
      "timezone": "Europe/Paris",
      "offset": 120,
      "dst": true
    }
    
    Additional endpoint notes

    offset is the current UTC offset in minutes. timezone is the canonical IANA name.

    .https://api.timelogicapi.com/v1/timezone?ip=8.8.8.8
    .https://api.timelogicapi.com/v1/timezone?lat=48.8566&lon=2.3522
    

    IP resolution uses MaxMind GeoLite2.

    When to use this endpoint

    Use Resolve timezone when you need to turn an IP address or latitude/longitude pair into a canonical IANA timezone. It is useful for onboarding, personalization, analytics enrichment, and timezone-aware defaults.

    Request model

    Provide either ip or the lat + lon pair. The endpoint returns the resolved IANA name, current local time, UTC offset in minutes, and a DST flag for the resolved zone.

    Accuracy guidance

    Coordinate resolution is usually the most explicit option. IP-based resolution is convenient for defaults, but users should be able to override it when precision matters.

    Embeddable clock

    GET /v1/time/clock

    Returns a self-bootstrapping HTML fragment (host div + JSON config + CSS/JS includes) that renders a live clock.

    Parameters
    • style(required)One of 30 named styles. See list below.
    • tzTarget IANA timezone.
    • ipTarget via IP address.
    • latTarget latitude. Pair with lon.
    • lonTarget longitude.
    • offsetTarget fixed UTC offset (URL-encode + as %2B).
    • unixPin the clock to a specific Unix-second instant.
    • unix_msPin the clock to a specific Unix-millisecond instant.
    • isoPin the clock to a specific ISO 8601 instant.
    • source_tzInterpret a local iso= against this IANA zone.
    • formatstrftime pattern for digital styles, e.g. %H:%M:%S.
    Code sample
    curl "https://api.timelogicapi.com/v1/time/clock?tz=Europe/Paris&style=analog-station" \
      -H "Authorization: Bearer $TIMELOGIC_API_KEY"
    Sample 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:

    Analoganalog-station, analog-aviation, analog-bauhaus, analog-graphite, analog-arctic, analog-brass, analog-marine, analog-grid, analog-slate, analog-executive.

    Digitaldigital-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 unknown style. The error body lists all valid_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.

    Public signing key (JWKS)

    GET /.well-known/time-api-public-key

    JWKS document containing the Ed25519 public key used to verify signed responses.

    Code sample
    curl "https://api.timelogicapi.com/.well-known/time-api-public-key"
    Sample response
    {
      "keys": [
        {
          "kty": "OKP",
          "crv": "Ed25519",
          "alg": "EdDSA",
          "use": "sig",
          "key_ops": ["verify"],
          "ext": true,
          "kid": "ed25519-2026-07-19",
          "x": "LUuZFwpGBGvPS-4vJdLM21_IreJqea-aoyXRhGfH3dI"
        }
      ]
    }
    
    Additional endpoint notes

    Returned as application/json. Cache the JWKS and rotate when a new kid appears.

    When you request a signed response (sign=true), the API returns these headers:

    • X-TimeLogic-Key-Id — JWKS kid to look up.
    • X-TimeLogic-Signature-Alg — currently Ed25519.
    • X-TimeLogic-Signature-Timestamp — Unix seconds when the signature was produced.
    • X-TimeLogic-Content-SHA256 — base64 SHA-256 of the response body.
    • X-TimeLogic-Signature-Input — Base64URL-encoded exact UTF-8 v1 envelope.
    • X-TimeLogic-Signature — base64 Ed25519 signature over the decoded X-TimeLogic-Signature-Input bytes.

    Verify by recomputing the SHA-256 of the body, comparing it to content-sha256 inside the decoded envelope, and validating the Ed25519 signature with the JWKS key matching the envelope kid. Do not rebuild the envelope.

    When to use this endpoint

    Use Public signing key (JWKS) when you request signed TimeLogic responses and need to verify response integrity. It is intended for clients that require tamper-evidence across proxies, logs, or downstream services.

    Request model

    Fetch the JWKS document and cache it by kid. When a signed API response arrives, decode X-TimeLogic-Signature-Input and use its kid to select the correct public key before verifying the signature.

    Verification guidance

    The v1 envelope signs status, method, origin-form path plus query, timestamp, and body hash. It deliberately excludes scheme, host, and Content-Type, so clients can verify a response through either the RapidAPI proxy host or gateway host without rebuilding host-dependent bytes. Rotate cached keys when a new kid appears.

    Try it on the site: the signed-response verifier runs entirely in your browser — paste a response body and the X-TimeLogic-* headers, pick the kid, and check the signature without sending anything to a server.