ai

GET /v1/ai/site-agent/allowance

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

Todos os endpoints de ai

Autenticação

Envie uma chave de API como um token de portador. A chave deve ter a permissão sites.view; uma chave sem ela é recusada com 403, e não 404.

Onde vai o ID da sua organização

Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.

O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

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

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

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

NomeTipoObrigatórioO que é
org_id (query)UuidNãoWhich organization this is about. Required when the caller belongs to more than one; a caller in exactly one may omit it.

Resposta

NomeTipoObrigatórioO que é
tierstringSimThe tier this organization falls into.
monthlyintegerSimChecks from the tier
grantedintegerSimExtra checks granted by staff that have not expired.
totalintegerSim`monthly` + `granted`.
usedintegerSimBillable checks used this period. Ticket and staff checks are never counted.
remainingintegerSim
exhaustedbooleanSimThe 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_checksintegerNãoHow 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_entirelybooleanNãoOut of allowance AND out of credit — the only state in which a self-serve check is actually refused.
in_good_standingbooleanSimFalse while the account is suspended or unpaid. Pauses metered checks only — the ticket path stays free and previously-purchased results stay readable.
period_startstringSim

Erros que este endpoint pode retornar

401 · 403 · 422 · 429