Skip to content

Account & usage

View as Markdown

Check your key and what it can do.

Endpoints

Check your API key

gethttps://api.saei.automize.sa/v1/me
  • Scope: Any valid key
  • Works in test mode

Returns the workspace, the key's mode and scopes, and your rate limit. The quickest way to confirm a key works.

Response fields200
  • object"api_key_context"required
  • livemodebooleanrequired

    false for a test key: sends are simulated and never reach WhatsApp.

  • workspaceobjectrequired
    Child fields (2)
    • idstringrequired
    • namestring | nullrequired
  • api_keyobjectrequired
    Child fields (5)
    • idstringrequired
    • namestringrequired
    • prefixstringrequired
    • scopesarray<string>required
    • expires_atstring | nulloptional
  • rate_limitobjectrequired
    Child fields (2)
    • limitintegerrequired
    • window_secondsintegerrequired
Errors this can return5
Try it
curl -X GET https://api.saei.automize.sa/v1/me \
  -H "Authorization: Bearer $API_KEY"
Response

The key works.

{
  "object": "api_key_context",
  "livemode": false,
  "workspace": {
    "id": "ws_12",
    "name": "Riyadh Coffee"
  },
  "api_key": {
    "id": "key_7",
    "name": "Order system",
    "prefix": "sk_test_Ab12Cd",
    "scopes": [
      "messages:send",
      "messages:read",
      "webhooks:read",
      "webhooks:write"
    ],
    "expires_at": null
  },
  "rate_limit": {
    "limit": 60,
    "window_seconds": 60
  }
}

Get usage

gethttps://api.saei.automize.sa/v1/usage
  • Scope: usage:read
  • Works in test mode

What the workspace has used this billing period against its plan (marketing and service messages, campaigns, contacts, templates, flows, numbers), and how this key's mode has called the API over the last 30 days.

Check remaining before a large send to avoid a quota_exceeded. limit and remaining are null for an unlimited allowance.

Response fields200
  • object"usage"required
  • periodobjectrequired
    Child fields (2)
    • startstringoptional
    • endstringoptional
  • allowancesarray<object>required
    Child fields (5)
    • keystringrequired

      e.g. marketing_messages_month, service_messages_month, campaigns_month, contacts, message_templates, active_flows, whatsapp_numbers.

    • typestringrequired

      monthly resets each billing period; total counts what exists now.

      One ofmonthlytotal

    • usedintegerrequired
    • limitinteger | nulloptional
    • remaininginteger | nulloptional
  • apiobjectrequired
    Child fields (6)
    • livemodeboolean | nulloptional
    • window_daysintegeroptional
    • requestsintegeroptional
    • errorsintegeroptional
    • error_ratenumberoptional
    • by_dayarray<object>optional
      Child fields (3)
      • datestringoptional
      • requestsintegeroptional
      • errorsintegeroptional
Errors this can return1
Try it
curl -X GET https://api.saei.automize.sa/v1/usage \
  -H "Authorization: Bearer $API_KEY"
Response

The usage report.

{
  "object": "usage",
  "period": {
    "start": "2026-10-01T00:00:00Z",
    "end": "2026-11-01T00:00:00Z"
  },
  "allowances": [
    {
      "key": "marketing_messages_month",
      "type": "monthly",
      "used": 4120,
      "limit": 10000,
      "remaining": 5880
    },
    {
      "key": "service_messages_month",
      "type": "monthly",
      "used": 18230,
      "limit": null,
      "remaining": null
    },
    {
      "key": "contacts",
      "type": "total",
      "used": 9214,
      "limit": 25000,
      "remaining": 15786
    }
  ],
  "api": {
    "livemode": true,
    "window_days": 30,
    "requests": 48213,
    "errors": 212,
    "error_rate": 0.0044,
    "by_day": [
      {
        "date": "2026-09-30",
        "requests": 1804,
        "errors": 6
      }
    ]
  }
}