API keys are deactivated by default after one year of inactivity. This can lead to unexpected interruptions if the key no longer works after very sporadic use and SMS messages can no longer be sent. To prevent this, the API key must be used regularly. A simple way to ensure this is to regularly check the SMS balance.
By checking the credit, the API key is registered as “in use” and remains active. You can use the corresponding API endpoint to query the current balance. Even if you do not send an SMS via the API, this simple query means that the key is considered to be in use and will not expire.
To check whether the key is still active and when it was last used, you can check the developer dashboard in your account. There you will find a detailed overview of the API keys and their last usage times. This information helps you to ensure that the key remains valid.
Browser
https://gateway.seven.io/api/balance?p=YOUR_API_KEY
Bash
curl https://gateway.seven.io/api/balance \
-H “X-API-Key: YOU_API_KEY”
It is therefore sufficient to keep the API key active regularly using simple queries like this to prevent deactivation. This ensures that your SMS service works without interruptions.