Set up spend limits
Enable thedaily_spend_limit_enabled flag and set a daily_spend_limit value (in USD) on your messaging profile:
The
daily_spend_limit value is a string representing USD (e.g., "0.50", "10.00", "100.00"). It applies per messaging profile — use separate profiles for different budgets.When the limit is reached
Once spending exceeds the configured limit, Telnyx:- Rejects new messages with HTTP
429and error code40333 - Sends a webhook to your configured URL
- Sends an email notification to your account
Error response
Webhook payload
Handle the spend limit webhook
Process the webhook to alert your team and gracefully handle the blocked state:Track spending
Monitor your messaging spend to take action before hitting the limit:Reset and override
Automatic daily reset
Automatic daily reset
The running spend total resets automatically at midnight UTC each day. After reset, messages can be sent until the limit is exceeded again.
Temporary override (disable and re-enable)
Temporary override (disable and re-enable)
If you’ve hit the limit but need to send urgent messages, temporarily disable the limit:
Increase the limit
Increase the limit
Raise the This takes effect immediately — if current spend is 25.00, messages will flow again until $25.00 is reached.
daily_spend_limit to allow more messages until the new limit is reached:Best practices
Set limits on all production profiles
Even if you don’t expect high spend, a limit prevents runaway costs from application bugs or compromised API keys.
Use separate profiles for different use cases
Create separate messaging profiles for transactional messages (OTP, alerts) and marketing messages, each with appropriate limits.
Set up webhook monitoring
Always handle the
messaging-profile.spend-limit-reached webhook to alert your team immediately.Build in error handling for 40333
Your application should gracefully handle the
40333 error code — queue messages for later delivery or switch to a backup profile.Related resources
Messaging Profiles API
API reference for configuring messaging profile settings.
Message Detail Records
Track message costs and delivery status.
Rate Limiting
Understand message throughput limits.
Webhooks
Configure webhooks to receive spend limit notifications.