hosting
GET /v1/sites/{siteId}/mail-log
Messages the site's mail sent or received.
Аутентификација
Пошаљите API кључ као bearer токен. Ова крајња тачка не наводи конкретну дозволу у спецификацији, па свом кључу доделите најмања неопходна овлашћења и проверите одговор уместо да претпостављате.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/mail-log \
-H "Authorization: Bearer zdk_live_…"Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Paginated by the vendor, so has_more is its own answer rather than arithmetic on total. An empty page for a site with no mail is a normal state, not a failure. ⛔ Requires sites.panel_access, not sites.view — unlike every other read on this panel. Sender, recipient and subject lines are the customer's correspondence, the same class of data as their files and their database, and sites.panel_access is the key that already gates both. A principal holding only sites.view gets a 404.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
siteId (path) | Uuid | Да | Site ID (UUIDv7). |
period (query) | string<hourly, daily, weekly, monthly> | Не | How far back to look, in the vendor's own four buckets. |
direction (query) | string<incoming, outgoing> | Не | ⛔ One direction at a time — the vendor has no "both", so a client showing a combined view must make two calls and say which is which. |
search (query) | string | Не | Free-text match on sender, recipient or subject. |
page (query) | integer | Не | — |
page_size (query) | integer | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
data | SiteMailLogEntry[] | Да | — |
total | integer | Да | — |
page | integer | Да | — |
page_size | integer | Да | — |
has_more | boolean | Да | The vendor's own flag, not arithmetic on total. |
period | string | Да | — |
direction | string | Да | — |
periods | string[] | Да | — |
directions | string[] | Да | — |
Грешке које ова крајња тачка може вратити
401 · 403 · 404 · 422 · 429 · 503