Skip to content

Message Usage GET

Get today's message usage against your plan's daily limit.

Endpoint

GET https://api.pocketalert.app/v1/messages/usage

Authentication

Required

Include one of these headers in your request:

  • Token: <your-api-key> — Get it from API Keys
  • Authorization: Bearer <jwt-token> — From Login

Request

Example Request

bash
curl -X GET "https://api.pocketalert.app/v1/messages/usage" \
  -H "Token: your-api-key"
javascript
const response = await fetch('https://api.pocketalert.app/v1/messages/usage', {
  headers: { 'Token': 'your-api-key' }
});
const usage = await response.json();
python
import requests

response = requests.get(
    'https://api.pocketalert.app/v1/messages/usage',
    headers={'Token': 'your-api-key'}
)
print(response.json())
php
$response = Http::withHeaders([
    'Token' => 'your-api-key',
])->get('https://api.pocketalert.app/v1/messages/usage');

return $response->json();

Response

Success Response

200 OK

Returns today's usage. The day is the UTC day.

FieldTypeDescription
usedintegerMessages accepted today
limitinteger | nullMessages allowed per day, null on unlimited plans
unlimitedbooleantrue when the plan has no daily limit
rejectedintegerRequests refused today because the limit was reached
resets_atstringNext reset, 00:00 UTC, in RFC3339
json
{
  "used": 42,
  "limit": 50,
  "unlimited": false,
  "rejected": 0,
  "resets_at": "2026-09-22T00:00:00Z"
}

On an unlimited plan:

json
{
  "used": 1280,
  "limit": null,
  "unlimited": true,
  "rejected": 0,
  "resets_at": "2026-09-22T00:00:00Z"
}

Error Responses

StatusDescription
401Unauthorized — Invalid or missing token

Use Case

Check used against limit before a burst of alerts, or show remaining quota in your own dashboard. The same numbers come back on every Create Message response as X-PA-Daily-* headers.

Pocket Alert Documentation