hosting

GET /v1/sites/{siteId}/wordpress/debug-log

The last lines of the site's WordPress debug log.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/wordpress/debug-log \
  -H "Authorization: Bearer zdk_live_…"

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

The end of the file WordPress writes errors to when WP_DEBUG_LOG is on (wp-content/debug.log, or the path WP_DEBUG_LOG names), read from the site as its own user. At most the last 256 KiB are read and the last 200 lines returned, so a log of any size opens; truncated says older lines exist. supported: false means the platform hosting this site has no debug log surface (a vendor package). ⛔ Requires sites.view and sites.panel_access, even to read: the log carries file paths, SQL and whatever a plugin printed. Fleet only — refused where wp_maintenance is false.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).

Response

NameTypeRequiredWhat it is
supportedbooleanYesFalse where this platform cannot read the site's debug log.
existsbooleanNoFalse when WordPress has not written a log file yet.
size_bytesintegerNoThe whole log file's size.
custom_pathbooleanNoTrue when WP_DEBUG_LOG names a path other than wp-content/debug.log.
linesstring[]NoThe last lines of the log, oldest first.
truncatedbooleanNoTrue when the log holds older lines than lines shows.

Errors this endpoint can return

401 · 403 · 404 · 422 · 429 · 503