ai

GET /v1/ai/site-agent/allowance

How many self-serve site checks are left this month.

Tutti gli endpoint ai

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione sites.view; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

L'ID della tua organizzazione va qui

Questo endpoint accetta org_id come parametro di query. Omettilo e la chiamata coprirà l'intero sottoalbero del tuo tenant; invialo per limitare la chiamata a una singola organizzazione.

L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

curl -X GET https://api.zinndigital.com/v1/ai/site-agent/allowance \
  -H "Authorization: Bearer zdk_live_…"

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

One allowance per organization per calendar month, sized by how many sites the organization has — not per site. Free grants from staff are added to it. Checks run from the **support ticket form are free and unmetered** and never appear in `used`: a customer who has exhausted their allowance can still open a ticket and still gets a full check on their site. `in_good_standing` is false while an account is suspended or unpaid, which pauses metered checks only — the ticket path and previously-purchased results are unaffected. Requires `sites.view`.

Parametri

NomeTipoObbligatorioChe cos'è
org_id (query)UuidNoWhich organization this is about. Required when the caller belongs to more than one; a caller in exactly one may omit it.

Risposta

NomeTipoObbligatorioChe cos'è
tierstringThe tier this organization falls into.
monthlyintegerChecks from the tier
grantedintegerExtra checks granted by staff that have not expired.
totalinteger`monthly` + `granted`.
usedintegerBillable checks used this period. Ticket and staff checks are never counted.
remaininginteger
exhaustedbooleanThe monthly allowance is spent. ⛔ This does NOT mean checks are refused — see `credit_checks`. Rendering "0 left" on this field alone tells a customer whose credit covers hundre…
credit_checksintegerNoHow many further checks the organization's Zinn® AI credit would cover once the allowance is gone. The allowance is the *included* tier of the one meter; beyond it a check is fu…
exhausted_entirelybooleanNoOut of allowance AND out of credit — the only state in which a self-serve check is actually refused.
in_good_standingbooleanFalse while the account is suspended or unpaid. Pauses metered checks only — the ticket path stays free and previously-purchased results stay readable.
period_startstring

Errori che questo endpoint può restituire

401 · 403 · 422 · 429