NairaSMS
/

Authentication

NairaSMS uses API key and API secret pairs for public developer requests. Keys are scoped, revocable, and tied to a workspace wallet.

Request Headers

Every protected developer endpoint requires both headers.

X-API-Key: pk_live_xxxxxxxxx
X-API-Secret: sk_live_xxxxxxxxx
Content-Type: application/json

Create API Key

Dashboard-authenticated users can create API keys from the developer API using their dashboard JWT.

POST/v1/keys
OptionTypeRequiredDescription
namestringyesHuman-readable key name.
scopesobjectyesPermissions such as sms, otp, campaigns, sender_ids, and balance.
prefixstringnopk_live or pk_test.
expiresInDaysnumbernoOptional expiry window.
{
  "name": "Production website",
  "prefix": "pk_live",
  "scopes": {
    "sms": true,
    "otp": true,
    "campaigns": true,
    "sender_ids": true,
    "balance": true
  }
}

Scopes

Scopes keep integrations limited to the actions they need. A key without the required scope receives a 403 error.

OptionTypeRequiredDescription
smsbooleannoSend one or more SMS messages.
otpbooleannoSend and verify SMS OTPs.
campaignsbooleannoCreate and inspect SMS campaigns.
sender_idsbooleannoRequest and list sender IDs.
balancebooleannoRead wallet balance.