CredaCreda

Developers

Creda Connect SMS API

Send bulk and personalised SMS to Ghanaian numbers from your own app, website or system, using the same credits and approved sender IDs as your Creda account.

Overview

All requests use HTTPS and JSON. Base URL:

https://creda.credit/api/public/v1
  • Recipients must be Ghanaian mobile numbers (e.g. 0241234567 or +233241234567). Up to 500 per request; duplicates are removed.
  • 1 credit = 1 SMS segment per recipient. Messages can be up to 6 segments.
  • You may only send with sender IDs approved on your account. Apply in Creda under Connect → Sender ID.
  • You must have your recipients' permission to message them, and confirm it with "permission": true.

Authentication

Create keys in your Creda account under Connect → API access. Send the key in the Authorization header:

Authorization: Bearer cr_live_...

Sandbox keys cr_sandbox_

Check your requests safely. No SMS is sent and no credits are used.

Live keys cr_live_

Send real SMS and use your credits, exactly like the website composer.

Keys are shown once, expire after 90 days and can be revoked any time. Keep them on your server only — never in a website, mobile app or public code.

Idempotency

Every send needs an Idempotency-Key header: 8–128 letters, digits, underscores or dashes, unique per message you intend to send. If your connection drops, retry with the same key and body — you will get the original result and will never be charged twice. Reusing a key with a different body returns 409.

Rate limits

30 requests per minute per account, across all keys. Above that you receive 429 with a Retry-After: 60 header.

Send SMS

POST/v1/sms/send

FieldDescription
senderRequired. Approved sender ID, 3–11 letters/digits.
recipientsRequired. 1–500 Ghanaian numbers.
messageRequired. Text, optionally with {{name}}.
permissionRequired. Must be true.
namesOptional. Map of number → name for {{name}}.
fallbackOptional. Name used when none is given (default “Customer”).
curl -X POST https://creda.credit/api/public/v1/sms/send \
  -H "Authorization: Bearer $CREDA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042-reminder" \
  -d '{
    "sender": "MyShop",
    "recipients": ["0241234567", "+233201234567"],
    "message": "Hello {{name}}, your order is ready.",
    "names": { "0241234567": "Ama" },
    "fallback": "Customer",
    "permission": true
  }'

Response (live)

{
  "environment": "live",
  "id": "3f6c…",
  "status": "submitted",
  "segments": 1,
  "recipient_count": 2,
  "credits": 2,
  "duplicate": false
}

“submitted” means the network accepted the message; check delivery later via Messages. Sandbox responses include "simulated": true and "live_credits_consumed": 0.

Credit balance

GET/v1/credits/balance

curl https://creda.credit/api/public/v1/credits/balance \
  -H "Authorization: Bearer $CREDA_API_KEY"
{ "environment": "live", "credits": 120 }

Sender IDs

GET/v1/senders

Lists the sender IDs you can use.

curl https://creda.credit/api/public/v1/senders \
  -H "Authorization: Bearer $CREDA_API_KEY"
{ "environment": "live", "senders": [{ "sender": "MyShop", "source": "admin_review" }] }

Messages

GET/v1/messages?limit=20&cursor=…

GET/v1/messages/{id}

Newest first, 1–100 per page. Pass next_cursor as cursor for the next page. Delivery details appear once reports are available.

curl https://creda.credit/api/public/v1/messages?limit=20 \
  -H "Authorization: Bearer $CREDA_API_KEY"

Errors

Errors return JSON like { "error": "Insufficient credits." }.

CodeMeaning
400Invalid request: bad sender, recipients, message, permission or Idempotency-Key.
401Missing, invalid, revoked or expired API key.
402Not enough credits for this send (live keys).
403Key lacks the required permission, or the sender ID is not approved for your account.
404Message not found on your account.
409This Idempotency-Key was already used with a different request body.
413Request body larger than 64 KB.
422The network rejected the message. Reserved credits were returned.
429More than 30 requests in a minute. Wait for Retry-After (60 seconds).
202Accepted but the network result is not yet confirmed. Credits stay reserved; retry only with the same Idempotency-Key.
503Temporary service problem. Retry with the same Idempotency-Key.

Need help? Contact support.