REST API

Citatly exposes a single read-only endpoint that returns today’s quote as JSON:

GET /wp-json/citatly/v1/today

Example response

{
  "text": "It does not matter how slowly you go as long as you do not stop.",
  "author": "Confucius",
  "extra": "Philosopher, ~500 BC"
}

Caching headers

The endpoint sends Cache-Control and Expires headers that expire at midnight. This makes the response fully cacheable by CDNs and full-page caches — the quote is fetched once per day per edge node, not once per visitor.

Tested and compatible with WP Rocket, W3 Total Cache, LiteSpeed Cache, and Cloudflare.

The REST API is read-only and requires no authentication. It is intended for frontend JavaScript, headless setups, and external integrations.

Troubleshooting: Quote Not Displaying

The daily quote is loaded via a REST API request in the visitor’s browser. If your site restricts the REST API for unauthenticated visitors, the quote will not be displayed.

To fix this, whitelist the endpoint citatly/v1/today in your security or performance plugin. Refer to its documentation for details.

Note: If you are using Perfmatters, the plugin registers the exception automatically — no manual configuration needed.