Create and manage API keys
Generate API keys so you can send messages, manage contacts, and trigger campaigns from your own code.
Last updated 2026-05-31
API keys let external systems talk to WaSMS programmatically. Each key has defined scopes.
1. Create a key
- Go to Dashboard → API Keys.
- Click + New API key.
- Name it.
- Pick scopes.
- Click Create. Full key is shown once — copy it now.
Available scopes
messages:send— send messagesmessages:read— read message historycontacts:read,contacts:writeotp:send,otp:verifycampaigns:read,campaigns:writewebhooks:manage
2. Use the key
curl https://wasms.net/api/public/v1/messages -H "Authorization: Bearer wasms_xxxxxxxxxxxxxxxx" -d '{"to":"+9230....","text":"Hello"}'3. Copy / Revoke
- Copy — reveal the full key once authenticated.
- Revoke — immediately disables.
Security
- Never commit API keys to Git.
- Rotate when team members leave.
- Use scopes — do not give blanket access.
- Watch audit log on the API Keys page.