Skip to content

Authentication

All API requests must include your API key in the Authorization header.

  1. Log in to your customer dashboard
  2. Go to Settings → API Keys
  3. Click Create API Key
  4. Copy the key — it is shown only once

Pass your key in the Authorization header on every request:

Authorization: Bearer sk_your_api_key_here
Terminal window
curl https://send.virgincareer.lk/api/v1/sms/send \
-H "Authorization: Bearer sk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"to": "+94771234567", "body": "Hello from V SMS!"}'

When creating an API key you can restrict it to specific scopes:

ScopeDescription
sms:sendSend SMS messages
sms:readRead message history
contacts:readRead contacts and groups
contacts:writeCreate and update contacts
campaigns:readRead campaigns
campaigns:writeCreate and manage campaigns
  • Never expose your API key in frontend code or public repositories
  • Rotate keys regularly from your dashboard
  • Use scoped keys — give each integration only the permissions it needs