> ## Documentation Index
> Fetch the complete documentation index at: https://docs.robase.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-country

> One API, four markets. Auto-detection, per-country pricing, currency handling.

Robase supports sending to:

| Country       | ISO | Dial code | Currency |
| ------------- | --- | --------- | -------- |
| Nigeria       | NG  | +234      | NGN      |
| Ghana         | GH  | +233      | GHS      |
| Kenya         | KE  | +254      | KES      |
| Côte d'Ivoire | CI  | +225      | XOF      |

You send to all four through the same `POST /v1/sms` endpoint. There's no country routing step — we derive it.

## Country auto-detection

We parse the E.164 dial code on `to` and tag the message with the detected country:

```typescript theme={null}
await pm.sms.send({
  to:   '+233201234567',        // Ghana
  from: 'SHUTTLERS',
  body: 'Your ride arrives in 3 minutes.',
});
// → Response: country: "GH", cost: { amount_kobo: 15, currency: "GHS" }
```

Override when needed (rarely):

```typescript theme={null}
await pm.sms.send({
  to: '+2348012345678',
  from: 'SHUTTLERS',
  body: '...',
  country: 'NG',   // force country even if dial code is ambiguous
});
```

## Pricing per country

Your plan has a **per-country rate map**. When a country isn't in the map, we fall back to the plan's default NGN rate.

| Plan    | NG (NGN)   | GH (GHS)   | KE (KES)   | CI (XOF)   |
| ------- | ---------- | ---------- | ---------- | ---------- |
| Free    | 5.00 / seg | (fallback) | (fallback) | (fallback) |
| Starter | 4.50 / seg | 0.17 / seg | 1.40 / seg | 28 / seg   |
| Pro     | 4.00 / seg | 0.15 / seg | 1.20 / seg | 25 / seg   |
| Scale   | 3.50 / seg | 0.12 / seg | 1.00 / seg | 22 / seg   |

The `cost` field on the response reflects the destination country's currency:

```json theme={null}
{
  "to": "+2335201234567",
  "country": "GH",
  "segments": 1,
  "cost": { "amount_kobo": 15, "currency": "GHS" }
}
```

Wallet debits always happen in NGN (we convert 1:1 at your plan rate). We're working on native multi-currency wallets — in the meantime, the `cost_currency` on the row tells you honestly what the per-segment rate would be in the local market.

## Sender IDs are per-country

A sender ID approved for NG isn't automatically approved for GH. Register once per country you target:

```typescript theme={null}
await pm.senderIds.create({
  sender_id: 'SHUTTLERS',
  countries: ['NG', 'GH'],       // submit to both regulators in parallel
  registered_entity: '…',
  use_case: '…',
});
```

See [Sender IDs](/sms/sender-ids) for the full registration flow.

## Provider routing by country

Different countries have different best-of-breed upstream providers. We maintain a `provider_routes` table that determines the failover chain per country:

```
country='*'     beem     priority=100  (global default)
country='NG'    beem     priority=100
country='NG'    termii   priority=200  (NG-specific fallback)
```

For a Nigerian send, we try Beem first, then Termii if Beem fails. For Ghana, we use the global default (Beem only). Contact support if you want a specific provider preference — we can add rows for your account.

Every attempt is recorded on the message; see `provider_attempts` on `GET /v1/sms/:id`:

```json theme={null}
{
  "provider_attempts": [
    { "provider": "beem",   "ok": false, "attempted_at": "...", "error_message": "upstream 502" },
    { "provider": "termii", "ok": true,  "attempted_at": "...", "provider_message_id": "tm-123" }
  ]
}
```

## Planning capacity across markets

Analytics is per-project but aggregated across countries. Use `GET /v1/sms/analytics/carriers?days=30` for a breakdown — each row is one carrier (e.g. `mtn_ng`, `safaricom_ke`), so you can see where your volume goes.

For finer-grained slicing (cost by country over time, delivery rates by country), export from the dashboard — CSV downloads include the `country` column.

## Opening a new market

We're adding countries as Beem + Termii coverage grows. If you need a country not listed here:

1. Email **[sales@robase.dev](mailto:sales@robase.dev)** with your volume estimate + use case.
2. We'll add a provider route + seeded plan rate within 3 business days.
3. For some countries the regulator requires a local entity — we'll let you know if so.
