Developers
Create and manage API keys
Generate API keys so you can send messages, manage contacts, and trigger campaigns from your own code.
Updated
On this page
API keys let external systems talk to WaSMS programmatically. Each key has defined scopes.
1. Create a key
- In the dashboard menu, open Developers, API keys.
- Click Create API key.
- Name it.
- Pick scopes.
- Click Create and copy the key. You can copy it again later from the same page.
Available scopes
messages:send— send messagesmessages:read— read message historycontacts:read,contacts:writeotp:send,otp:verifycampaigns:read,campaigns:writewebhooks:manage
2. Use the key
Put the key in the Authorization header of every request. This sends one WhatsApp message:
Copy and paste
curl -X POST https://wasms.net/api/public/v1/whatsapp/send \
-H "Authorization: Bearer YOUR_WASMS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "923001234567", "message": "Hello from my software"}'The same request in PHP, Python and Node.js, and what each reply means, is in Send a WhatsApp message with the API.
3. Copy / Revoke
- Copy — copies the full key to your clipboard.
- Revoke — immediately disables.
Security
- Never commit API keys to Git.
- Rotate when team members leave.
- Use scopes — do not give blanket access.
- Each key shows how many requests it made and how many failed. Check it now and then.