ai
GET /v1/ai/site-agent/allowance
How many self-serve site checks are left this month.
Autenticación
Envía una clave de API como token de portador. La clave debe tener el permiso sites.view; una clave que no lo tenga se rechazará con un código 403, no 404.
Donde va el ID de tu organización
Este endpoint acepta org_id como parámetro de consulta. Omítelo y la llamada abarcará todo tu subárbol de inquilinos; envíalo para acotar la llamada a una sola organización.
El id de tu organización se encuentra en la pantalla de claves de API en tu panel de control, junto a la propia clave. Es el mismo id en cada llamada que realices.
Pruébalo
Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.
curl -X GET https://api.zinndigital.com/v1/ai/site-agent/allowance \
-H "Authorization: Bearer zdk_live_…"¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API
Detalles
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`.
Parámetros
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
org_id (query) | Uuid | No | Which organization this is about. Required when the caller belongs to more than one; a caller in exactly one may omit it. |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
tier | string | Sí | The tier this organization falls into. |
monthly | integer | Sí | Checks from the tier |
granted | integer | Sí | Extra checks granted by staff that have not expired. |
total | integer | Sí | `monthly` + `granted`. |
used | integer | Sí | Billable checks used this period. Ticket and staff checks are never counted. |
remaining | integer | Sí | — |
exhausted | boolean | Sí | The 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_checks | integer | No | How 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_entirely | boolean | No | Out of allowance AND out of credit — the only state in which a self-serve check is actually refused. |
in_good_standing | boolean | Sí | False while the account is suspended or unpaid. Pauses metered checks only — the ticket path stays free and previously-purchased results stay readable. |
period_start | string | Sí | — |
Errores que este endpoint puede devolver
401 · 403 · 422 · 429