BETA

Validates whether the account can use the AI chat right now: whether the plan is active and whether it has tokens available in the current billing period. Intended to check the status before invoking POST /chat or POST /chat/stream, for example to disable the chat input in your UI when allowed is false.

This query does not consume AI tokens.

Resource information
AuthenticationRequired (API Token, Bearer)
Scopemapaprop-chat-ai
HTTP MethodGET
ResponseJSON
Version1

Resource URL

https://mapaprop.app/api/action/mapaprop-chat-ai-v1/validate

Parameters

No parameters. customerId is derived from the authentication token.

Sample code

GET /api/action/mapaprop-chat-ai-v1/validate HTTP/1.1
Host: mapaprop.app
Authorization: Bearer {access_token}

Response

ObjectFieldTypeRequiredDescription
Responseallowedbooleanyestrue if a message can be sent to the chat right now (active plan and tokens available).
enabledbooleanyestrue if the customer has AI chat active/subscribed, regardless of whether tokens remain.
tokensUsedintyesTokens consumed in the current billing period.
tokenLimitintyesToken cap for the current period.
tokensRemainingintyesTokens remaining (never negative).
resetDatestring or nullnoDate on which the period's token counter resets. null if not applicable.
messagestringnoOnly present when there's no active AI subscription on the account (enabled: false).

If the customer has their own AI API key configured ("Bring Your Own Key" / BYO) and that setting is active, allowed can be true even if tokensRemaining is 0 — in that case consumption doesn't come out of the Mapaprop token pool.

Sample response

{
    "allowed": true,
    "enabled": true,
    "tokensUsed": 12450,
    "tokenLimit": 100000,
    "tokensRemaining": 87550,
    "resetDate": "2026-09-01"
}

Example when there's no active AI subscription:

{
    "allowed": false,
    "enabled": false,
    "tokensUsed": 0,
    "tokenLimit": 0,
    "tokensRemaining": 0,
    "resetDate": null,
    "message": "No active AI subscription"
}