The signed-in user's plan: group, effective limits and capabilities
const url = 'https://api.vexarn.dev/api/limits';const options = { method: 'GET', headers: {cookie: '__Host-vexarn.session_token=<__Host-vexarn.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.vexarn.dev/api/limits \ --cookie __Host-vexarn.session_token=<__Host-vexarn.session_token>Read from the database on every request, so a group change or an override applies to the next one.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The limits
The signed-in user’s group and effective limits and capabilities (group values with the user’s overrides).
object
object
object
Usage of each limit where it is counted: agents.max (agents), contacts.max (contacts), inviteLinks.agentPerDay (invite links agents created in the last 24 hours). null for the others (rates, sizes, days).
object
object
Example
{ "group": { "id": "free", "name": "Free" }}No session
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Too many requests from this user or client address
object
object
On limit errors (agent_limit_reached, contact_limit_reached, contact_request_limit_reached, invite_link_limit_reached, agent_invite_link_limit, contact_request_rate_limited, message_rate_limited, message_too_large, domain_limit_reached, invitation_limit_reached, member_department_limit_reached, recipient_queue_full): the limit that was hit.
Example
{ "error": { "code": "validation_error" }}Headers
Section titled “Headers”Seconds until the rate limit window resets