Developer Portal & API
A free, keyless HTTP API for computing Discord <t:UNIX:FORMAT> codes — the same engine behind the interactive generator, callable from a script, a bot, or an agent.
No API key required
Every endpoint below is public and read-only. There's no sign-up, no API key, and no OAuth flow — send a request and get a response back.
Writing a Discord bot in JavaScript or Python rather than making an HTTP call? Check out our Discord Timestamp Bot & Embed Guide for native discord.js v14 and discord.py snippets.
OpenAPI specification
The full machine-readable spec — operation IDs, typed parameters, and response/error schemas — is published at /openapi.json. Point any OpenAPI-aware tool, codegen client, or LLM function-calling setup at it directly.
Quickstart
Compute a single format code for a specific moment:
curl "https://discordtimestampgen.com/api/timestamp?datetime=2025-12-25T09:00:00-05:00&format=F"Omit format to get all 7 codes for that moment at once:
curl "https://discordtimestampgen.com/api/timestamp?datetime=2025-12-25T09:00:00-05:00"Already have a Unix timestamp — from your own database, a bot, or another API — instead of an ISO datetime? Pass unix instead of datetime (seconds or milliseconds, detected automatically):
curl "https://discordtimestampgen.com/api/timestamp?unix=1766671200&format=F"Look up the reference table of format codes:
curl "https://discordtimestampgen.com/api/formats"Errors
Every error response is JSON, on the matching HTTP status code, with a machine-readable code, a human-readable message, and a hint describing how to fix the request:
{
"error": {
"code": "invalid_datetime",
"message": "\"12/25/2025\" is not a valid ISO 8601 datetime with a UTC offset.",
"hint": "Use the form YYYY-MM-DDTHH:MM:SS±HH:MM or end with \"Z\" for UTC, e.g. 2025-12-25T09:00:00-05:00 or 2025-12-25T14:00:00Z."
}
}Markdown content negotiation
Every page on this site — including this one — also serves a Markdown rendition to any client that sends Accept: text/markdown. It's built from the live page content, so it never drifts out of sync with what a browser sees.
curl -H "Accept: text/markdown" https://discordtimestampgen.com/developersTry it now
Runs entirely in your browser — it calls the live API and shows the raw JSON response.
Response will appear here.
Further reading
For the underlying syntax and use cases rather than the API itself, see the format code reference and using timestamps in bots, embeds and webhooks. Want the unix conversion in a browser instead of curl? The Unix timestamp converter does the same lookup interactively.