API Key & Template Messaging
Use Socialone’s Developer section to generate API keys and send WhatsApp template messages securely from your own system.
Overview links: Documentation Home · Settings Overview
Where to Find This
- Settings → Developer.
Settings Quick Map
- Settings → Developer: API keys.
- Settings → Platforms: WhatsApp account IDs.
- Settings Overview
What is an API Key?
An API key allows you to integrate Socialone’s messaging capabilities with your own tools and systems. You can generate and manage multiple API keys, each with specific permissions.
How to Create an API Key
- Go to Settings → Developer in your Socialone dashboard.
- Click Create API Key.
- Enter a name for your API key and select the allowed features, such as Template Messaging.
- Click Create. Your new API key will appear in the list.
How to Use the API Key to Send a WhatsApp Template Message
Use the API key in your backend or cURL to send approved WhatsApp template messages. Below is a sample cURL command:
curl --location --request POST 'https://api.socialone.ai/api/v1/messages/api/send-message/' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"country_code": "91",
"phone_number": "<PHONE_NUMBER>",
"template_id": <TEMPLATE_ID>,
"social_account_id": <SOCIAL_ACCOUNT_ID>,
"variables": ["John"],
"media_file": {
"url": "https://example.com/your-image.jpg"
}
}'Important Notes
- The public API supports single template sends via
/api/send-message/. - Bulk/broadcast sending is available in the UI. If you need bulk API access, contact support.
Fields Explained
- country_code: The recipient’s country code (e.g., "91" for India).(Mandatory)
- phone_number: The recipient’s phone number without the country code prefix (+).(Mandatory)
- template_id: The ID of your approved WhatsApp template.(Mandatory)
- social_account_id: The ID of your connected WhatsApp business account.(Mandatory)
- variables: Any dynamic variables your template uses (e.g., name), can also pass empty list if any dyanamic variable is not needed.(Mandatory)
- media_file: An optional object to include an image or file URL in your message, this will approve image in the template.(Optional)
Best Practices
- Keep your API keys secure. Do not share them publicly.
- Use separate API keys for different environments (e.g., testing, production).
- Rotate API keys periodically for better security.
- Monitor API usage and revoke keys that are no longer needed.
Next Steps
Need Help?
If you have questions about API keys or sending messages, visit our Support Center or check the FAQ page for quick answers.
Related product
SIA turns WhatsApp into your highest-converting channel
Design, personalize, and schedule large-scale WhatsApp outreach with SIA guarding compliance, cadence, and engagement across every journey.
View product →