# OmaxTelecom Developer Portal > Official OmaxTelecom API documentation. Integrate SMS, OTP, Bappy, Telkor, MCC-MNC, Phone Validation, Number Lookup, and Phone Numbers APIs with guides, examples, and OpenAPI references. --- # Getting started Every OmaxTelecom API works the same way: you sign in with your **Client ID** and **Client Secret**, get a short-lived **access token**, and send that token with each request. This page takes you from zero to your first API call in a few minutes. ## 1. Get your credentials 1. Sign in to [OmaxTelecom Console](https://console.omaxtelecom.com), or create an account. 2. Open the API settings and copy your **Client ID** and **Client Secret**. 3. Make sure the API you want to use is **enabled for your organization**. If it is not, contact [support@omaxtelecom.com](mailto:support@omaxtelecom.com). > [!WARNING] > The Client Secret is like a password. Use it only on your server — never in a website, mobile app or public repository. ## 2. Get an access token Send your credentials to the token endpoint. The body is **form-encoded** (`application/x-www-form-urlencoded`), not JSON. ```bash curl -X POST https://api.omaxtelecom.com/auth/token \ -H "Content-Type: application/x-www-form-urlencoded" \ -d grant_type=client_credentials \ -d client_id=YOUR_CLIENT_ID \ -d client_secret=YOUR_CLIENT_SECRET ``` ```json { "access_token": "eyJhbGciOiJSUzI1NiIs...", "token_type": "Bearer", "expires_in": 300, "scope": "openid" } ``` The token is valid for `expires_in` seconds (usually 5 minutes). The same token works for every OmaxTelecom API. ## 3. Make your first call Send the token in the `Authorization` header. This call checks your token and organization on the SMS API: ```bash curl https://api.omaxtelecom.com/sms/me \ -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." ``` That's it — every other request works the same way. ## 4. Choose your API | If you want to… | Use | |------------------|-----| | Send SMS and get delivery reports | [SMS API](/sms-api) | | Verify a phone number with a one-time code | [OTP API](/otp-api) | | Sell eSIM / SIM data plans to your customers | [Bappy API](/bundle-sim) | | Manage your own SIM inventory, coverages and plans | [Telkor API](/telkor) | | Check that a phone number is valid | [Phone Validation API](/phone-validation-api) | | Find the carrier of a phone number | [Number Lookup API](/number-lookup-api) | | Look up a mobile operator by MCC/MNC | [MCC-MNC API](/mcc-mnc-api) | | Buy phone numbers and route calls and SMS | [Phone Numbers API](/phone-numbers-api) | ## Node.js SDK For Node.js there is an official library, [`@omaxtelecom/sdk`](https://www.npmjs.com/package/@omaxtelecom/sdk). It gets and renews the token for you, so you can skip steps 2 and 3: ```bash npm install @omaxtelecom/sdk ``` ```js import { Omax } from "@omaxtelecom/sdk"; const omax = new Omax({ clientId: process.env.OMAX_CLIENT_ID, clientSecret: process.env.OMAX_CLIENT_SECRET, }); const me = await omax.sms.me(); ``` - Covers the [SMS](/sms-api), [OTP](/otp-api), [Bappy](/bundle-sim) and [Phone Numbers](/phone-numbers-api) APIs and [webhook verification](/webhooks). - Sends an `Idempotency-Key` where an API uses one, retries safely after rate limits and lost connections, and pages through lists with `for await`. - Typed for TypeScript; no other dependencies. Requires Node.js 18 or newer. - Source and issues: [github.com/omax-telecom/omaxtelecom-node](https://github.com/omax-telecom/omaxtelecom-node). The Telkor, Phone Validation, Number Lookup and MCC-MNC APIs are not in the library yet: call them over HTTP as shown below. ## Try it without writing code - **In this portal** — on any API page, enter your Client ID and Client Secret in the **Authentication** box and click **Authorize**. Then open an endpoint and click **Test Request**. - **In Postman** — every API page has a Postman collection and environment to download. Fill in `client_id` and `client_secret` in the environment. ## Reuse the token in your code Don't request a new token before every call. Keep the token in memory and get a new one shortly before it expires, or when an API answers `401 Unauthorized`. The [Node.js SDK](#description/nodejs-sdk) does this for you. **Node.js** ```js const TOKEN_URL = "https://api.omaxtelecom.com/auth/token"; let cached = null; // { token, expiresAt } export async function getToken() { // Refresh 30 seconds early so a token never expires mid-request. if (cached && Date.now() < cached.expiresAt - 30_000) return cached.token; const response = await fetch(TOKEN_URL, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ grant_type: "client_credentials", client_id: process.env.OMAX_CLIENT_ID, client_secret: process.env.OMAX_CLIENT_SECRET, }), }); if (!response.ok) throw new Error(`Token request failed: ${response.status}`); const data = await response.json(); cached = { token: data.access_token, expiresAt: Date.now() + data.expires_in * 1000 }; return cached.token; } // Usage const res = await fetch("https://api.omaxtelecom.com/sms/me", { headers: { Authorization: `Bearer ${await getToken()}` }, }); ``` **Python** ```python import os, time, requests TOKEN_URL = "https://api.omaxtelecom.com/auth/token" _cached = {"token": None, "expires_at": 0} def get_token(): # Refresh 30 seconds early so a token never expires mid-request. if _cached["token"] and time.time() < _cached["expires_at"] - 30: return _cached["token"] response = requests.post(TOKEN_URL, data={ "grant_type": "client_credentials", "client_id": os.environ["OMAX_CLIENT_ID"], "client_secret": os.environ["OMAX_CLIENT_SECRET"], }) response.raise_for_status() data = response.json() _cached.update(token=data["access_token"], expires_at=time.time() + data["expires_in"]) return _cached["token"] # Usage me = requests.get("https://api.omaxtelecom.com/sms/me", headers={"Authorization": f"Bearer {get_token()}"}) ``` ## Token errors | Status | `error` | What it means | What to do | |--------|---------|---------------|------------| | `400` | `invalid_request` | `grant_type` is missing, or the body was sent as JSON | Send a form-encoded body with `grant_type=client_credentials` | | `401` | `invalid_client` | Wrong Client ID or Client Secret | Copy both again from Console; check for extra spaces | | `401` from an API | — | The access token expired or is missing | Get a new token and retry once | ## Keep your credentials safe - Call the token endpoint **from your server only**. Never put the Client Secret in a website, mobile app or public repository. - Store the Client ID and Client Secret in environment variables or a secrets manager. - If a secret leaks, replace it in Console right away, or contact [support@omaxtelecom.com](mailto:support@omaxtelecom.com). ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Endpoints Full request and response schemas: https://developer.omaxtelecom.com/openapi/auth.json - `POST /auth/token` — Get an access token --- # SMS API The **SMS API** sends SMS messages, reports their delivery, sends and verifies one-time codes, and notifies your system by webhook when a message changes status. Messages are prepaid: each one is charged to your wallet when it is accepted. | | | |---|---| | **Base URL** | `https://api.omaxtelecom.com/sms` | | **Authentication** | Bearer access token — [how to get one](/getting-started) | | **Postman** | [Collection](/postman/sms/sms.postman_collection.json) · [Environment](/postman/sms/sms.postman_environment.json) | | **AI assistants** | [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fsms-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20SMS%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fsms-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20SMS%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Markdown](/sms-api.md) · [MCP server](/ai) | > [!TIP] > **Try it here:** enter your Client ID and Client Secret in the **Authentication** box, click **Authorize**, then use **Test Request** on any endpoint. They stay filled in on every API page until you close the tab. ## What you can do | Capability | Endpoint | Description | |------------|----------|-------------| | **Verify context** | `GET /me` | Check your token and organization | | **Send a message** | `POST /messages` | Send one SMS | | **Send to many** | `POST /messages/bulk` | Send one text to up to 10,000 numbers | | **Message status** | `GET /messages/{id}` | Read one message and its delivery status | | **List messages** | `GET /messages` | Search your messages, with filters and paging | | **List batches** | `GET /batches` | Your bulk requests, newest first | | **Batch progress** | `GET /batches/{id}` | Per-status counts of a bulk request | | **Send a code** | `POST /otp/send` | Send a one-time code by SMS | | **Verify a code** | `POST /otp/verify` | Check the code the user typed | | **Sender IDs** | `GET/POST /sender-ids` | List your sender IDs and request new ones | | **Webhooks** | Console → **Webhooks** | Receive message status, batch, sender ID, balance and OTP events at your own URL — see [Webhooks](/webhooks) | | **Wallet** | `GET /wallet` | Balance and account mode (live or test) | | **Prices** | `GET /pricing` | Your price per segment by destination prefix | | **Statistics** | `GET /stats` | Totals and per-day traffic for the last 1 to 90 days | | **Health** | `GET /health` | Service availability (no token) | ## Quick start **1. Get a token.** Take your `client_id` and `client_secret` from [OmaxTelecom Console](https://console.omaxtelecom.com). More in [Getting started](/getting-started). ```bash TOKEN=$(curl -s -X POST https://api.omaxtelecom.com/auth/token \ -d grant_type=client_credentials \ -d client_id="$CLIENT_ID" \ -d client_secret="$CLIENT_SECRET" | jq -r .access_token) ``` **2. Check that it works.** ```bash curl -s https://api.omaxtelecom.com/sms/me -H "Authorization: Bearer $TOKEN" ``` `data.organization.sms_enabled` must be `true`. If it is `false`, SMS has not been set up for your organization yet — contact support. **3. Send a message.** ```bash curl -s -X POST https://api.omaxtelecom.com/sms/messages \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: order-1042-confirmation" \ -d '{ "from": "MYSHOP", "to": "+38765123456", "text": "Your order has shipped.", "reference": "order-1042" }' ``` ```json { "success": true, "data": { "id": "0198c5f2-7a10-7c3e-9d4b-2f6a1e8b0c11", "batch_id": null, "source": "api", "from": "MYSHOP", "to": "38765123456", "status": "queued", "error_code": null, "segments": 1, "price": { "amount": "0.055", "currency": "EUR" }, "reference": "order-1042", "is_test": false, "is_otp": false, "created_at": "2026-10-12T12:00:00+00:00", "delivered_at": null, "updated_at": "2026-10-12T12:00:00+00:00", "text": "Your order has shipped." } } ``` **4. Follow the delivery.** Read `GET /messages/{id}` until the status is final, or subscribe to [webhooks](/webhooks) and be told. ### With the Node.js SDK The [Node.js SDK](/getting-started#description/nodejs-sdk) gets the token, sends the `Idempotency-Key` and retries safely for you: ```js import { Omax } from "@omaxtelecom/sdk"; const omax = new Omax(); // reads OMAX_CLIENT_ID and OMAX_CLIENT_SECRET const message = await omax.sms.messages.send({ from: "ACME", to: "+38765123456", text: "Your order has shipped.", reference: "order-1042", }); const current = await omax.sms.messages.get(message.id); for await (const m of await omax.sms.messages.list({ status: "delivered", reference: "order-1042" })) { console.log(m.id, m.to); } ``` Errors are thrown as `OmaxApiError` with the same `code`, `status` and `requestId` as described in [Responses](#description/responses). ## Authentication Send an access token on every request except `GET /health`: ```http Authorization: Bearer Content-Type: application/json Accept: application/json ``` Get the token from `POST https://api.omaxtelecom.com/auth/token` with your Console `client_id` and `client_secret`. [Getting started](/getting-started) shows how, with code samples. The token identifies your organization; there is nothing else to send. Keep the token in memory, reuse it for every request, and get a new one shortly before it expires or when a request answers `401`. ## Responses Successful responses: ```json { "success": true, "data": { ... } } ``` Lists add `meta` with `page`, `per_page`, `total` and `last_page`. Error responses: ```json { "success": false, "error": { "code": "INVALID_SENDER", "message": "The sender ID is not approved for this organization.", "request_id": "9f1c2d3e-4b5a-4c6d-8e7f-0a1b2c3d4e5f", "details": { "message_id": "0198c5f2-7a10-7c3e-9d4b-2f6a1e8b0c11", "smpp_status": "RINVSRCADR" } } } ``` Branch on `error.code` and the HTTP status, never on `message`. Validation errors add `fields` with the messages per request field; rejected sends add `details`. Quote `request_id` (also in the `X-Request-Id` response header) when you contact support. ## Sending a message `POST /messages` with an `Idempotency-Key` header. | Field | Required | Rules | |-------|:--------:|-------| | `from` | yes | An **approved** sender ID: up to 11 letters and digits (`MYSHOP`), or a number of 3 to 15 digits | | `to` | yes | International number, with or without `+`. Spaces, dashes and brackets are ignored | | `text` | yes | Up to 1600 characters and at most 6 segments | | `reference` | no | Your own identifier, up to 128 characters. You can filter the message list by it | ### Message length and segments A long text is split into segments, and every segment is charged. | Text contains | One message | Each segment when split | |---------------|:-----------:|:-----------------------:| | Only GSM alphabet characters (Latin letters, digits, common punctuation) | 160 characters | 153 characters | | Any other character (`š`, `ć`, `ž`, Cyrillic, emoji, …) | 70 characters | 67 characters | One non-GSM character switches the **whole** message to the 70-character limit. The response tells you how many segments your text needed (`segments`) and what it cost (`price`). A text that needs more than 6 segments is refused with `MESSAGE_TOO_LONG`. ### Idempotency Networks fail between the moment you send a request and the moment you read the answer. `Idempotency-Key` makes a retry safe: - Send a unique value per business event, for example `order-1042-confirmation`. - Repeating the request with the **same key and the same body** within 24 hours returns the first response, marked with the header `Idempotent-Replayed: true`. Nothing is sent again. - The same key with a **different body** is refused with `IDEMPOTENCY_KEY_REUSED`. - While the first request is still running, a second one with the same key gets `409 IDEMPOTENCY_IN_PROGRESS` — wait a moment and retry. After a network error or a `5xx`, retry with the **same** key. ### After a 503 `503 SMS_SERVICE_UNAVAILABLE` on a send means the outcome is unknown: the message may or may not have been accepted. Look it up first: ```bash curl -s "https://api.omaxtelecom.com/sms/messages?reference=order-1042" -H "Authorization: Bearer $TOKEN" ``` Send again with a **new** key only if it is not there. ### Rejected sends When a message is refused for a reason other than validation — sender not approved, destination not available, wallet empty — the API answers `422` and still records the message with status `rejected`. `error.details.message_id` points to it. Nothing is charged. ## Message status | Status | Meaning | Final | |--------|---------|:-----:| | `queued` | Accepted and charged, not yet handed to the operator | | | `sent` | Handed to the operator, waiting for a delivery report | | | `delivered` | The operator confirmed delivery to the handset | ✓ | | `undelivered` | The message was not delivered | ✓ | | `failed` | The operator reported a failure | ✓ | | `rejected` | Not accepted and not sent — see `error_code` | ✓ | | `expired` | No delivery report arrived in time | ✓ | `delivered` is only ever set from a delivery report. A message that could not be sent is refunded to your wallet. `error_code` on a message explains a rejection: | `error_code` | Meaning | |--------------|---------| | `INVALID_DESTINATION` | The number in a bulk request cannot be dialed | | `INVALID_DESTINATION_OR_NO_ROUTE` | Wrong number, or the destination is not available to you | | `INVALID_SENDER` | The sender ID is not approved | | `THROTTLED_OR_INSUFFICIENT_FUNDS` | You are sending too fast, or the wallet is empty | | `MESSAGE_TOO_LONG` | The text could not be encoded or is too long | | `GATEWAY_ERROR` | The gateway could not process the message | ### Test mode An account is either in **live** or in **test** mode (`GET /wallet` → `mode`). In test mode messages go through the whole API — charging, statuses, webhooks — but are simulated and never reach a phone; they are marked `is_test: true`. Support switches the mode for you. ### Listing messages `GET /messages` returns your messages newest first. Filters combine with AND: | Parameter | Description | |-----------|-------------| | `status` | One of the statuses above | | `source` | `api` or `smpp` | | `to`, `from`, `reference` | Exact match | | `batch_id` | Messages of one bulk request | | `created_from`, `created_to` | ISO 8601 date-times | | `page`, `per_page` | Paging; `per_page` up to 200, default 50 | Messages you submit directly over **SMPP** also appear in this list, usually within two minutes, with `source: "smpp"`. Their text is not stored and no webhooks are sent for them — their delivery receipts arrive over your SMPP session. ## Bulk sending `POST /messages/bulk` sends one text to up to 10,000 numbers. ```bash curl -s -X POST https://api.omaxtelecom.com/sms/messages/bulk \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: spring-sale-2026" \ -d '{ "from": "MYSHOP", "text": "Sale starts today.", "to": ["+38765123456", "+38766123456"], "reference": "spring-sale" }' ``` The answer is `202` with a **batch**; the messages are created and sent in the background. - `GET /batches/{id}` shows the batch status and the number of messages per status. - `GET /messages?batch_id={id}` lists the individual messages. - `GET /batches` lists all your batches, newest first. - A number that cannot be dialed becomes a `rejected` message with `error_code: "INVALID_DESTINATION"`; the other recipients are still sent. - Batch status `completed` means every message was handed over or rejected — not that every message was delivered. Delivery is per message. For different texts per recipient, send single messages. ## Webhooks Instead of polling, subscribe to SMS events in the Console under **Webhooks** and we send a signed `POST` to your HTTPS endpoint whenever something changes: | Event | When | |-------|------| | `sms.message.sent`, `sms.message.delivered`, `sms.message.failed`, `sms.message.expired` | A message you sent through the API changed status | | `sms.batch.completed`, `sms.batch.failed` | A bulk request finished or stopped | | `sms.sender_id.approved`, `sms.sender_id.rejected` | A sender ID request was reviewed | | `sms.wallet.topped_up`, `sms.wallet.low_balance` | Your SMS balance was topped up or fell below the low balance threshold | | `sms.otp.verified`, `sms.otp.expired` | A one-time code was verified or expired | `sms.id` in a message event is the `id` you got from `POST /messages`. Endpoints, signature verification, retries and every payload are described in the [Webhooks guide](/webhooks). ## One-time codes (OTP) `POST /otp/send` sends a 6-digit code by SMS and returns a `verification_id`; `POST /otp/verify` checks the code the user typed. The OTP message is charged like any other SMS. Rules, examples and a security checklist are in the [OTP API guide](/otp-api). ## Sender IDs The sender ID is what the recipient sees as the sender: a name such as `MYSHOP` (up to 11 letters and digits) or a number of 3 to 15 digits. A sender ID must be **approved** for your organization before you can send with it. ```bash curl -s -X POST https://api.omaxtelecom.com/sms/sender-ids \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"name": "MYSHOP", "use_case": "Order notifications"}' ``` A request starts as `pending`. `GET /sender-ids` shows the outcome: `approved`, or `rejected` with the reviewer's `note`. A rejected name can be requested again. A clear `use_case` speeds up the review. ## Wallet and prices ```bash curl -s https://api.omaxtelecom.com/sms/wallet -H "Authorization: Bearer $TOKEN" # { "success": true, "data": { "balance": "152.8", "currency": "EUR", "mode": "live" } } curl -s https://api.omaxtelecom.com/sms/pricing -H "Authorization: Bearer $TOKEN" # { "success": true, "data": { "currency": "EUR", "unit": "segment", "rates": [ { "prefix": "38765", "country_code": "BA", "price": "0.05500" } ] } } ``` Prices are per **segment** and by destination prefix: the longest prefix that a number starts with applies. A message of 3 segments to a number priced at €0.055 costs €0.165. Amounts are decimal strings — do not parse them as floating-point numbers. When the wallet is empty, sends are refused with `THROTTLED_OR_INSUFFICIENT_FUNDS`. ## Rate limits Requests are limited per organization per second. Every response carries: | Header | Meaning | |--------|---------| | `RateLimit-Limit` | Requests allowed per second | | `RateLimit-Remaining` | Requests left in the current second | | `RateLimit-Reset` | Unix time at which the limit resets | A `429` adds `Retry-After` with the number of seconds to wait. For large campaigns use `POST /messages/bulk`: one request, up to 10,000 recipients. ## Errors | HTTP status | Error code | What to do | |-------------|------------|------------| | `401` | `UNAUTHORIZED` | Get a new token | | `403` | `ORGANIZATION_REQUIRED` | The token does not identify an organization — check your credentials | | `403` | `ORGANIZATION_NOT_FOUND` | Your organization is not registered for SMS — contact support | | `403` | `ORGANIZATION_SUSPENDED`, `ORGANIZATION_INACTIVE` | Contact support | | `404` | `NOT_FOUND` | The resource does not exist in your organization | | `409` | `SMS_NOT_PROVISIONED` | SMS is not set up for your organization yet | | `409` | `IDEMPOTENCY_IN_PROGRESS` | The same key is still being processed; retry shortly | | `409` | `SENDER_ID_ALREADY_REQUESTED` | The sender ID is already pending or approved | | `422` | `VALIDATION_FAILED` | Fix the request; see `error.fields` | | `422` | `IDEMPOTENCY_KEY_REQUIRED` | Send an `Idempotency-Key` header | | `422` | `IDEMPOTENCY_KEY_REUSED` | Do not reuse a key with a different body | | `422` | `MESSAGE_TOO_LONG` | Shorten the text (maximum 6 segments) | | `422` | `INVALID_SENDER` | Use an approved sender ID | | `422` | `INVALID_DESTINATION_OR_NO_ROUTE` | The number is wrong, or the destination is not available to you | | `422` | `THROTTLED_OR_INSUFFICIENT_FUNDS` | Check `GET /wallet`; if there are funds, slow down and retry | | `422` | `GATEWAY_ERROR` | Retry later | | `429` | `RATE_LIMITED`, `OTP_RESEND_TOO_SOON` | Wait for `Retry-After` seconds | | `503` | `SMS_SERVICE_UNAVAILABLE` | Retry with backoff; for sends see [After a 503](#description/after-a-503) | ## Going live checklist 1. `GET /me` answers `200` with `sms_enabled: true`. 2. Your sender ID is `approved` (`GET /sender-ids`). 3. Every send carries an `Idempotency-Key`, and retries reuse it. 4. If you use [webhooks](/webhooks), your endpoint verifies the signature, answers quickly with `2xx` and de-duplicates on the `svix-id` header. 5. Your code handles `rejected`, `undelivered`, `failed` and `expired`, not only `delivered`. 6. You watch the wallet balance (`GET /wallet`). 7. Your account is in live mode (`GET /wallet` → `"mode": "live"`). ## Direct SMPP access High-volume senders can also connect directly over SMPP 3.4 or 5.0, with their own login and delivery receipts on the session. SMPP and the API share one wallet, one price list and one message list. Ask support for SMPP credentials. ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Endpoints Full request and response schemas: https://developer.omaxtelecom.com/openapi/sms.json - `POST /token` — Get an access token - `GET /me` — Check your token and organization - `GET /health` — Service health - `GET /wallet` — Wallet balance - `GET /pricing` — Your prices - `GET /stats` — Traffic statistics - `GET /messages` — List messages - `POST /messages` — Send a message - `GET /messages/{id}` — Get a message - `POST /messages/bulk` — Send to many numbers - `GET /batches` — List batches - `GET /batches/{id}` — Get a batch - `GET /sender-ids` — List your sender IDs - `POST /sender-ids` — Request a sender ID - `POST /otp/send` — Send a one-time code - `POST /otp/verify` — Verify a one-time code --- # OTP API Verify that a user controls a phone number: send a one-time code by SMS, then check the code the user typed. One-time codes are part of the **SMS API** — same base URL, same token, same wallet. | | | |---|---| | **Base URL** | `https://api.omaxtelecom.com/sms` | | **Authentication** | Bearer access token — [how to get one](/getting-started) | | **Postman** | [Collection](/postman/sms/sms.postman_collection.json) · [Environment](/postman/sms/sms.postman_environment.json) | | **AI assistants** | [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fotp-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20OTP%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fotp-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20OTP%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Markdown](/otp-api.md) · [MCP server](/ai) | > [!TIP] > **Try it here:** enter your Client ID and Client Secret in the **Authentication** box, click **Authorize**, then use **Test Request** on any endpoint. They stay filled in on every API page until you close the tab. > [!NOTE] > OTP uses the SMS API's token, errors, rate limits and delivery tracking. Get a token as described in [Getting started](/getting-started); everything else is in the [SMS API guide](/sms-api). ## How it works | Step | Endpoint | What happens | |------|----------|--------------| | **1. Send** | `POST /otp/send` | The API generates a 6-digit code, sends it by SMS and returns a `verification_id` | | **2. Verify** | `POST /otp/verify` | You pass the `verification_id` and the code the user typed; the API answers `verified: true` or `false` | The code is never returned by the API and is not stored in readable form. Your system only ever handles the `verification_id`. ## Send a code ```bash curl -s -X POST https://api.omaxtelecom.com/sms/otp/send \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from": "MYSHOP", "to": "+38765123456", "template": "Your MyShop code is {code}", "ttl_seconds": 300 }' ``` ```json { "success": true, "data": { "verification_id": "0198c5f6-3b9c-70d1-a2e4-5d8f6c1b7a90", "message_id": "0198c5f2-7a10-7c3e-9d4b-2f6a1e8b0c11", "to": "38765123456", "expires_at": "2026-10-12T12:05:00+00:00" } } ``` | Field | Required | Rules | |-------|:--------:|-------| | `from` | yes | An approved sender ID | | `to` | yes | International number, with or without `+` | | `template` | no | Message text; must contain `{code}`. Default: `Your verification code is {code}` | | `ttl_seconds` | no | How long the code is valid: 30 to 3600, default 300 | Store `verification_id` with the user's session. `message_id` is the SMS that carries the code — track its delivery with `GET /messages/{id}` or [webhooks](/webhooks), like any other message. The `sms.otp.verified` and `sms.otp.expired` webhooks tell you when a code was verified or expired. ## Verify a code ```bash curl -s -X POST https://api.omaxtelecom.com/sms/otp/verify \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"verification_id": "0198c5f6-3b9c-70d1-a2e4-5d8f6c1b7a90", "code": "482913"}' ``` ```json { "success": true, "data": { "verified": true, "reason": null, "attempts_remaining": 0 } } ``` The answer is always `200` — read `verified`. When it is `false`: | `reason` | Meaning | What to show the user | |----------|---------|------------------------| | `invalid_code` | Wrong code; `attempts_remaining` tries are left | Ask them to type it again | | `expired` | The code ran out of time | Offer to send a new code | | `too_many_attempts` | 5 wrong codes; the verification is locked | Offer to send a new code | | `already_used` | The code was already verified once | Start a new verification | An unknown `verification_id` answers `404 NOT_FOUND`. ## With the Node.js SDK ```js import { Omax } from "@omaxtelecom/sdk"; const omax = new Omax(); // reads OMAX_CLIENT_ID and OMAX_CLIENT_SECRET const { verification_id } = await omax.otp.send({ from: "ACME", to: "+38765123456" }); // later, with the code the user typed: const result = await omax.otp.verify({ verification_id, code: "123456" }); ``` The SDK sends the `Idempotency-Key` for `otp.send` and keeps it when it retries, so a retry never sends a second code. See [Getting started](/getting-started#description/nodejs-sdk) for installation. ## Rules | Rule | Value | |------|-------| | Code length | 6 digits | | Validity | 5 minutes by default, 30 seconds to 1 hour with `ttl_seconds` | | Attempts | 5 per code | | Use | Once | | Resend to the same number | After 30 seconds; earlier returns `429 OTP_RESEND_TOO_SOON` with `Retry-After` | | Price | The SMS is charged like any other message | ## Security checklist - Call `POST /otp/verify` from your **server**, never from the browser or app: its answer decides whether the user is who they claim to be. - Keep `verification_id` on the server side of the session; the user only needs to type the code. - Limit how many codes one user or IP address can request — the API limits resends per number, not per user. - Do not put the code in a URL, a log or an analytics event. - Treat `expired` and `too_many_attempts` as "start again", not as "try another code". ## Common uses - **Sign-up** — confirm the phone number before creating the account. - **Login** — a second factor after the password. - **Password reset** — confirm identity before changing credentials. - **Sensitive actions** — confirm a payment, a transfer or a change of contact details. ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Endpoints Full request and response schemas: https://developer.omaxtelecom.com/openapi/otp.json - `POST /token` — Get an access token - `POST /otp/send` — Send a one-time code - `POST /otp/verify` — Verify a one-time code --- # Bappy API The **Bappy API** lets resellers and partners sell and manage **eSIM and physical SIM** data plans. Every card is a **Link**: you create a Link with a plan, top it up, follow its usage and send it SMS. Bappy takes care of billing and of provisioning with the mobile operator, so you integrate with one API instead of with each operator. | | | |---|---| | **Base URL** | `https://api.omaxtelecom.com/bappy/v1` | | **Authentication** | Bearer access token — [how to get one](/getting-started) | | **Postman** | [Collection](/postman/bundle-sim/bundle-sim.postman_collection.json) · [Environment](/postman/bundle-sim/bundle-sim.postman_environment.json) | | **AI assistants** | [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fbundle-sim.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Bappy%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fbundle-sim.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Bappy%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Markdown](/bundle-sim.md) · [MCP server](/ai) | > [!TIP] > **Try it here:** enter your Client ID and Client Secret in the **Authentication** box, click **Authorize**, then use **Test Request** on any endpoint. They stay filled in on every API page until you close the tab. **Who it is for:** - **Resellers** — sell eSIM or SIM plans to end customers, for example for travel or M2M. - **Integrators** — add Link creation and top-up to your app, portal or booking flow. - **M2M / IoT** — create and manage Links from your own systems. ## What you can do | Task | Endpoint | Description | |------|----------|-------------| | **Find a plan** | `GET /plans` | Plans with price, data, validity and coverage | | **Check your balance** | `GET /organization/balance` | Wallet balance used for Links and top-ups | | **Create a Link** | `POST /links` | Activate an eSIM with a plan | | **List Links** | `GET /links` | All your Links, with filters | | **Link details** | `GET /links/{identifier}` | Usage, activations, eSIM install links, coverage | | **Top up** | `GET /links/{identifier}/topup-plans` | Plans you can add to a Link | | **Link history** | `GET /links/{identifier}/history` | Activations, top-ups, refunds and fees | | **Network status** | `GET /links/{identifier}/network-status` | Where the card is connected right now | | **Send SMS** | `POST /sms` | Send an SMS to a Link | | **Reports** | `GET /transactions`, `/transactions/stats`, `/transactions/analytics` | Spending and usage reports | | **Health** | `GET /health`, `GET /status` | Service availability (no token needed) | ## Quick start 1. **Get credentials and a token** — see [Getting started](/getting-started). 2. **Find a plan:** `GET /plans` lists the available packages with price, data, validity and coverage. 3. **Check your balance:** `GET /organization/balance`. Creating a Link or topping up is paid from it. 4. **Create a Link:** `POST /links` with a `plan_id`. You get the Link UUID, ICCID, MSISDN, LPA profile and the eSIM install links. 5. **Manage it:** `GET /links/{identifier}` for details and usage, `GET /links/{identifier}/topup-plans` to add data. **With the Node.js SDK** ([installation](/getting-started#description/nodejs-sdk)): ```js import { Omax } from "@omaxtelecom/sdk"; const omax = new Omax(); // reads OMAX_CLIENT_ID and OMAX_CLIENT_SECRET const plans = await omax.bappy.plans.list({ region: "EU" }); const balance = await omax.bappy.organization.balance(); const link = await omax.bappy.links.create({ plan_id: "…", name: "Trip to Italy" }); const details = await omax.bappy.links.get(link.id); for await (const l of await omax.bappy.links.list({ status: "active" })) { console.log(l.id, l.iccid, l.status); } ``` Creating a Link is not retried automatically after a lost connection, so a Link is never created twice: check your Links before you try again. ## Authentication Send an access token on every request except `GET /health` and `GET /status`: ```http Authorization: Bearer ``` Get the token from `POST https://api.omaxtelecom.com/auth/token` with your Console `client_id` and `client_secret` — not from Bappy itself. [Getting started](/getting-started) shows how, with code samples. Your organization (tenant) comes from the token. Every Link, transaction, balance and SMS belongs to your organization only. ## Links A **Link** is one card — eSIM or physical SIM — and everything attached to it. | Property | Description | |----------|-------------| | **UUID** | Unique identifier, assigned when the Link is created | | **ICCID** | SIM card number, assigned by the provider | | **Status** | `active`, `suspended` or `inactive` | | **Activations** | The plans on the Link, each with its own usage, expiry and coverage | Every Link endpoint accepts either the **UUID** or the **ICCID** as `{identifier}`: - `GET /links/550e8400-e29b-41d4-a716-446655440000` — by UUID - `GET /links/8901010000000000001` — by ICCID ### Creating a Link `POST /links` with `plan_id` (and an optional `name`): 1. Your wallet balance is checked against the plan's retail price. 2. An available eSIM is reserved. 3. The price is taken from your wallet. 4. The plan is activated on the card. 5. The Link, its activation and the transaction are recorded. If provisioning fails, the amount is **refunded automatically**. ### Managing Links - **List** — `GET /links`, filtered by `status` or `search`, paged with `page` and `per_page`. - **Details** — `GET /links/{identifier}`: live usage, eSIM install links, all activations with their usage, and coverage. - **Reactivate** — `PUT /links/{identifier}` with `{"status": "active"}` turns a suspended Link back on. - **Top-up plans** — `GET /links/{identifier}/topup-plans` lists the plans that fit this Link, with data, validity, price and coverage. - **Remove a plan** — `PUT /links/{identifier}/plans` with `{"remove": ["activation-uuid"]}`. The activation IDs are in `activations[].id` of the Link details. - **History** — `GET /links/{identifier}/history`: activations, top-ups, refunds and monthly fees, newest first. - **Network status** — `GET /links/{identifier}/network-status?live=true` asks the network for a live answer. ### eSIM installation Creating a Link returns everything the end user needs to install the eSIM: - the **LPA profile**, - an **Apple** install link (iOS), - an **Android** install link. `GET /info/instructions` returns step-by-step installation guides for iOS and Android that you can show your customers. ### SMS to a Link - **Send** — `POST /sms` with `link_id` (UUID or ICCID) and `message` (up to 80 characters). The SMS is queued and delivered in the background. - **List** — `GET /sms?link_id={identifier}`. ## Plans and coverage - **List plans** — `GET /plans`, filtered by `region`, `coverage_type` or `sponsor_profile`. - **Plan details** — `GET /plans/{plan_id}`. - **Coverage** — `GET /plans/{plan_id}/coverage`: every country with its operators and network types. - **Regions** — `GET /plans/regions`: `EU`, `AF`, `AS`, `LA`, `NA`, `OC`, for filtering plans. - **Operators** — `GET /info/operators?search={country}` finds mobile operators by country name. ## Organization and reports - **Profile** — `GET /organization`: name, slug, status and your prices (`price_per_sms`, `price_per_link`). - **Balance** — `GET /organization/balance`: wallet balance and currency. - **Transactions** — `GET /transactions`, optionally for one `link_id`. For a single Link, `GET /links/{identifier}/history` is simpler. - **Statistics** — `GET /transactions/stats` for a `from`/`to` date range. - **Analytics** — `GET /transactions/analytics` for the last `period_days`, for example 30. ## Responses - **Success:** `{ "success": true, "data": { ... }, "meta": { "timestamp", "response_time_ms" } }` - **Lists:** `data` holds `data` (the items) and `meta` (`current_page`, `last_page`, `per_page`, `total`, `from`, `to`). - **Errors:** `{ "success": false, "error": { "code", "message", "details" }, "meta": { "timestamp" } }`, with a matching HTTP status. Bappy never exposes which mobile operator or provider is behind a Link. Provider problems are reported with generic codes such as `PROVISIONING_ERROR` or `PROVIDER_UNAVAILABLE`. ## Billing Your organization has one wallet. Creating a Link or topping it up is paid from it at the plan's retail price, and a failed provisioning is refunded automatically. Your SMS and Link prices (`price_per_sms`, `price_per_link`) are shown by `GET /organization`; monthly Link fees appear in the Link history. ## Errors | Error code | HTTP status | What it means | |------------|:-----------:|---------------| | `UNAUTHORIZED` | 401 | The token is missing or invalid — get a new one | | `INSUFFICIENT_BALANCE` | 402 | Your wallet balance is too low | | `ORG_SUSPENDED` | 403 | Your organization is suspended — contact support | | `NOT_FOUND` | 404 | The resource does not exist | | `PLAN_NOT_FOUND` | 404 | The plan does not exist or is not enabled for you | | `VALIDATION_ERROR` | 422 | A request parameter is invalid | | `INVALID_STATUS_CHANGE` | 422 | That status change is not allowed | | `INVALID_STATE` | 422 | The resource is in a state that does not allow this | | `INVALID_PLAN` | 422 | The plan cannot be used for this operation | | `CONFIG_ERROR` | 500 | Server misconfiguration — contact support | | `PROVISIONING_ERROR` | 502 | The provider returned an error | | `PROVISIONING_FAILED` | 502 | The provider returned no result | | `PROVIDER_ERROR` | 502 | The provider operation failed | ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Endpoints Full request and response schemas: https://developer.omaxtelecom.com/openapi/bundle-sim.json - `POST /auth/token` — Get an access token - `GET /v1/health` — Health - `GET /v1/status` — Status - `GET /v1/links` — List links - `POST /v1/links` — Create link - `GET /v1/links/{link_identifier}` — Get link by identifier - `PUT /v1/links/{link_identifier}` — Reactivate link - `PUT /v1/links/{link_identifier}/plans` — Modify link plans (remove only) - `GET /v1/links/{link_identifier}/topup-plans` — Get topup plans for link - `GET /v1/links/{link_identifier}/history` — Get link history - `GET /v1/links/{link_identifier}/network-status` — Get link network status (live) - `GET /v1/plans` — List plans (combined filters) - `GET /v1/plans/{plan_id}` — Get plan by ID - `GET /v1/plans/{plan_id}/coverage` — Get plan coverage - `GET /v1/plans/regions` — Get coverage regions - `GET /v1/transactions` — List transactions (filter by link) - `GET /v1/transactions/stats` — Transaction stats (date range) - `GET /v1/transactions/analytics` — Transaction analytics (30 days) - `GET /v1/sms` — List SMS messages (by link) - `POST /v1/sms` — Send SMS - `GET /v1/organization` — Profile - `GET /v1/organization/balance` — Balance - `GET /v1/info/instructions` — eSIM installation instructions - `GET /v1/info/operators` — Mobile operators (search by name) --- # Telkor API The **Telkor API** manages your **SIM inventory**, **coverages**, **data plans** and **links** — the active service on a SIM — including bulk jobs for thousands of SIMs at once. It is built for MVNOs, enterprise IoT teams and M2M integrators. | | | |---|---| | **Base URL** | `https://api.omaxtelecom.com/telkor` | | **Authentication** | Bearer access token — [how to get one](/getting-started) | | **Postman** | [Collection](/postman/telkor/telkor.postman_collection.json) · [Environment](/postman/telkor/telkor.postman_environment.json) | | **AI assistants** | [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Ftelkor.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Telkor%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Ftelkor.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Telkor%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Markdown](/telkor.md) · [MCP server](/ai) | > [!TIP] > **Try it here:** enter your Client ID and Client Secret in the **Authentication** box, click **Authorize**, then use **Test Request** on any endpoint. They stay filled in on every API page until you close the tab. **Who it is for:** - **MVNOs** — manage SIM inventory, coverage and plan catalogues from your own systems. - **Enterprise IoT** — monitor fleets of SIMs, refresh their data and configure data plans. - **M2M integrators** — automate coverage and plan management. ## What you can do | Task | Endpoint | Description | |------|----------|-------------| | **Coverages** | `/coverages` | Group operators into the areas your plans cover | | **Operators** | `GET /coverages/operators` | Operators you can put in a coverage | | **SIMs** | `/sims` | Your SIM inventory, eSIM install details, refresh | | **Plans** | `/plans` | Data plans with throttle, caps and usage alerts | | **Links** | `/links` | Create, suspend, resume and configure the service on a SIM | | **Bulk jobs** | `/links/bulk-*`, `/sims/bulk-provision` | Run one action on many links or SIMs | | **Tasks** | `/tasks` | Progress and results of bulk jobs | | **Organization** | `/org` | Profile, balance and monthly cost | ## Quick start 1. **Get credentials and a token** — see [Getting started](/getting-started). 2. **Check your organization:** `GET /org` shows which organization your token belongs to. 3. **Pick operators:** `GET /coverages/operators`. 4. **Create a coverage:** `POST /coverages` with a `name` and `operator_ids`. 5. **Create a plan:** `POST /plans` with the coverage, data allowance and validity. 6. **Find your SIMs:** `GET /sims`. 7. **Activate service:** `POST /links` for one SIM, or `POST /sims/bulk-provision` for many. 8. **Follow bulk jobs:** `GET /tasks/{task_id}`. ## Authentication Send an access token on every request: ```http Authorization: Bearer ``` Get the token from `POST https://api.omaxtelecom.com/auth/token` with your Console `client_id` and `client_secret`. [Getting started](/getting-started) shows how, with code samples. When the token expires, request a new one — this flow has no refresh tokens. Your organization (tenant) comes from the token. All coverages, SIMs, plans, links and tasks belong to your organization only. ## Key concepts ### Coverages and operators A **coverage** is a named group of mobile **operators**: it defines where a plan works. | Property | Description | |----------|-------------| | `id` | Coverage UUID | | `name` | Display name, for example "EU + UK". Does not have to be unique | | `operators` | The operators in this coverage | | `compatibility_zones` | The provider ecosystems of these operators, for example `magenta` or `cyan` | All operators in one coverage must belong to the same compatibility zone family; mixed coverages are rejected. **Operators** are the mobile networks in your catalog: | Property | Description | |----------|-------------| | `id` | Operator UUID | | `name` | Operator name | | `country` | ISO 3166-1 alpha-3 country code | | `tadig` | TADIG code | | `compatibility_zone` | `magenta`, `cyan`, `brown`, `amber`, `violet`, `coral`, `teal`, `slate` or `ivory` | | `network_types` | Supported networks: `2g`, `3g`, `4g`, `5g` | ### SIMs A **SIM** is a physical SIM or eSIM in your inventory. | Property | Description | |----------|-------------| | `id` | SIM UUID | | `iccid` | The SIM's printed serial number | | `msisdn` | The phone number of the SIM, if any | | `status` | `available`, `active`, `suspended` or `inventory` | | `sim_type` | `physical` or `esim` | | `link` | The link this SIM belongs to, if any | | `esim_profile_status` | `available`, `installed`, `disabled` or `deleted`; `null` for physical SIMs | ### Links and activations A **link** is the service on a SIM: it binds a SIM to data plans in the network. | Property | Description | |----------|-------------| | `id` | Link UUID | | `name` | Your own name for the link (optional) | | `status` | `active`, `suspended`, `hold` or `removed` | | `sim` | The SIM on this link (ICCID, status, type) | | `network_status` | Live connection: operator, country, network (`2g_3g`, `4g`, `5g`), policy status | | `activations` | The plans currently on the link | An **activation** is one plan on a link, with its own usage, expiry and status. Add one with `POST /links/{link_id}/activations` or in bulk. A link can also have: - **Network bars** — limit which networks it may use, - an **IMEI lock** — tie it to one device, - **SMS** — messages sent to the link's number. ### Plans and notifications A **plan** is a data package for one coverage. | Property | Description | |----------|-------------| | `name` | Your plan name | | `coverage` | The coverage the plan works in | | `included_data_mb` | Included data, in MB | | `validity_days` | Days the plan is valid after activation | | `base_throttle` | Maximum speed: `unlimited`, `128kbps` … `20mbps` | | `data_cap` | Optional soft cap: a threshold and the throttle to apply after it | | `activation_type` | `immediate` or `on_first_data_usage` | | `reactivation_trigger` | When the plan renews, for example `on_expiration` | | `notifications` | SMS alerts about usage | **Notifications** are SMS sent to the link when a plan event happens. Manage them under `/plans/{plan_id}/notifications`. | Type | Sent when | |------|-----------| | `plan_activation` | The plan is activated | | `plan_expiration` | The plan expires | | `data_consumption_absolute` | Usage reaches a number of MB | | `data_consumption_relative` | Usage reaches a percentage (50–100%) | ### Bulk jobs and tasks Bulk actions run in the background and return a **task**. Follow it with: - `GET /tasks` — all tasks, filtered by `type` or `status`, - `GET /tasks/{task_id}` — status and success/failure counts, - `GET /tasks/{task_id}/items` — the result for every item. ## Endpoints by area ### Coverages - `GET /coverages` — list, with sorting and filters (`operator_ids`, `countries`, `compatibility_zones`, `search`). - `POST /coverages` — create, with `name` and `operator_ids`. - `GET /coverages/{coverage_id}` — details. - `PATCH /coverages/{coverage_id}` — rename. - `DELETE /coverages/{coverage_id}` — delete (soft delete, `204`). - `POST /coverages/{coverage_id}/operators` — add operators (safe to repeat). - `POST /coverages/{coverage_id}/operators/remove` — remove operators (safe to repeat). ### SIMs - `GET /sims` — list, with sorting and filters (`status`, `sim_type`, `compatibility_zones`, `search`, `is_attached`, …). - `GET /sims/{sim_id}` — details, including the link. - `GET /sims/{sim_id}/installation` — eSIM install details: LPA code, Apple and Android links, QR code (SVG). - `POST /sims/{sim_id}/refresh` — fetch the latest data from the network. - `POST /sims/bulk-provision` — create links for many SIMs (returns a task). ### Plans - `GET /plans` — list, with filters (coverage, operators, compatibility zones, data and validity ranges, throttle, `search`, `for_link_id`). - `POST /plans` — create, with coverage, data, validity, throttle and optional caps and notifications. - `GET /plans/{plan_id}` — details. - `PATCH /plans/{plan_id}` — change some fields. - `DELETE /plans/{plan_id}` — delete (soft delete, `204`). - `POST /plans/{plan_id}/notifications`, `PATCH` / `DELETE /plans/{plan_id}/notifications/{notification_id}` — manage alerts. ### Links - `GET /links` — list, filtered by `status`, `compatibility_zones`, `countries`, `search`. - `POST /links` — create, optionally with a SIM and a plan. - `GET /links/{link_id}` — details; refreshes the live network status of active links. - `PATCH /links/{link_id}` — rename and other changes. - `DELETE /links/{link_id}` — delete (soft delete, `204`). - `POST /links/{link_id}/sim`, `POST /links/{link_id}/sim/remove` — attach or detach the SIM. - `POST /links/{link_id}/network-bars`, `.../network-bars/remove` — network bars. - `POST /links/{link_id}/imei-lock`, `.../imei-lock/remove` — IMEI lock. - `GET` / `POST /links/{link_id}/sms` — list or send SMS. - `POST /links/{link_id}/suspend`, `POST /links/{link_id}/resume` — suspend or resume. - `GET` / `POST /links/{link_id}/activations`, `DELETE /links/{link_id}/activations/{activation_id}` — manage plans on the link. **Bulk link actions** — each returns a task: | Endpoint | Action | |----------|--------| | `POST /links/bulk-delink-sim` | Detach the SIM from many links | | `POST /links/bulk-delete` | Delete many links | | `POST /links/bulk-suspend` | Suspend many links | | `POST /links/bulk-resume` | Resume many links | | `POST /links/bulk-add-activation` | Add a plan to many links | | `POST /links/bulk-delete-activation` | Remove a plan from many links | ### Organization | Endpoint | Description | |----------|-------------| | `GET /org` | Organization profile (id, name) | | `GET /org/balance` | Latest balance of the main account | | `GET /org/cost?year=2026&month=6` | Latest monthly cost, with a usage breakdown | Balance and cost are collected about every 3 hours. Until the first snapshot exists, these endpoints answer `404`. ## Lists, filters and sorting List endpoints (`/coverages`, `/coverages/operators`, `/sims`, `/plans`, `/links`, `/tasks`) are paged: ```json { "items": [...], "total": 42, "page": 1, "page_size": 25, "total_pages": 2 } ``` - `page` starts at 1; `page_size` defaults to 25, maximum 500. - Different filters combine with **AND**. - Repeatable filters (`operator_ids`, `countries`, `compatibility_zones`) match **any** of the values you send. - `search` is a case-insensitive "contains" match. - Sort with `sort_by` and `sort_order` (`asc` or `desc`). ## Errors Errors have this shape: ```json { "message": "Entity not found: id=...", "code": "entity_not_found", "details": { ... } } ``` | Error code | HTTP status | What it means | |------------|:-----------:|---------------| | `unauthorized` | 401 | The token is missing or invalid — get a new one | | `forbidden` | 403 | You are signed in but not allowed to do this | | `entity_not_found` | 404 | The resource does not exist | | `duplicate_entity` | 409 | It already exists | | `entity_deleted` | 410 | The resource was deleted | | `validation_error` | 422 | A business rule was broken | | `request_validation_error` | 422 | The request does not match the schema | | `upstream_unavailable` | 502 | A service behind the API is unavailable — retry later | ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Endpoints Full request and response schemas: https://developer.omaxtelecom.com/openapi/telkor.json - `POST /auth/token` — Get an access token - `GET /coverages` — List coverages - `POST /coverages` — Create a coverage - `GET /coverages/operators` — List operators usable in coverages - `GET /coverages/{coverage_id}` — Get a coverage - `DELETE /coverages/{coverage_id}` — Delete a coverage - `PATCH /coverages/{coverage_id}` — Rename a coverage - `POST /coverages/{coverage_id}/operators` — Add operators to a coverage - `POST /coverages/{coverage_id}/operators/remove` — Remove operators from a coverage - `GET /sims` — List SIMs - `POST /sims/bulk-provision` — Provision links for multiple SIMs in bulk - `GET /sims/{sim_id}` — Get a SIM - `GET /sims/{sim_id}/installation` — Get the eSIM installation view for a SIM - `POST /sims/{sim_id}/refresh` — Refresh a SIM - `GET /plans` — List plans - `POST /plans` — Create a plan - `GET /plans/{plan_id}` — Get a plan - `DELETE /plans/{plan_id}` — Delete a plan - `PATCH /plans/{plan_id}` — Update a plan - `POST /plans/{plan_id}/notifications` — Add a notification to a plan - `DELETE /plans/{plan_id}/notifications/{notification_id}` — Remove a notification from a plan - `PATCH /plans/{plan_id}/notifications/{notification_id}` — Update a plan notification - `GET /links` — List links - `POST /links` — Create a link - `POST /links/bulk-delink-sim` — Detach the bound SIM from multiple links - `POST /links/bulk-delete` — Delete multiple links - `POST /links/bulk-suspend` — Suspend multiple links - `POST /links/bulk-resume` — Resume multiple links - `POST /links/bulk-add-activation` — Activate a plan on multiple links - `POST /links/bulk-delete-activation` — Remove a plan's activations from multiple links - `GET /links/{link_id}` — Get a link - `DELETE /links/{link_id}` — Delete a link - `PATCH /links/{link_id}` — Update a link - `POST /links/{link_id}/sim` — Attach a SIM to a link - `POST /links/{link_id}/sim/remove` — Detach the SIM from a link - `POST /links/{link_id}/network-bars` — Bar network types on a link - `POST /links/{link_id}/network-bars/remove` — Unbar network types on a link - `POST /links/{link_id}/imei-lock` — Lock a link to its SIM's IMEI - `POST /links/{link_id}/imei-lock/remove` — Remove the IMEI lock from a link - `GET /links/{link_id}/sms` — List SMS sent through this link - `POST /links/{link_id}/sms` — Send an SMS to the link - `POST /links/{link_id}/suspend` — Suspend a link - `POST /links/{link_id}/resume` — Resume a link - `GET /links/{link_id}/activations` — List activations on a link - `POST /links/{link_id}/activations` — Activate a plan on a link - `DELETE /links/{link_id}/activations/{activation_id}` — Remove an activation from a link - `GET /tasks` — List bulk tasks - `GET /tasks/{task_id}` — Get a bulk task - `GET /tasks/{task_id}/items` — List items within a bulk task - `GET /org` — Get your organization - `GET /org/balance` — Get your latest balance snapshot - `GET /org/cost` — Get your latest monthly cost snapshot --- # Phone Validation API The **Phone Validation API** checks whether a phone number is valid and returns what is known about it: the normalized E.164 form, national format, country, line type, carrier, region and time zones. Send numbers in **E.164** format (`+38766000111`), or in national format together with a `region` code. | | | |---|---| | **Base URL** | `https://api.omaxtelecom.com/numbers` | | **Authentication** | Bearer access token — [how to get one](/getting-started) | | **Postman** | [Collection](/postman/phone-validation/phone-validation.postman_collection.json) · [Environment](/postman/phone-validation/phone-validation.postman_environment.json) | | **AI assistants** | [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fphone-validation-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Phone%20Validation%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fphone-validation-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Phone%20Validation%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Markdown](/phone-validation-api.md) · [MCP server](/ai) | > [!TIP] > **Try it here:** enter your Client ID and Client Secret in the **Authentication** box, click **Authorize**, then use **Test Request** on any endpoint. They stay filled in on every API page until you close the tab. ## What you can do | Task | Endpoint | Description | |------|----------|-------------| | **Validate a number** | `POST /phone-validation` | Validate one phone number | | **Bulk validation** | `POST /phone-validation/bulk` | Start an asynchronous bulk job for many numbers | | **Bulk job status** | `GET /phone-validation/bulk/{job_id}` | Progress and results of a bulk job | | **Your price** | `GET /phone-validation/pricing` | Whether the API is enabled for you, and your price per validation | | **Usage history** | `GET /phone-validation/transactions` | Every validation you made, with what it cost | | **Bulk jobs** | `GET /phone-validation/jobs` | All your bulk jobs and their results | | **Health** | `GET /phone-validation/health` | Service availability (no token needed) | ## Quick start 1. **Enable the API.** Phone validation must be enabled for your organization in [OmaxTelecom Console](https://console.omaxtelecom.com). 2. **Get a token** — see [Getting started](/getting-started). 3. **Validate a number:** ```bash curl -X POST "https://api.omaxtelecom.com/numbers/phone-validation?phone_number=%2B38766000111&locale=en" \ -H "Authorization: Bearer $TOKEN" ``` ```json { "success": true, "data": { "valid": true, "possible": true, "phone_number": "+38766000111", "national_format": "066 000-111", "country_code": "BA", "calling_code": "387", "number_type": "MOBILE", "geocoder": { "description": "Bosnia and Herzegovina", "locale": "en" }, "time_zones": ["Europe/Sarajevo"], "carrier": { "name": "BH Telecom", "locale": "en" } } } ``` > [!TIP] > In a query string, `+` must be sent as `%2B`, otherwise it is read as a space. ## Authentication Send an access token on every request except `GET /phone-validation/health`: ```http Authorization: Bearer ``` Get the token from `POST https://api.omaxtelecom.com/auth/token` with your Console `client_id` and `client_secret`. [Getting started](/getting-started) shows how, with code samples. Machine-to-machine clients whose token has no `organization` claim also send: ```http X-Organization-Id: ``` ## The validation result | Field | Description | |-------|-------------| | `valid` | The number is valid for its region | | `possible` | The number has a plausible length, even if it is not valid | | `phone_number` | Normalized E.164 number | | `national_format` | Number formatted the national way | | `country_code` | ISO 3166-1 alpha-2 country code | | `calling_code` | International calling code | | `number_type` | Line type, for example `MOBILE` or `FIXED_LINE` | | `geocoder` | Geographic description of the number | | `time_zones` | Time zones of the number | | `carrier` | Carrier name, when known | ## Responses Successful responses wrap the result in `data`: ```json { "success": true, "data": { ... } } ``` Errors return `success: false` with a code you can branch on: ```json { "success": false, "error": { "code": "VALIDATION_ERROR", "message": "The phone number field format is invalid." } } ``` ## Examples ### Validate a national number Send the number without the country prefix and add `region`: ```bash curl -X POST "https://api.omaxtelecom.com/numbers/phone-validation?phone_number=066000111®ion=BA&locale=en" \ -H "Authorization: Bearer $TOKEN" ``` The result is the same as for `+38766000111` in the quick start. ### Bulk validation Bulk validation runs in the background. Start a job, then poll it until `status` is `completed`. **1. Start the job** — the answer is `202 Accepted` with a `job_id`: ```bash curl -X POST "https://api.omaxtelecom.com/numbers/phone-validation/bulk" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "locale": "en", "validations": [ {"phone_number": "+38766000111"}, {"phone_number": "066000111", "region": "BA"} ] }' ``` ```json { "success": true, "data": { "job_id": "9f3c2b1a-7d6e-4f5a-8b9c-0d1e2f3a4b5c" } } ``` **2. Poll the job:** ```bash curl "https://api.omaxtelecom.com/numbers/phone-validation/bulk/9f3c2b1a-7d6e-4f5a-8b9c-0d1e2f3a4b5c" \ -H "Authorization: Bearer $TOKEN" ``` ```json { "success": true, "data": { "job_id": "9f3c2b1a-7d6e-4f5a-8b9c-0d1e2f3a4b5c", "status": "processing", "total_count": 2, "processed_count": 1, "failed_count": 0, "items": [ { "phone_number": "+38766000111", "region": null, "locale": "en", "status": "completed", "result": { "valid": true, "possible": true, "phone_number": "+38766000111", "national_format": "066 000-111", "country_code": "BA", "calling_code": "387", "number_type": "MOBILE" }, "error": null }, { "phone_number": "066000111", "region": "BA", "locale": "en", "status": "pending", "result": null, "error": null } ] } } ``` ### Health check ```bash curl "https://api.omaxtelecom.com/numbers/phone-validation/health" ``` ```json { "ok": true, "timestamp": "2026-08-20T16:42:00+00:00" } ``` ## Pricing and history **Your price** — `GET /phone-validation/pricing`: ```json { "success": true, "data": { "enabled": true, "price_per_validation": "0.020000", "currency": "EUR" } } ``` **Usage history** — `GET /phone-validation/transactions` lists every validation you made, newest first, with the amount billed. Filter by `from`, `to`, `cached`, `phone_number`, `region`; page with `page` and `per_page`. `GET /phone-validation/transactions/{id}` returns one transaction. **Bulk jobs** — `GET /phone-validation/jobs` lists your bulk jobs (filter by `status`, `from`, `to`); `GET /phone-validation/jobs/{id}` returns one job with its items. ## Billing When your organization's `price_per_validation` is above zero, each successful validation is charged from your Console wallet — repeat validations of the same number too. ## Errors | HTTP status | Error code | What to do | |-------------|------------|------------| | `401` | — | Get a new access token | | `402` | `INSUFFICIENT_BALANCE` | Top up your wallet in Console | | `403` | `PHONE_VALIDATION_DISABLED` | Ask support to enable phone validation for your organization | | `403` | `BILLING_NOT_CONFIGURED` | Billing is not set up for your organization — contact support | | `403` | `ORGANIZATION_NOT_FOUND` | Your organization is not registered — check `X-Organization-Id` or contact support | | `422` | `VALIDATION_ERROR` | Fix the request body or the phone number format | ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Endpoints Full request and response schemas: https://developer.omaxtelecom.com/openapi/phone-validation.json - `POST /token` — Get an access token - `GET /phone-validation/health` — Service health - `GET /phone-validation/pricing` — Get organization phone validation pricing - `GET /phone-validation/transactions` — List phone validation transactions - `GET /phone-validation/transactions/{id}` — Get phone validation transaction - `GET /phone-validation/jobs` — List phone validation bulk jobs - `GET /phone-validation/jobs/{id}` — Get phone validation bulk job detail - `POST /phone-validation` — Validate a single phone number - `POST /phone-validation/bulk` — Create bulk validation job - `GET /phone-validation/bulk/{job_id}` — Get bulk validation job status --- # Number Lookup API The **Number Lookup API** finds the carrier behind a phone number: carrier name, line type and MCC/MNC. Numbers must be in **E.164** format, for example `+38766000111`. This version supports **carrier** lookup. | | | |---|---| | **Base URL** | `https://api.omaxtelecom.com/numbers` | | **Authentication** | Bearer access token — [how to get one](/getting-started) | | **Postman** | [Collection](/postman/number-lookup/number-lookup.postman_collection.json) · [Environment](/postman/number-lookup/number-lookup.postman_environment.json) | | **AI assistants** | [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fnumber-lookup-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Number%20Lookup%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fnumber-lookup-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Number%20Lookup%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Markdown](/number-lookup-api.md) · [MCP server](/ai) | > [!TIP] > **Try it here:** enter your Client ID and Client Secret in the **Authentication** box, click **Authorize**, then use **Test Request** on any endpoint. They stay filled in on every API page until you close the tab. ## What you can do | Task | Endpoint | Description | |------|----------|-------------| | **Look up a number** | `POST /number-lookup` | Carrier lookup for one number | | **Bulk lookup** | `POST /number-lookup/bulk` | Start an asynchronous bulk job for up to 1000 numbers | | **Bulk job status** | `GET /number-lookup/bulk/{job_id}` | Progress and results of a bulk job | | **Your price** | `GET /number-lookup/pricing` | Whether the API is enabled for you, and your price per lookup | | **Usage history** | `GET /number-lookup/transactions` | Every lookup you made, with what it cost | | **Bulk jobs** | `GET /number-lookup/jobs` | All your bulk jobs and their results | | **Health** | `GET /number-lookup/health` | Service availability (no token needed) | ## Quick start 1. **Enable the API.** Number lookup must be enabled for your organization in [OmaxTelecom Console](https://console.omaxtelecom.com). 2. **Get a token** — see [Getting started](/getting-started). 3. **Look up a number:** ```bash curl -X POST "https://api.omaxtelecom.com/numbers/number-lookup?phone_number=%2B38766000111" \ -H "Authorization: Bearer $TOKEN" ``` ```json { "success": true, "data": { "phone_number": "+38766000111", "country_code": "BA", "national_format": "066 000-111", "valid": true, "carrier": { "name": "BH Telecom", "type": "mobile", "mcc": "218", "mnc": "90" } } } ``` > [!TIP] > In a query string, `+` must be sent as `%2B`, otherwise it is read as a space. ## Authentication Send an access token on every request except `GET /number-lookup/health`: ```http Authorization: Bearer ``` Get the token from `POST https://api.omaxtelecom.com/auth/token` with your Console `client_id` and `client_secret`. [Getting started](/getting-started) shows how, with code samples. Machine-to-machine clients whose token has no `organization` claim also send: ```http X-Organization-Id: ``` ## The lookup result | Field | Description | |-------|-------------| | `phone_number` | Normalized E.164 number | | `country_code` | ISO 3166-1 alpha-2 country code | | `national_format` | Number formatted the national way | | `valid` | The number is considered valid | | `carrier.name` | Carrier name, when known | | `carrier.type` | Line type, for example `mobile` or `landline` | | `carrier.mcc` | Mobile Country Code | | `carrier.mnc` | Mobile Network Code | > [!NOTE] > An invalid number is not an error. The answer is still `200 OK`, with `valid: false` and no `carrier`: > > ```json > { "success": true, "data": { "phone_number": "+15551234567", "country_code": "US", "national_format": "(555) 123-4567", "valid": false } } > ``` ## Responses Successful responses wrap the result in `data`: ```json { "success": true, "data": { ... } } ``` Errors return `success: false` with a code you can branch on: ```json { "success": false, "error": { "code": "NUMBER_LOOKUP_UNAVAILABLE", "message": "Number lookup service unavailable" } } ``` ## Examples ### Bulk lookup Bulk lookups run in the background, for up to **1000** unique numbers per request. Start a job, then poll it every 1–3 seconds until `status` is `completed`. **1. Start the job** — the answer is `202 Accepted` with a `job_id`: ```bash curl -X POST "https://api.omaxtelecom.com/numbers/number-lookup/bulk" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"phone_numbers": ["+38766000111", "+38761111222"]}' ``` ```json { "success": true, "data": { "job_id": "9f3c2b1a-7d6e-4f5a-8b9c-0d1e2f3a4b5c" } } ``` **2. Poll the job:** ```bash curl "https://api.omaxtelecom.com/numbers/number-lookup/bulk/9f3c2b1a-7d6e-4f5a-8b9c-0d1e2f3a4b5c" \ -H "Authorization: Bearer $TOKEN" ``` ```json { "success": true, "data": { "job_id": "9f3c2b1a-7d6e-4f5a-8b9c-0d1e2f3a4b5c", "status": "completed", "total_count": 2, "processed_count": 2, "failed_count": 0, "items": [ { "phone_number": "+38766000111", "status": "completed", "result": { "phone_number": "+38766000111", "country_code": "BA", "national_format": "066 000-111", "valid": true, "carrier": { "name": "BH Telecom", "type": "mobile", "mcc": "218", "mnc": "90" } }, "error": null }, { "phone_number": "+38761111222", "status": "completed", "result": { "phone_number": "+38761111222", "country_code": "BA", "national_format": "061 111-222", "valid": true, "carrier": { "name": "HT Eronet", "type": "mobile", "mcc": "218", "mnc": "03" } }, "error": null } ] } } ``` ### Health check ```bash curl "https://api.omaxtelecom.com/numbers/number-lookup/health" ``` ```json { "ok": true, "timestamp": "2026-08-20T16:42:00+00:00" } ``` ## Pricing and history **Your price** — `GET /number-lookup/pricing`: ```json { "success": true, "data": { "enabled": true, "price_per_lookup": "0.050000", "currency": "EUR" } } ``` **Usage history** — `GET /number-lookup/transactions` lists every lookup you made, newest first, with the amount billed. Filter by `from`, `to`, `cached`, `phone_number`, `lookup_type`; page with `page` and `per_page`. `GET /number-lookup/transactions/{id}` returns one transaction. **Bulk jobs** — `GET /number-lookup/jobs` lists your bulk jobs (filter by `status`, `from`, `to`); `GET /number-lookup/jobs/{id}` returns one job with its items. ## Billing When your organization's `price_per_lookup` is above zero, each lookup is charged from your Console wallet — repeat lookups of the same number too. ## Errors | HTTP status | Error code | What to do | |-------------|------------|------------| | `401` | — | Get a new access token | | `402` | `INSUFFICIENT_BALANCE` | Top up your wallet in Console | | `403` | `NUMBER_LOOKUP_DISABLED` | Ask support to enable number lookup for your organization | | `403` | `BILLING_NOT_CONFIGURED` | Billing is not set up for your organization — contact support | | `403` | `ORGANIZATION_NOT_FOUND` | Your organization is not registered — check `X-Organization-Id` or contact support | | `422` | — | The number is not in E.164 format, or the request is invalid | | `503` | `NUMBER_LOOKUP_UNAVAILABLE` | The lookup provider is unavailable — retry later | ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Endpoints Full request and response schemas: https://developer.omaxtelecom.com/openapi/number-lookup.json - `POST /token` — Get an access token - `GET /number-lookup/health` — Service health - `GET /number-lookup/pricing` — Get organization number lookup pricing - `GET /number-lookup/transactions` — List number lookup transactions - `GET /number-lookup/transactions/{id}` — Get number lookup transaction - `GET /number-lookup/jobs` — List number lookup bulk jobs - `GET /number-lookup/jobs/{id}` — Get number lookup bulk job detail - `POST /number-lookup` — Single number lookup - `POST /number-lookup/bulk` — Create bulk lookup job - `GET /number-lookup/bulk/{job_id}` — Get bulk lookup job status and results --- # MCC-MNC API The **MCC-MNC API** tells you which mobile network operator is behind an **MCC/MNC** pair or a **PLMN**, and lists the operators of a country or searches them by name. Use it to enrich phone numbers, validate roaming data, or power an operator picker in your app. | | | |---|---| | **Base URL** | `https://api.omaxtelecom.com/tools/mcc-mnc` | | **Authentication** | Bearer access token — [how to get one](/getting-started) | | **Postman** | [Collection](/postman/mcc-mnc/mcc-mnc.postman_collection.json) · [Environment](/postman/mcc-mnc/mcc-mnc.postman_environment.json) | | **AI assistants** | [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fmcc-mnc-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20MCC-MNC%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fmcc-mnc-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20MCC-MNC%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Markdown](/mcc-mnc-api.md) · [MCP server](/ai) | > [!TIP] > **Try it here:** enter your Client ID and Client Secret in the **Authentication** box, click **Authorize**, then use **Test Request** on any endpoint. They stay filled in on every API page until you close the tab. ## What you can do | Task | Endpoint | Description | |------|----------|-------------| | **Look up an operator** | `POST /lookup` | Resolve one operator by MCC + MNC or by PLMN | | **List a country's operators** | `POST /by-country` | All operators for an ISO country code or dial prefix | | **Search by name** | `POST /search` | Find operators by name (at least 2 characters) | | **Bulk lookup** | `POST /bulk/lookup` | Start an asynchronous bulk job for many lookups | | **Bulk job status** | `GET /bulk/lookup/{job}` | Progress and results of a bulk job | | **Your price** | `GET /pricing` | Whether the API is enabled for you, and your price per request | | **Usage history** | `GET /transactions` | Every request you made, with what it cost | | **Bulk jobs** | `GET /jobs` | All your bulk jobs and their results | | **Health** | `GET /health` | Service availability (no token needed) | ## Quick start 1. **Enable the API.** MCC-MNC must be enabled for your organization in [OmaxTelecom Console](https://console.omaxtelecom.com). 2. **Get a token** — see [Getting started](/getting-started). 3. **Look up an operator:** ```bash curl -X POST "https://api.omaxtelecom.com/tools/mcc-mnc/lookup?mcc=242&mnc=99" \ -H "Authorization: Bearer $TOKEN" ``` ```json { "success": true, "data": { "mcc": "242", "mnc": "99", "plmn": "24299", "region": "Europe", "country": "Norway", "iso": "NO", "dial_code": "+47", "dial_codes": ["+47"], "operator": "TampNet AS", "brand": null, "tadig": "NORTM", "bands": "LTE 800, LTE 1800" } } ``` ## Authentication Send an access token on every request except `GET /health`: ```http Authorization: Bearer ``` Get the token from `POST https://api.omaxtelecom.com/auth/token` with your Console `client_id` and `client_secret`. [Getting started](/getting-started) shows how, with code samples. ## The operator object Every lookup, list and search returns operators with these fields: | Field | Description | |-------|-------------| | `mcc` | Mobile Country Code | | `mnc` | Mobile Network Code | | `plmn` | MCC and MNC combined | | `region` | Geographic region | | `country` | Country name | | `iso` | ISO 3166-1 alpha-2 country code | | `dial_code` | Main international dial prefix | | `dial_codes` | All dial prefixes of the country | | `operator` | Network operator name | | `brand` | Commercial brand, when it differs from the operator name | | `tadig` | TADIG code (used in roaming) | | `bands` | Supported frequency bands | ## Responses Successful responses wrap the result in `data`: ```json { "success": true, "data": { ... } } ``` Errors return `success: false` with a code you can branch on: ```json { "success": false, "error": { "code": "OPERATOR_NOT_FOUND", "message": "No operator matched the request" } } ``` ## Examples ### Look up by PLMN ```bash curl -X POST "https://api.omaxtelecom.com/tools/mcc-mnc/lookup?plmn=24299" \ -H "Authorization: Bearer $TOKEN" ``` Returns the same operator as the MCC + MNC lookup in the quick start. When nothing matches, the answer is `404` with `OPERATOR_NOT_FOUND`. ### List the operators of a country ```bash curl -X POST "https://api.omaxtelecom.com/tools/mcc-mnc/by-country?iso=NO" \ -H "Authorization: Bearer $TOKEN" ``` ```json { "success": true, "data": { "iso": "NO", "dial_code": "+47", "count": 2, "operators": [ { "mcc": "242", "mnc": "01", "plmn": "24201", "region": "Europe", "country": "Norway", "iso": "NO", "dial_code": "+47", "dial_codes": ["+47"], "operator": "Telenor Norge AS", "brand": "Telenor", "tadig": "NORTM", "bands": "GSM 900, UMTS 2100, LTE 800" }, { "mcc": "242", "mnc": "02", "plmn": "24202", "region": "Europe", "country": "Norway", "iso": "NO", "dial_code": "+47", "dial_codes": ["+47"], "operator": "Telia Norge AS", "brand": "Telia", "tadig": "NORTL", "bands": "GSM 900, UMTS 2100, LTE 800" } ] } } ``` ### Search operators by name ```bash curl -X POST "https://api.omaxtelecom.com/tools/mcc-mnc/search?query=Telenor&iso=NO&limit=10" \ -H "Authorization: Bearer $TOKEN" ``` ```json { "success": true, "data": { "query": "Telenor", "iso": "NO", "limit": 10, "count": 1, "operators": [ { "mcc": "242", "mnc": "01", "plmn": "24201", "region": "Europe", "country": "Norway", "iso": "NO", "dial_code": "+47", "dial_codes": ["+47"], "operator": "Telenor Norge AS", "brand": "Telenor", "tadig": "NORTM", "bands": "GSM 900, UMTS 2100, LTE 800" } ] } } ``` ### Bulk lookup Bulk lookups run in the background. Start a job, then poll it until `status` is `completed`. **1. Start the job** — the answer is `202 Accepted` with a `job_id`: ```bash curl -X POST "https://api.omaxtelecom.com/tools/mcc-mnc/bulk/lookup" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"items": [{"mcc": "242", "mnc": "01"}, {"plmn": "24299"}]}' ``` ```json { "success": true, "data": { "job_id": "9f3c2b1a-7d6e-4f5a-8b9c-0d1e2f3a4b5c" } } ``` **2. Poll the job:** ```bash curl "https://api.omaxtelecom.com/tools/mcc-mnc/bulk/lookup/9f3c2b1a-7d6e-4f5a-8b9c-0d1e2f3a4b5c" \ -H "Authorization: Bearer $TOKEN" ``` ```json { "success": true, "data": { "job_id": "9f3c2b1a-7d6e-4f5a-8b9c-0d1e2f3a4b5c", "status": "processing", "total_count": 2, "processed_count": 1, "failed_count": 0, "items": [ { "plmn": "24201", "status": "completed", "result": { "mcc": "242", "mnc": "01", "plmn": "24201", "region": "Europe", "country": "Norway", "iso": "NO", "dial_code": "+47", "dial_codes": ["+47"], "operator": "Telenor Norge AS", "brand": "Telenor", "tadig": "NORTM", "bands": "GSM 900, UMTS 2100, LTE 800" }, "error": null }, { "plmn": "24299", "status": "pending", "result": null, "error": null } ] } } ``` ### Health check ```bash curl "https://api.omaxtelecom.com/tools/mcc-mnc/health" ``` ```json { "ok": true, "timestamp": "2026-08-20T16:42:00+00:00" } ``` ## Pricing and history **Your price** — `GET /pricing`: ```json { "success": true, "data": { "enabled": true, "price_per_request": "0.010000", "currency": "EUR" } } ``` **Usage history** — `GET /transactions` lists every request you made, newest first, with the amount billed. Filter by `from`, `to`, `cached`, `request_type`, `plmn`, `search`; page with `page` and `per_page`. `GET /transactions/{id}` returns one transaction. **Bulk jobs** — `GET /jobs` lists your bulk jobs (filter by `status`); `GET /jobs/{id}` returns one job with its items. ## Billing Each successful **lookup**, **by-country** or **search** request is charged at your organization's `price_per_request` from your Console wallet, when that price is above zero. ## Errors | HTTP status | Error code | What to do | |-------------|------------|------------| | `401` | — | Get a new access token | | `402` | `INSUFFICIENT_BALANCE` | Top up your wallet in Console | | `403` | `MCC_MNC_DISABLED` | Ask support to enable the MCC-MNC API for your organization | | `403` | `BILLING_NOT_CONFIGURED` | Billing is not set up for your organization — contact support | | `404` | `OPERATOR_NOT_FOUND` | No operator matches; check the MCC, MNC or PLMN | ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Endpoints Full request and response schemas: https://developer.omaxtelecom.com/openapi/mcc-mnc.json - `POST /token` — Get an access token - `GET /health` — Service health - `GET /pricing` — Get organization MCC-MNC pricing - `GET /transactions` — List MCC-MNC transactions - `GET /transactions/{id}` — Get MCC-MNC transaction - `GET /jobs` — List MCC-MNC bulk jobs - `GET /jobs/{id}` — Get MCC-MNC bulk job detail - `POST /lookup` — Lookup operator by MCC+MNC or PLMN - `POST /by-country` — List operators by ISO country or dial code - `POST /search` — Search operators by name - `POST /bulk/lookup` — Bulk operator lookup - `GET /bulk/lookup/{job}` — Poll bulk lookup job (legacy) --- # Phone Numbers API The **Phone Numbers API** lets you find and buy phone numbers — one by one or in bulk — route their calls and SMS to your systems, send and receive SMS, and complete KYC. All phone numbers are in **E.164** format, for example `+442071234567`. | | | |---|---| | **Base URL** | `https://api.omaxtelecom.com/numbers` | | **Authentication** | Bearer access token — [how to get one](/getting-started) | | **Postman** | [Collection](/postman/phone-numbers/phone-numbers.postman_collection.json) · [Environment](/postman/phone-numbers/phone-numbers.postman_environment.json) | | **AI assistants** | [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fphone-numbers-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Phone%20Numbers%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdeveloper.omaxtelecom.com%2Fphone-numbers-api.md%20and%20help%20me%20integrate%20the%20OmaxTelecom%20Phone%20Numbers%20API%20into%20my%20application.%20Ask%20me%20which%20language%20I%20use%20first.) · [Markdown](/phone-numbers-api.md) · [MCP server](/ai) | > [!TIP] > **Try it here:** enter your Client ID and Client Secret in the **Authentication** box, click **Authorize**, then use **Test Request** on any endpoint. They stay filled in on every API page until you close the tab. ## What you can do | Task | Endpoint | Description | |------|----------|-------------| | **See what is on sale** | `GET /coverage` | Countries, number types, billing periods and lowest prices | | **Search numbers** | `GET /available` | Numbers you can buy, with the price of every billing period | | **Get a quote** | `POST /preview` | Exact price for the numbers you picked | | **Buy numbers** | `POST /` | Buy the numbers you picked | | **Bulk order** | `POST /bulk-orders` | Buy up to 100 numbers of one country and type; we pick them | | **Follow orders** | `GET /orders` | Your orders and the numbers in them | | **Your numbers** | `GET /` | Numbers your organization owns | | **Route calls and SMS** | `PATCH /{id}` | Assign voice and SMS endpoints to a number | | **Release a number** | `DELETE /{id}` | Give a number back | | **Routing endpoints** | `/endpoints` | Your SIP (voice) and HTTPS (SMS) destinations | | **Send SMS** | `POST /sms/messages` | Send an SMS from a number you own | | **SMS history** | `GET /sms/messages` | Inbound and outbound messages | | **SMS prices** | `GET /sms/pricing` | Inbound and outbound SMS rates | | **KYC** | `/kyc/…` | What is required, document upload and submissions | | **Health** | `GET /health` | Service availability (no token needed) | ## Quick start 1. **Enable the API.** Phone numbers must be enabled for your organization in [OmaxTelecom Console](https://console.omaxtelecom.com). 2. **Get a token** — see [Getting started](/getting-started). 3. **Check KYC.** `GET /kyc/requirements?country_iso=GB&number_type=local` tells you whether you need to submit KYC before buying. 4. **Buy a number** in three calls: | Step | Endpoint | What happens | |------|----------|--------------| | **1. Search** | `GET /available?country_iso=GB&number_type=local` | Numbers on sale, each with `terms`: the price of every billing period | | **2. Quote** | `POST /preview` with `number_ids` and `billing_period` | The exact total and a `quote_token`, valid for 10 minutes | | **3. Buy** | `POST /` with the same `number_ids` and `billing_period`, the `quote_token` and `expected_total_cost_minor` | The numbers are charged to your wallet and activated | 5. **Route the number:** create an endpoint with `POST /endpoints` and assign it with `PATCH /{phoneNumberId}`. **With the Node.js SDK** ([installation](/getting-started#description/nodejs-sdk)), the same purchase: ```js import { Omax } from "@omaxtelecom/sdk"; const omax = new Omax(); // reads OMAX_CLIENT_ID and OMAX_CLIENT_SECRET const { numbers } = await omax.phoneNumbers.searchAvailable({ country_iso: "GB", number_type: "local" }); const number_ids = [numbers[0].id]; const { quote } = await omax.phoneNumbers.preview({ number_ids, billing_period: "monthly" }); const purchase = await omax.phoneNumbers.purchase({ number_ids, billing_period: "monthly", quote_token: quote.quote_token, expected_total_cost_minor: quote.upfront_total.amount_minor, }); ``` The SDK sends the required `Idempotency-Key` and keeps it when it retries, so a retry never buys twice. ## Authentication Send an access token on every request except `GET /health`: ```http Authorization: Bearer ``` Get the token from `POST https://api.omaxtelecom.com/auth/token` with your Console `client_id` and `client_secret`. [Getting started](/getting-started) shows how, with code samples. Machine-to-machine clients whose token has no `organization` claim also send: ```http X-Organization-Id: ``` The organization must exist with status `active`, and phone numbers must be enabled for it. ## Prices and billing periods A number is bought for one **billing period**: `monthly` (1 month), `quarterly` (3), `six_monthly` (6) or `annually` (12). Which periods are available, and their prices, depend on the country and number type — `terms` in the search result lists them, and `billing_periods` in `GET /coverage` shows them per country. Some countries are sold on one period only; quote and buy only on a period that is listed. For the period you choose you pay: - a one-off **connection fee** (`connection_fee`) per number, when you buy; - the **period price** (`recurring_fee`) per number, when you buy and again on every renewal (`next_billing_date`). `recurring_fee` is the price of the **whole period**, not per month; `monthly_equivalent` is for comparison only. The price is fixed when you buy, for the life of the number. Amounts are objects — use `amount_minor` (cents) for calculations: ```json { "amount": "8.00", "amount_minor": 800, "currency": "EUR" } ``` ## Buying numbers ### Search ```bash curl "https://api.omaxtelecom.com/numbers/available?country_iso=GB&number_type=local&limit=20" \ -H "Authorization: Bearer $TOKEN" ``` Each number has a catalog `id` and its `terms`. Add `billing_period` to only see numbers sold on that period, or `pattern` to look for digits (`*123*`). Catalog IDs are temporary — use them within a few minutes, and keep all IDs of one purchase from the same search. ### Quote ```bash curl -X POST "https://api.omaxtelecom.com/numbers/preview" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"number_ids": ["f47ac10b-58cc-4372-a567-0e02b2c3d479"], "billing_period": "annually"}' ``` ```json { "success": true, "data": { "numbers": [ "…" ], "quote": { "billing_period": "annually", "months": 12, "quantity": 1, "connection_fee": { "amount": "0.00", "amount_minor": 0, "currency": "EUR" }, "recurring_fee": { "amount": "28.00", "amount_minor": 2800, "currency": "EUR" }, "upfront_total": { "amount": "28.00", "amount_minor": 2800, "currency": "EUR" }, "quote_token": "QT_3f9a1c", "expires_at": "2026-10-16T10:10:00Z", "first_billing_date": "2026-10-16", "next_billing_date": "2027-10-16" } } } ``` ### Buy Send the quote back. `Idempotency-Key` is required, so a retry after a network error never buys twice. ```bash curl -X POST "https://api.omaxtelecom.com/numbers" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: order-2026-10-16-001" \ -d '{ "number_ids": ["f47ac10b-58cc-4372-a567-0e02b2c3d479"], "billing_period": "annually", "quote_token": "QT_3f9a1c", "expected_total_cost_minor": 2800 }' ``` The answer is `202 Accepted` with the order and the numbers; the `Location` header points to `GET /orders/{orderId}`. ```json { "success": true, "data": { "order": { "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "status": "completed" }, "phone_numbers": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "e164": "+442071234567", "national_format": "020 7123 4567", "country_iso": "GB", "number_type": "local", "recurring_fee": { "amount": "28.00", "amount_minor": 2800, "currency": "EUR" }, "status": "active", "kyc_status": "approved", "traffic_direction": "inbound_and_outbound", "capabilities": { "voice": true, "sms": true }, "voice_endpoint_id": null, "sms_endpoint_id": null, "next_billing_date": "2027-10-16", "billing_period": "annually" } ] } } ``` Your wallet is charged before the numbers are bought from the provider. If some numbers can't be delivered, that part is **refunded automatically**. If the price changed since your quote, the purchase fails with `PRICE_CHANGED` — get a new quote. ## Bulk orders To buy many numbers of one country and type without picking them: 1. `GET /coverage` — what is on sale, and `bulk.max_quantity` (100). 2. `POST /bulk-orders/preview` with `country_iso`, `number_type`, `billing_period` and `quantity` (optionally `pattern`). You get the price, a single-use `quote_token` (10 minutes) and `availability` — whether enough numbers are in stock right now. 3. `POST /bulk-orders` with the same fields plus `quote_token` and `expected_total_cost_minor` (`quote.upfront_total.amount_minor`). `Idempotency-Key` is required. ```bash curl -X POST "https://api.omaxtelecom.com/numbers/bulk-orders" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: bulk-2026-10-16-001" \ -d '{ "country_iso": "GB", "number_type": "local", "billing_period": "annually", "quantity": 25, "quote_token": "QT_8b21d4", "expected_total_cost_minor": 70000 }' ``` The order runs in the background, in batches of 10. Each batch is charged before it is bought, and anything that can't be delivered is refunded. Poll `GET /orders/{orderId}` until `status` is final: | Status | Meaning | |--------|---------| | `pending`, `processing` | Still running | | `completed` | Every number was bought | | `partially_completed` | Stock or balance ran out — you keep and pay only what was bought; `failure` says why | | `failed` | Nothing was bought; `failure` says why | `quantity_fulfilled` shows how many numbers were bought so far. `GET /orders` lists all your orders, newest first. ## Routing calls and SMS Create an endpoint once, then assign it to any number. ```bash curl -X POST "https://api.omaxtelecom.com/numbers/endpoints" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "Office PBX", "type": "voice", "destination_uri": "203.0.113.10:5060"}' ``` - **Voice** (`type: voice`) — a SIP destination: an IP (`203.0.113.10`), IP and port (`203.0.113.10:5060`), a domain (`pbx.example.com`) or a full `sip:` URI. The called number goes where you put `%e164`, `%e164noplus`, `%national` or `%raw`; without a placeholder `%e164` is used. The response shows the normalized value, for example `sip:%e164@203.0.113.10:5060`. - **SMS** (`type: sms`) — `mailto:` with up to 5 comma-separated email addresses; every inbound SMS is emailed to all of them. To receive inbound SMS in your system, use [webhooks](/webhooks) (`phone_numbers.sms.received`). The endpoint is registered with the carrier right away. If the carrier refuses it (`422`) or is unavailable (`503`), nothing is created and you can retry. Assign endpoints to a number — fields you leave out stay unchanged, `null` removes the assignment: ```bash curl -X PATCH "https://api.omaxtelecom.com/numbers/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"voice_endpoint_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "sms_endpoint_id": "c3d4e5f6-a7b8-9012-cdef-123456789012"}' ``` An endpoint that is still assigned to a number can't be deleted (`409 ENDPOINT_IN_USE`). ## SMS ### Send ```bash curl -X POST "https://api.omaxtelecom.com/numbers/sms/messages" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: sms-order-991" \ -d '{"from": "+442071234567", "to": "+447911123456", "body": "Your code is 123456", "client_reference": "order-991"}' ``` `from` must be an active number you own. The answer is `202` with the message (`status: pending`) and its price; the delivery status updates later. `GET /sms/messages/{messageId}` shows it, and `GET /sms/messages` lists inbound and outbound messages, newest first, with `direction`, `phone_number_id`, `status`, `since` and `until` filters and cursor paging. ### Receive SMS sent to your numbers reach you in two ways, and you can use both: - **By webhook**: subscribe to `phone_numbers.sms.received` in the Console under **Webhooks**. Every inbound SMS is sent as a signed JSON `POST` to your HTTPS endpoint, and you can limit an endpoint to chosen numbers. The payload, signature check and retries are described in the [Webhooks guide](/webhooks). - **By email**: assign an SMS endpoint with a `mailto:` destination to the number. `GET /sms/messages?direction=inbound` lists received messages, and `POST /sms/messages/{messageId}/retry` forwards an inbound message to its SMS endpoint again. Status changes of the SMS you send, numbers bought, renewed or released, orders, KYC reviews and porting are also available as [webhooks](/webhooks). ## KYC Some countries and number types require KYC (know your customer) before you can buy. 1. `GET /kyc/requirements?country_iso=GB&number_type=local` — the `fields` and `document_types` you need. Empty lists mean nothing is required. 2. `POST /kyc/documents` — upload each document (`multipart/form-data`: `file` as PDF, JPG or PNG up to 10 MB, and its `type`). You get a document `id`. 3. Submit `data` (the field values) and `document_ids`: - `POST /kyc/organization` — when your organization uses organization-level KYC (once, before buying); - `POST /{phoneNumberId}/kyc` — when your organization uses per-number KYC. `GET /kyc/organization` and `GET /{phoneNumberId}/kyc` show the status of a submission. Buying without the required KYC fails with `403 KYC_REQUIRED`. ## Responses Successful responses wrap the result in `data`: ```json { "success": true, "data": { ... } } ``` Errors return `success: false` with a code you can branch on: ```json { "success": false, "error": { "code": "ERROR_CODE", "message": "Human-readable message" } } ``` ## Idempotency and rate limits - `POST /`, `POST /bulk-orders` and `POST /sms/messages` **require** an `Idempotency-Key` header; creating endpoints and KYC submissions accept one. The same key with the same body within 24 hours returns the first response with `Idempotent-Replayed: true`; the same key with a different body returns `422 IDEMPOTENCY_KEY_REUSED`. - Requests are rate limited per organization. Every response has `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`; when you go over, you get `429 RATE_LIMITED` with `Retry-After`. ## Errors | HTTP status | Error code | What to do | |-------------|------------|------------| | `401` | `UNAUTHORIZED` | Get a new access token | | `402` | `INSUFFICIENT_BALANCE` | Top up your wallet in Console | | `403` | `PHONE_NUMBERS_DISABLED` | Ask support to enable phone numbers for your organization | | `403` | `BILLING_NOT_CONFIGURED` | Billing is not set up for your organization — contact support | | `403` | `KYC_REQUIRED` | Complete KYC first — see `GET /kyc/requirements` | | `403` | `TRAFFIC_RESTRICTED` | This number can't send SMS | | `403` | `SENDER_NOT_OWNED`, `SENDER_NOT_ACTIVE` | Send from an active number you own | | `403` | `RATE_NOT_CONFIGURED` | No SMS rate for this destination — contact support | | `404` | `NOT_FOUND` | The resource doesn't exist or isn't yours | | `404` | `OFFERING_NOT_FOUND` | No numbers are sold for that country, type or billing period. For a billing period the message lists the ones that are, e.g. `Available: quarterly.` — use one of them | | `409` | `NUMBER_UNAVAILABLE` | The number is no longer available — search again | | `409` | `PRICE_CHANGED` | The price changed since your quote — get a new quote | | `409` | `QUOTE_EXPIRED`, `QUOTE_MISMATCH` | Get a new quote for exactly the same request | | `409` | `ENDPOINT_IN_USE` | Unassign the endpoint from its numbers first | | `409` | `IDEMPOTENCY_IN_PROGRESS` | The same key is still being processed — retry shortly | | `422` | `VALIDATION_FAILED`, `VALIDATION_ERROR` | Fix the request; the response lists the fields | | `422` | `IDEMPOTENCY_KEY_REQUIRED`, `IDEMPOTENCY_KEY_REUSED` | Send a new, unique `Idempotency-Key` | | `422` | `PURCHASE_NOT_AVAILABLE` | The number provider refused to quote these numbers (`POST /preview`). Don't retry the same request — search again, and contact support with the `X-Request-Id` if it keeps happening | | `429` | `RATE_LIMITED` | Wait for `Retry-After` seconds | | `503` | `PHONE_NUMBERS_UNAVAILABLE`, `BILLING_UNAVAILABLE` | Temporary problem — retry later with back-off | Branch on `error.code` and the HTTP status, never on `message`. Every response has an `X-Request-Id` header (send your own `X-Request-Id` to set it); quote it when you contact support so we can find the exact request. ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Endpoints Full request and response schemas: https://developer.omaxtelecom.com/openapi/phone-numbers.json - `POST /token` — Get an access token - `GET /health` — Phone numbers service health - `GET /available` — Search available numbers - `POST /preview` — Preview purchase cost - `GET /` — List owned phone numbers - `POST /` — Purchase phone numbers - `GET /coverage` — Countries and number types on sale - `POST /bulk-orders/preview` — Quote a bulk order - `POST /bulk-orders` — Place a bulk order - `GET /orders` — List orders - `GET /orders/{orderId}` — Get purchase order - `GET /{phoneNumberId}` — Get phone number - `DELETE /{phoneNumberId}` — Release phone number - `PATCH /{phoneNumberId}` — Update voice and SMS routing - `GET /{phoneNumberId}/kyc` — Get per-number KYC submission - `POST /{phoneNumberId}/kyc` — Submit per-number KYC - `GET /endpoints` — List routing endpoints - `POST /endpoints` — Create routing endpoint - `GET /endpoints/{endpointId}` — Get routing endpoint - `DELETE /endpoints/{endpointId}` — Delete routing endpoint - `PATCH /endpoints/{endpointId}` — Update routing endpoint - `GET /sms/messages` — List SMS messages - `POST /sms/messages` — Send SMS - `GET /sms/messages/{messageId}` — Get SMS message - `POST /sms/messages/{messageId}/retry` — Retry forwarding an inbound SMS - `GET /sms/pricing` — List inbound and outbound SMS rates - `GET /kyc/requirements` — Get KYC requirements - `POST /kyc/documents` — Upload KYC document - `GET /kyc/organization` — Get organization KYC submission - `POST /kyc/organization` — Submit organization KYC - `GET /port-ins/quote` — Port in price and dates - `POST /port-ins` — Port in a UK mobile number - `POST /{phoneNumberId}/port-out` — Request a PAC to port a number out - `GET /port-requests` — List port requests - `GET /port-requests/{portRequestId}` — Get port request - `POST /port-requests/{portRequestId}/cancellation` — Ask to cancel a port --- # Webhooks **Webhooks** tell your system when something happens on your OmaxTelecom account: an SMS is delivered, a number is bought, an eSIM package runs low, an invoice is paid. Instead of polling the APIs, you register an HTTPS URL in the Console and we send a signed `POST` request to it for every event you subscribe to. One webhook setup covers every product. You manage it in the [Console](https://console.omaxtelecom.com/webhooks) under **Webhooks**, not through the product APIs. ## What you can do | Product | Events | Examples | |---------|--------|----------| | **Billing** | `console.invoice.*`, `console.wallet.*` | Invoice created or paid, wallet topped up, wallet balance low | | **SMS API** | `sms.message.*`, `sms.batch.*`, `sms.sender_id.*`, `sms.wallet.*`, `sms.otp.*` | Message sent, delivered, failed or expired; bulk batch finished; sender ID approved; one-time code verified | | **Phone Numbers API** | `phone_numbers.sms.*`, `phone_numbers.number.*`, `phone_numbers.order.*`, `phone_numbers.kyc.*`, `phone_numbers.port.updated` | SMS received on your number, number bought or renewed, order completed, KYC approved, port status changed | | **Bappy API** | `bappy.link.*`, `bappy.package.*`, `bappy.usage.*`, `bappy.network.*`, `bappy.sms.*` | Link created, package activated or expired, 80% of data used, link attached to a network, SMS to a link delivered | | **Whitelabel** | `whitelabel.order.*`, `whitelabel.customer.*`, `whitelabel.customer_wallet.*`, `whitelabel.earning.*`, `whitelabel.payout.*`, `whitelabel.affiliate.*`, `whitelabel.store.*`, `whitelabel.esim.*` | Order paid or refunded, customer registered, payout processed, sold eSIM expired | Every event name has three parts: `..`. The full list with payloads is in the [Event reference](#description/event-reference). ## Quick start **1. Add an endpoint.** In the Console open **Webhooks** → **Add endpoint**: - **Destination URL**: a public `https://` URL that accepts `POST` requests. Plain `http://` URLs are refused. - **Description** (optional): a note for your team. - **Events to send**: pick the event types you need. Leave all unselected to receive every event type, including types added later. - For phone number events you can also limit the endpoint to up to 10 of your numbers. - Keep **Endpoint enabled** on and save. **2. Copy the signing secret.** It is shown right after the endpoint is created. You can reveal it again on the endpoint page. Store it in your server configuration; you need it to [verify every request](#description/verify-the-signature). **3. Send a test event.** Open the endpoint → **Send test event** → choose an event type → **Send test**. We send an example payload for that event type to this endpoint only, signed like a real event. **4. Check the result.** The endpoint page and the **Delivery log** show every attempt with the HTTP status your server answered. > [!NOTE] > Webhooks are managed by Console users who can manage API keys. Each organization has its own endpoints and receives only its own events. ## Your endpoint - **Answer fast with any `2xx` status.** Do your processing after you have answered, for example by putting the event on a queue. Any other status, or no answer in time, counts as a failed attempt. - **Failed attempts are retried automatically**, with increasing pauses between attempts. You can also send a message again yourself from the Console (**Resend**). - **Events can arrive more than once and out of order.** Use the `svix-id` header to recognise a message you have already processed, and compare the timestamps in the payload when the order matters. - **Verify the signature** of every request before you trust it. - **Keep the URL secret** and use a path that is hard to guess. Never act on a request that fails verification. ## Request format Every webhook is an HTTP `POST` with a JSON body: ```http POST /hooks/omax HTTP/1.1 Host: example.com Content-Type: application/json svix-id: msg_2pX4Kq7Lm9Rt1Vw3Yz5Ab8Cd0Ef svix-timestamp: 1793869200 svix-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4= ``` | Header | Description | |--------|-------------| | `svix-id` | Unique message ID. The same message keeps the same ID on every retry and resend, so use it to de-duplicate | | `svix-timestamp` | Time the request was signed, in Unix seconds | | `svix-signature` | One or more signatures, separated by spaces, each in the form `v1,` | The values above are only an example; your requests carry their own ID, timestamp and signature. ### Body The body is a JSON object with the event type in `type` and the data in one object named after what the event is about: ```json { "type": "phone_numbers.number.purchased", "phone_number": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "e164": "+442071234567", "country_iso": "GB", "number_type": "local", "status": "active", "kyc_status": "approved", "billing_period": "monthly", "next_billing_date": "2026-12-01", "order_id": "0198c5f9-52b0-7b1e-8c3d-4e5f6a7b8c9d" }, "organization_sso_id": "your-organization" } ``` - `type` is always present and repeats the event name. - `organization_sso_id` identifies your organization. It is present on every event except the billing events, which carry the organization inside the object instead (see [Billing events](#description/billing-events)). - Times are UTC in ISO 8601, for example `2026-11-01T10:15:30Z`. Dates without a time are `YYYY-MM-DD`. - Money amounts are decimal **strings**, never floating-point numbers, for example `"0.045"`. - Fields listed for an event are always present; a field without a value is `null`. The only exception is `network.previous`, which exists only in `bappy.network.changed`. - New fields can be added to a payload at any time. Ignore fields you don't know. ## Verify the signature Every request is signed with your endpoint's signing secret. Check the signature before you parse or trust the body. 1. Take the secret. If it starts with `whsec_`, remove that prefix. Base64-decode the rest: the bytes are your signing key. 2. Build the signed content: the `svix-id` header, a dot, the `svix-timestamp` header, a dot, and the **raw** request body exactly as received: ``` {svix-id}.{svix-timestamp}.{raw body} ``` 3. Compute HMAC-SHA256 of the signed content with the key, and Base64-encode the result. 4. `svix-signature` contains one or more space-separated entries such as `v1,K5oZ…`. The request is valid when the part after `v1,` of any entry equals your result. Compare in constant time. 5. Reject the request when `svix-timestamp` is more than **5 minutes** away from your server time. This stops old requests from being replayed. > [!WARNING] > Use the raw body. Frameworks that parse JSON and serialize it again change spaces or key order, and the signature no longer matches. With the [Node.js SDK](/getting-started#description/nodejs-sdk), `omax.webhooks.verify()` does all of these checks and returns the event, typed by its `type`: ```javascript // Node.js SDK (Express) import express from "express"; import { Omax, OmaxWebhookVerificationError } from "@omaxtelecom/sdk"; const omax = new Omax(); const app = express(); app.post("/hooks/omax", express.raw({ type: "application/json" }), (req, res) => { let event; try { event = omax.webhooks.verify(req.body, req.headers, process.env.OMAX_WEBHOOK_SECRET); } catch (error) { if (error instanceof OmaxWebhookVerificationError) return res.sendStatus(401); throw error; } res.sendStatus(200); // answer first, then process if (event.type === "phone_numbers.sms.received") { console.log(event.sms.from, event.sms.body); } }); ``` While you rotate the secret, pass both: `verify(body, headers, [newSecret, oldSecret])`. `omax.webhooks.sign(payload, secret)` signs a payload like we do, to test your handler. Without the SDK, check the signature yourself: ```javascript // Node.js (Express) const crypto = require("crypto"); const express = require("express"); const app = express(); const SECRET = process.env.OMAX_WEBHOOK_SECRET; // whsec_... function verify(rawBody, headers) { const id = headers["svix-id"]; const timestamp = headers["svix-timestamp"]; const signatures = headers["svix-signature"]; if (!id || !timestamp || !signatures) return false; if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false; const key = Buffer.from(SECRET.replace(/^whsec_/, ""), "base64"); const expected = crypto .createHmac("sha256", key) .update(`${id}.${timestamp}.${rawBody}`) .digest("base64"); return signatures.split(" ").some((entry) => { const [version, signature] = entry.split(",", 2); return ( version === "v1" && signature && signature.length === expected.length && crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected)) ); }); } app.post("/hooks/omax", express.raw({ type: "application/json" }), (req, res) => { const rawBody = req.body.toString("utf8"); if (!verify(rawBody, req.headers)) return res.sendStatus(401); const event = JSON.parse(rawBody); res.sendStatus(200); // answer first, then process handleEvent(req.get("svix-id"), event); }); ``` ```php 300) { return false; } $key = base64_decode(preg_replace('/^whsec_/', '', $secret)); $expected = base64_encode(hash_hmac('sha256', "{$id}.{$timestamp}.{$rawBody}", $key, true)); foreach (explode(' ', $signatures) as $entry) { [$version, $signature] = array_pad(explode(',', $entry, 2), 2, ''); if ($version === 'v1' && hash_equals($expected, $signature)) { return true; } } return false; } if (! omax_verify($secret, $id, $timestamp, $signatures, $rawBody)) { http_response_code(401); exit; } $event = json_decode($rawBody, true); http_response_code(200); // process $event['type'] ... ``` ```python # Python (Flask) import base64, hashlib, hmac, os, time from flask import Flask, request, abort app = Flask(__name__) SECRET = os.environ["OMAX_WEBHOOK_SECRET"] # whsec_... def verify(raw_body: bytes, headers) -> bool: msg_id = headers.get("svix-id", "") timestamp = headers.get("svix-timestamp", "") signatures = headers.get("svix-signature", "") if not msg_id or not timestamp or not signatures: return False if abs(time.time() - int(timestamp)) > 300: return False key = base64.b64decode(SECRET.removeprefix("whsec_")) signed = f"{msg_id}.{timestamp}.".encode() + raw_body expected = base64.b64encode(hmac.new(key, signed, hashlib.sha256).digest()).decode() for entry in signatures.split(" "): version, _, signature = entry.partition(",") if version == "v1" and hmac.compare_digest(signature, expected): return True return False @app.post("/hooks/omax") def omax_webhook(): raw_body = request.get_data() if not verify(raw_body, request.headers): abort(401) event = request.get_json() # process event["type"] ... return "", 200 ``` ## Signing secret rotation Rotate the secret on the endpoint page with **Rotate signing secret** when it may have leaked, or on a regular schedule. - After rotating, the **previous secret stays valid for 24 hours**. During that time requests are signed so that both secrets verify, which is why `svix-signature` can contain more than one entry. - Update the secret in your configuration within those 24 hours. To switch without any failed check, let your code accept either the old or the new secret for a short time. ## Delivery log, testing and resend In the Console under **Webhooks**: - **Endpoint page**: success rate, response times, recent deliveries, **Edit**, **Disable** / **Enable**, **Rotate signing secret** and delete. - **Delivery log**: every message with its event type, payload and each attempt with the HTTP status your server answered. **View attempts** shows the details; **Resend** sends the message to the endpoint again with the same `svix-id`. - **Send test event**: an example payload of any event type, sent to one endpoint only. Test events are signed like real events. Disabling an endpoint stops deliveries to it until you enable it again. Deleting an endpoint stops deliveries and removes it. ## Event reference Each event below lists when it is sent, its fields and an example body. Values in the examples are illustrations. ### Schemas for your code Every event is also published as a JSON Schema in an OpenAPI 3.1 document, under `webhooks`: [/openapi/webhooks.json](/openapi/webhooks.json). The same events are listed with their schemas at the end of this page. - Every field listed for an event is always present (`required`); a field without a value is `null`. - Objects do not forbid extra properties, because new fields can be added later. - Use the document with an OpenAPI or JSON Schema code generator to create typed models for your language, or to validate payloads in your tests. ### Billing events The billing events are about your Console wallet and invoices. They carry the organization inside the object, not as `organization_sso_id` at the top level. #### `console.invoice.created` An invoice was created for your organization. Most invoices start as `pending`; an invoice created for a card top-up is already `paid` when it is created. #### `console.invoice.paid` An invoice was paid. Both invoice events send the `invoice` object: | Field | Type | Description | |-------|------|-------------| | `invoice.id` | string | Invoice ID | | `invoice.invoice_number` | string | Invoice number as shown on the PDF | | `invoice.status` | string | `pending` or `paid` | | `invoice.currency` | string | ISO currency code, for example `EUR` | | `invoice.total` | string | Total amount, decimal string | | `invoice.due_date` | string | Due date, as an ISO 8601 timestamp at midnight UTC | | `invoice.paid_at` | string \| null | When it was paid, ISO 8601; `null` while unpaid | | `invoice.organization_id` | string | Your organization ID | | `invoice.organization_sso_id` | string | Your organization identifier | ```json { "type": "console.invoice.paid", "invoice": { "id": "019a2f6e-3c41-7d2b-9e85-1f0a6b4c2d71", "invoice_number": "INV-2026-00042", "status": "paid", "currency": "EUR", "total": "149.9900", "due_date": "2026-11-15T00:00:00.000000Z", "paid_at": "2026-11-03T10:15:30+00:00", "organization_id": "019a2f6e-3c41-7d2b-9e85-1f0a6b4c2d72", "organization_sso_id": "your-organization" } } ``` #### `console.wallet.top_up` Money was added to your Console wallet by a top-up. Automatic top-ups (**Auto top-up**) do not send this event. | Field | Type | Description | |-------|------|-------------| | `wallet.currency` | string | Wallet currency | | `wallet.balance` | string | Wallet balance after the top-up | | `transaction.id` | string | Wallet transaction ID | | `transaction.amount` | string | Amount added | | `transaction.currency` | string | Currency of the amount | | `transaction.category` | string | `top_up` | | `transaction.description` | string \| null | Description of the transaction | | `transaction.balance_after` | string | Balance right after this transaction | | `transaction.created_at` | string | When the transaction was recorded, ISO 8601 | | `organization.id` | string | Your organization ID | | `organization.sso_id` | string | Your organization identifier | | `organization.name` | string | Your organization name | ```json { "type": "console.wallet.top_up", "wallet": { "currency": "EUR", "balance": "250.0000" }, "transaction": { "id": "019a2f6e-3c41-7d2b-9e85-1f0a6b4c2d73", "amount": "100.0000", "currency": "EUR", "category": "top_up", "description": "Wallet top-up", "balance_after": "250.0000", "created_at": "2026-11-03T10:15:30+00:00" }, "organization": { "id": "019a2f6e-3c41-7d2b-9e85-1f0a6b4c2d72", "sso_id": "your-organization", "name": "Example Ltd" } } ``` #### `console.wallet.low_balance` Your Console wallet balance fell to or below the threshold of your **Balance alert** (Console → **Billing** → **Balance alerts**). It is sent only while the alert is turned on, when a change of balance leaves the wallet at or below the threshold, and at most once every 24 hours while the balance stays low. | Field | Type | Description | |-------|------|-------------| | `wallet.currency` | string | Wallet currency | | `wallet.balance` | string | Current balance | | `wallet.threshold` | string | Your alert threshold | | `organization.id` | string | Your organization ID | | `organization.sso_id` | string | Your organization identifier | | `organization.name` | string | Your organization name | ```json { "type": "console.wallet.low_balance", "wallet": { "currency": "EUR", "balance": "12.5000", "threshold": "25.0000" }, "organization": { "id": "019a2f6e-3c41-7d2b-9e85-1f0a6b4c2d72", "sso_id": "your-organization", "name": "Example Ltd" } } ``` ### SMS events Events of the [SMS API](/sms-api) and [OTP API](/otp-api). #### Message status: `sms.message.sent`, `sms.message.delivered`, `sms.message.failed`, `sms.message.expired` | Event | Sent when | |-------|-----------| | `sms.message.sent` | The message was handed to the operator | | `sms.message.delivered` | The operator confirmed delivery to the handset | | `sms.message.failed` | The message could not be delivered | | `sms.message.expired` | No delivery report arrived in time | Status events are sent for messages you send through the SMS API, each status once per message. Messages you submit directly over SMPP do not send webhooks; their delivery receipts arrive over your SMPP session. In test mode the events are sent too, with `is_test: true`. | Field | Type | Description | |-------|------|-------------| | `sms.id` | string | The message `id` you got when you sent it | | `sms.server_message_id` | string | Our internal message ID; quote it to support | | `sms.status` | string | `sent`, `delivered`, `failed` or `expired`, matching the event | | `sms.from` | string \| null | Sender ID | | `sms.to` | string | Recipient number, international format without `+` (digits only) | | `sms.segments` | integer | Number of billed segments | | `sms.price.amount` | string | Price of the message | | `sms.price.currency` | string | Currency of the price | | `sms.reference` | string \| null | Your own reference, if you sent one | | `sms.error_code` | string \| null | Error code when the message failed | | `sms.is_test` | boolean | `true` for messages sent in test mode | | `sms.is_otp` | boolean | `true` for one-time code messages | | `sms.submitted_at` | string \| null | When the message was accepted | | `sms.sent_at` | string \| null | When it was handed to the operator | | `sms.delivered_at` | string \| null | When delivery was confirmed | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "sms.message.delivered", "sms": { "id": "0198c5f9-52b0-7b1e-8c3d-4e5f6a7b8c9d", "server_message_id": "0198c5f9-61d2-7a44-b1e0-9c8d7e6f5a4b", "status": "delivered", "from": "ACME", "to": "38761123456", "segments": 1, "price": { "amount": "0.045", "currency": "EUR" }, "reference": "order-1042", "error_code": null, "is_test": false, "is_otp": false, "submitted_at": "2026-11-03T08:00:00Z", "sent_at": "2026-11-03T08:00:01Z", "delivered_at": "2026-11-03T08:00:04Z" }, "organization_sso_id": "your-organization" } ``` > [!TIP] > The webhook tells you that a message changed. For its complete record in API terms, read `GET /messages/{id}` with `sms.id`. #### Bulk batches: `sms.batch.completed`, `sms.batch.failed` | Event | Sent when | |-------|-----------| | `sms.batch.completed` | A bulk request finished: every message was handed over or rejected. Delivery is still reported per message | | `sms.batch.failed` | A bulk request stopped before it finished | | Field | Type | Description | |-------|------|-------------| | `batch.id` | string | Batch ID, as returned by `POST /messages/bulk` | | `batch.status` | string | `completed` or `failed` | | `batch.from` | string | Sender ID | | `batch.total` | integer | Number of recipients | | `batch.submitted` | integer | Messages handed over | | `batch.rejected` | integer | Messages rejected | | `batch.segments_per_message` | integer | Segments per message | | `batch.reference` | string \| null | Your own reference, if you sent one | | `batch.error` | string \| null | Why the batch stopped, for `sms.batch.failed` | | `batch.created_at` | string | When the batch was created | | `batch.completed_at` | string \| null | When it finished | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "sms.batch.completed", "batch": { "id": "0198c5fa-0a11-7c3e-9d2f-1e2d3c4b5a69", "status": "completed", "from": "ACME", "total": 2500, "submitted": 2497, "rejected": 3, "segments_per_message": 1, "reference": "promo-november", "error": null, "created_at": "2026-11-03T09:00:00Z", "completed_at": "2026-11-03T09:02:41Z" }, "organization_sso_id": "your-organization" } ``` #### Sender IDs: `sms.sender_id.approved`, `sms.sender_id.rejected` A sender ID request was approved or rejected. A sender ID that our team adds for you directly also sends `sms.sender_id.approved`. | Field | Type | Description | |-------|------|-------------| | `sender_id.id` | string | Sender ID request ID | | `sender_id.name` | string | The sender ID | | `sender_id.status` | string | `approved` or `rejected` | | `sender_id.use_case` | string \| null | The use case you gave | | `sender_id.note` | string \| null | Note from our review, for example the reason for a rejection | | `sender_id.moderated_at` | string | When it was reviewed | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "sms.sender_id.rejected", "sender_id": { "id": "0198c5fb-2b33-7e5f-8a1b-2c3d4e5f6a7b", "name": "ACME", "status": "rejected", "use_case": "Order notifications", "note": "Brand not verified", "moderated_at": "2026-11-03T11:20:00Z" }, "organization_sso_id": "your-organization" } ``` #### SMS balance: `sms.wallet.topped_up`, `sms.wallet.low_balance` | Event | Sent when | |-------|-----------| | `sms.wallet.topped_up` | Money was added to your SMS balance | | `sms.wallet.low_balance` | Your SMS balance fell below the low balance threshold. It is sent once; it is sent again only after the balance has gone back above the threshold and dropped below it again | `sms.wallet.topped_up`: | Field | Type | Description | |-------|------|-------------| | `wallet.operation_id` | string | ID of the credit | | `wallet.amount` | object | Amount added: `amount` (string) and `currency` | | `wallet.balance` | object \| null | SMS balance after the credit: `amount` (string) and `currency` | | `wallet.reference` | string \| null | Reference of the credit | | `wallet.completed_at` | string | When the credit completed | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "sms.wallet.topped_up", "wallet": { "operation_id": "0198c5fc-3c44-7a6b-9c2d-3e4f5a6b7c8d", "amount": { "amount": "25.5", "currency": "EUR" }, "balance": { "amount": "152.8", "currency": "EUR" }, "reference": "INV-7", "completed_at": "2026-11-03T12:00:00Z" }, "organization_sso_id": "your-organization" } ``` `sms.wallet.low_balance`: | Field | Type | Description | |-------|------|-------------| | `wallet.balance` | object | Current SMS balance: `amount` (string) and `currency` | | `wallet.threshold` | object | The threshold: `amount` (string) and `currency` | | `wallet.checked_at` | string | When the balance was checked | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "sms.wallet.low_balance", "wallet": { "balance": { "amount": "3.2", "currency": "EUR" }, "threshold": { "amount": "5", "currency": "EUR" }, "checked_at": "2026-11-03T12:05:00Z" }, "organization_sso_id": "your-organization" } ``` #### One-time codes: `sms.otp.verified`, `sms.otp.expired` | Event | Sent when | |-------|-----------| | `sms.otp.verified` | The user entered the right code (`POST /otp/verify` succeeded) | | `sms.otp.expired` | A code expired without being verified | | Field | Type | Description | |-------|------|-------------| | `otp.verification_id` | string | The `verification_id` from `POST /otp/send` | | `otp.status` | string | `verified` or `expired` | | `otp.to` | string | Phone number the code was sent to, digits only without `+` | | `otp.message_id` | string \| null | ID of the SMS that carried the code | | `otp.attempts` | integer | Number of verification attempts | | `otp.expires_at` | string | When the code expires or expired | | `otp.verified_at` | string \| null | When it was verified; `null` for `sms.otp.expired` | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "sms.otp.verified", "otp": { "verification_id": "0198c5fd-4d55-7b7c-8d3e-4f5a6b7c8d9e", "status": "verified", "to": "38761123456", "message_id": "0198c5fd-4d60-7c11-9a2b-5c6d7e8f9a0b", "attempts": 1, "expires_at": "2026-11-03T12:15:00Z", "verified_at": "2026-11-03T12:11:42Z" }, "organization_sso_id": "your-organization" } ``` ### Phone number events Events of the [Phone Numbers API](/phone-numbers-api). Events about one number (SMS, number, KYC of a number and porting) can be limited to chosen numbers: when you add or edit an endpoint with only phone number events selected, you can pick up to 10 numbers. Order events are not linked to a single number. The `phone_number` object used by the number events: | Field | Type | Description | |-------|------|-------------| | `id` | string | Phone number ID | | `e164` | string | The number in E.164 format | | `country_iso` | string | Country, ISO 3166-1 alpha-2 | | `number_type` | string | `local`, `mobile`, `toll_free` or `national` | | `status` | string | `pending_kyc`, `provisioning`, `active`, `suspended`, `releasing`, `released` or `failed` | | `kyc_status` | string \| null | `draft`, `pending`, `approved` or `rejected` | | `billing_period` | string \| null | `monthly`, `quarterly`, `six_monthly` or `annually` | | `next_billing_date` | string \| null | Next renewal date, `YYYY-MM-DD` | #### `phone_numbers.sms.received` An SMS arrived on one of your numbers. | Field | Type | Description | |-------|------|-------------| | `sms.id` | string | Inbound message ID | | `sms.direction` | string | `inbound` | | `sms.from` | string | Sender number | | `sms.to` | string | Your number | | `sms.body` | string | Message text | | `sms.segments` | integer | Number of segments | | `sms.phone_number_id` | string | ID of your number | | `sms.endpoint_id` | string \| null | SMS endpoint assigned to the number, if any | | `sms.received_at` | string | When it was received | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "phone_numbers.sms.received", "sms": { "id": "e5f6a7b8-c9d0-1234-efab-345678901234", "direction": "inbound", "from": "+447911123456", "to": "+442071234567", "body": "Hello", "segments": 1, "phone_number_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "endpoint_id": null, "received_at": "2026-11-03T09:00:00Z" }, "organization_sso_id": "your-organization" } ``` #### `phone_numbers.sms.sent`, `phone_numbers.sms.delivered`, `phone_numbers.sms.failed` An SMS you sent from your number (`POST /sms/messages`) was sent, delivered, or not delivered. `phone_numbers.sms.failed` covers both `failed` and `undelivered`. | Field | Type | Description | |-------|------|-------------| | `sms.id` | string | Message ID | | `sms.direction` | string | `outbound` | | `sms.status` | string | `sent`, `delivered`, `failed` or `undelivered` | | `sms.from` | string | Your number | | `sms.to` | string | Recipient number | | `sms.segments` | integer | Number of segments | | `sms.client_reference` | string \| null | Your `client_reference`, if you sent one | | `sms.phone_number_id` | string | ID of your number | | `sms.error_message` | string \| null | Why it failed | | `sms.sent_at` | string \| null | When it was sent | | `sms.delivered_at` | string \| null | When delivery was confirmed | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "phone_numbers.sms.delivered", "sms": { "id": "f6a7b8c9-d0e1-2345-fabc-456789012345", "direction": "outbound", "status": "delivered", "from": "+442071234567", "to": "+447911123456", "segments": 1, "client_reference": "order-991", "phone_number_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "error_message": null, "sent_at": "2026-11-03T09:05:00Z", "delivered_at": "2026-11-03T09:05:03Z" }, "organization_sso_id": "your-organization" } ``` #### `phone_numbers.number.purchased` A number was added to your account: bought, ported in, or assigned to you. Sends the `phone_number` object plus `order_id` (the order that bought it; `null` for ported and assigned numbers). See the example in [Body](#description/body). #### `phone_numbers.number.released` A number was released from your account, or ported out. Sends the `phone_number` object. #### `phone_numbers.number.renewed` A number's recurring fee was charged. Sends the `phone_number` object plus `renewed_for`, the billing date that was paid (`YYYY-MM-DD`). #### `phone_numbers.number.renewal_failed` A number's recurring fee could not be charged. Top up your wallet to keep the number. Sends the `phone_number` object plus `renewal_due` (the billing date, `YYYY-MM-DD`) and `reason`, a short text explaining why the charge failed. ```json { "type": "phone_numbers.number.renewal_failed", "phone_number": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "e164": "+442071234567", "country_iso": "GB", "number_type": "local", "status": "active", "kyc_status": "approved", "billing_period": "monthly", "next_billing_date": "2026-12-01", "renewal_due": "2026-12-01", "reason": "Insufficient wallet balance." }, "organization_sso_id": "your-organization" } ``` #### `phone_numbers.order.completed`, `phone_numbers.order.partially_completed`, `phone_numbers.order.failed` A number order (single or bulk) finished. `partially_completed` means only some of the requested numbers could be bought. | Field | Type | Description | |-------|------|-------------| | `order.id` | string | Order ID | | `order.type` | string | `single` or `bulk` | | `order.status` | string | `completed`, `partially_completed` or `failed` | | `order.country_iso` | string \| null | Country of the order | | `order.number_type` | string \| null | Number type | | `order.billing_period` | string \| null | Billing period | | `order.quantity_requested` | integer | Numbers requested | | `order.quantity_fulfilled` | integer | Numbers bought | | `order.phone_number_ids` | array of strings | IDs of the numbers bought | | `order.total` | object | Amount charged: `amount` (string), `amount_minor` (integer, in cents) and `currency` | | `order.failure` | object \| null | `code` and `message` when the order failed | | `order.completed_at` | string \| null | When the order finished | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "phone_numbers.order.completed", "order": { "id": "0198c5f9-52b0-7b1e-8c3d-4e5f6a7b8c9d", "type": "single", "status": "completed", "country_iso": "GB", "number_type": "local", "billing_period": "monthly", "quantity_requested": 1, "quantity_fulfilled": 1, "phone_number_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"], "total": { "amount": "2.50", "amount_minor": 250, "currency": "EUR" }, "failure": null, "completed_at": "2026-11-03T08:30:00Z" }, "organization_sso_id": "your-organization" } ``` #### `phone_numbers.kyc.approved`, `phone_numbers.kyc.rejected` A KYC submission was reviewed, either for your organization or for one number. | Field | Type | Description | |-------|------|-------------| | `kyc.submission_id` | string | Submission ID | | `kyc.scope` | string | `organization` or `phone_number` | | `kyc.status` | string | `approved` or `rejected` | | `kyc.phone_number_id` | string \| null | The number, for `scope: phone_number` | | `kyc.e164` | string \| null | The number in E.164, for `scope: phone_number` | | `kyc.rejection_reason` | string \| null | Why it was rejected | | `kyc.reviewed_at` | string \| null | When it was reviewed | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "phone_numbers.kyc.rejected", "kyc": { "submission_id": "0198c5fe-5e66-7c8d-9e4f-5a6b7c8d9e0f", "scope": "phone_number", "status": "rejected", "phone_number_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "e164": "+442071234567", "rejection_reason": "The proof of address is older than 3 months.", "reviewed_at": "2026-11-03T14:00:00Z" }, "organization_sso_id": "your-organization" } ``` #### `phone_numbers.port.updated` A port-in or port-out request reached a new status. The porting code (PAC) itself is never sent in a webhook; read it from the API while it is valid. | Field | Type | Description | |-------|------|-------------| | `port.id` | string | Port request ID | | `port.direction` | string | `in` or `out` | | `port.e164` | string | The number being ported | | `port.status` | string | `in_progress`, `code_ready`, `code_expired`, `completed`, `failed` or `cancelled` | | `port.phone_number_id` | string \| null | ID of the number, when it is on your account | | `port.requested_port_date` | string \| null | Requested port date, `YYYY-MM-DD` | | `port.code_ready` | boolean | `true` while a porting code is ready to read from the API | | `port.code_expires_at` | string \| null | When the porting code expires | | `port.failure_message` | string \| null | Why the port failed | | `port.completed_at` | string \| null | When the port completed | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "phone_numbers.port.updated", "port": { "id": "0198c5ff-6f77-7d9e-8f5a-6b7c8d9e0f1a", "direction": "out", "e164": "+447700123456", "status": "code_ready", "phone_number_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "requested_port_date": null, "code_ready": true, "code_expires_at": "2026-12-03T00:00:00Z", "failure_message": null, "completed_at": null }, "organization_sso_id": "your-organization" } ``` ### Bappy events Events of the [Bappy API](/bundle-sim). A **package** in these events is one plan activation on a Link; `package.id` is the activation ID. The `link` object used by the link events: | Field | Type | Description | |-------|------|-------------| | `id` | string | Link UUID | | `name` | string \| null | Link name | | `iccid` | string \| null | ICCID of the card | | `msisdn` | string \| null | Phone number of the card, when it has one | | `status` | string | `active`, `suspended`, `inactive` or `deactivated` | | `status_reason` | string \| null | When suspended: `manual` or `inactivity`; otherwise `null` | | `suspended_at` | string \| null | When suspended; otherwise `null` | | `metadata` | object \| null | The metadata you stored on the Link | | `first_activated_at` | string \| null | When the Link was first activated | | `deactivated_at` | string \| null | When the Link was deactivated | #### `bappy.link.created` A Link was created. Sends the `link` object. #### `bappy.link.status_changed` A Link's status changed. Sends the `link` object plus `previous_status`. ```json { "type": "bappy.link.status_changed", "link": { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Trip to Italy", "iccid": "8901010000000000001", "msisdn": null, "status": "suspended", "status_reason": "inactivity", "suspended_at": "2026-11-03T06:00:00Z", "metadata": { "customer_id": "c-1042" }, "first_activated_at": "2026-09-01T10:00:00Z", "deactivated_at": null, "previous_status": "active" }, "organization_sso_id": "your-organization" } ``` #### `bappy.package.activated`, `bappy.package.topped_up`, `bappy.package.expired` | Event | Sent when | |-------|-----------| | `bappy.package.activated` | The first plan on a Link became active | | `bappy.package.topped_up` | Another plan became active on a Link that already had one | | `bappy.package.expired` | A plan expired | | Field | Type | Description | |-------|------|-------------| | `package.id` | string | Activation ID | | `package.link_id` | string | Link UUID | | `package.iccid` | string \| null | ICCID of the card | | `package.plan_id` | string \| null | Plan ID | | `package.plan_name` | string \| null | Plan name | | `package.status` | string | `active` or `expired` | | `package.activated_at` | string \| null | When the plan was activated | | `package.expires_at` | string \| null | When the plan expires | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "bappy.package.activated", "package": { "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "link_id": "550e8400-e29b-41d4-a716-446655440000", "iccid": "8901010000000000001", "plan_id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301", "plan_name": "Europe 1GB", "status": "active", "activated_at": "2026-11-03T10:00:00Z", "expires_at": "2026-12-03T10:00:00Z" }, "organization_sso_id": "your-organization" } ``` #### `bappy.package.activation_failed` A plan could not be activated on a new Link, or could not be added to an existing Link. `package.id` is always `null` because no activation was created. | Field | Type | Description | |-------|------|-------------| | `package.id` | null | Always `null` | | `package.type` | string | `activation` (new Link) or `topup` (plan added to an existing Link) | | `package.link_id` | string | Link UUID | | `package.iccid` | string \| null | ICCID of the card, when known | | `package.plan_id` | string \| null | Plan ID | | `package.plan_name` | string \| null | Plan name | | `package.reason` | string | Why it failed | | `package.failed_at` | string | When it failed | | `organization_sso_id` | string | Your organization identifier | #### `bappy.usage.threshold_reached`, `bappy.usage.depleted` Data use of an active plan crossed 50% or 80% (`threshold_reached`), or the data is used up (`depleted`, 100%). Each threshold is sent once per plan. When several thresholds are crossed at once, only the highest one is sent. | Field | Type | Description | |-------|------|-------------| | `usage.package_id` | string | Activation ID | | `usage.link_id` | string | Link UUID | | `usage.iccid` | string \| null | ICCID of the card | | `usage.threshold_percent` | integer | `50`, `80` or `100` | | `usage.used_percent` | number | Share of data used, up to `100` | | `usage.used_mb` | number | Data used, in MB | | `usage.total_mb` | number | Data included in the plan, in MB | | `usage.remaining_mb` | number | Data left, in MB | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "bappy.usage.threshold_reached", "usage": { "package_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "link_id": "550e8400-e29b-41d4-a716-446655440000", "iccid": "8901010000000000001", "threshold_percent": 80, "used_percent": 81.25, "used_mb": 832, "total_mb": 1024, "remaining_mb": 192 }, "organization_sso_id": "your-organization" } ``` #### `bappy.network.attached`, `bappy.network.changed` A Link connected to a mobile network for the first time (`attached`), or moved to another country or operator (`changed`). | Field | Type | Description | |-------|------|-------------| | `network.link_id` | string | Link UUID | | `network.iccid` | string \| null | ICCID of the card | | `network.country_iso2` | string | Country, ISO 3166-1 alpha-2 | | `network.country_name` | string \| null | Country name | | `network.operator_name` | string \| null | Operator name | | `network.operator_mcc` | string \| null | Operator MCC | | `network.operator_mnc` | string \| null | Operator MNC | | `network.network_type` | string \| null | Network type | | `network.seen_at` | string \| null | When the network was seen | | `network.previous` | object | Only in `bappy.network.changed`: the previous `country_iso2`, `country_name`, `operator_name`, `operator_mcc` and `operator_mnc` | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "bappy.network.changed", "network": { "link_id": "550e8400-e29b-41d4-a716-446655440000", "iccid": "8901010000000000001", "country_iso2": "IT", "country_name": "Italy", "operator_name": "Example Mobile IT", "operator_mcc": "222", "operator_mnc": "01", "network_type": "LTE", "seen_at": "2026-11-03T15:42:00Z", "previous": { "country_iso2": "AT", "country_name": "Austria", "operator_name": "Example Mobile AT", "operator_mcc": "232", "operator_mnc": "01" } }, "organization_sso_id": "your-organization" } ``` #### `bappy.sms.sent`, `bappy.sms.delivered`, `bappy.sms.failed` An SMS you sent to a Link was sent, delivered, or not delivered. `bappy.sms.failed` covers the statuses `failed`, `undelivered`, `expired` and `rejected`. | Field | Type | Description | |-------|------|-------------| | `sms.id` | string | SMS ID | | `sms.link_id` | string \| null | Link UUID | | `sms.iccid` | string \| null | ICCID of the card | | `sms.status` | string | `sent`, `delivered`, `failed`, `undelivered`, `expired` or `rejected` | | `sms.message` | string | Message text | | `sms.provider_status_code` | string \| null | Status code reported by the network | | `sms.provider_status_description` | string \| null | Status description reported by the network | | `sms.created_at` | string | When the SMS was created | | `sms.updated_at` | string | When the status last changed | | `organization_sso_id` | string | Your organization identifier | ```json { "type": "bappy.sms.delivered", "sms": { "id": "9b2d1f3e-4c5a-4b6d-8e7f-0a1b2c3d4e5f", "link_id": "550e8400-e29b-41d4-a716-446655440000", "iccid": "8901010000000000001", "status": "delivered", "message": "Welcome! Your data plan is active.", "provider_status_code": null, "provider_status_description": null, "created_at": "2026-11-03T10:01:00Z", "updated_at": "2026-11-03T10:01:05Z" }, "organization_sso_id": "your-organization" } ``` ### Whitelabel events Events of your Whitelabel store. Each also carries `test` at the top level: `true` for a store in demo mode or a payment through a sandbox gateway. A wallet top-up is reported as a `customer_wallet` event, not as an order. Whitelabel eSIMs are also Links of your account, so the same change can arrive as a `bappy.*` event too. `activation_id` is the `package.id` of the Bappy events. eSIM activation, usage and expiry are checked every 30 minutes, for eSIMs your store sold. #### Orders: `whitelabel.order.created`, `whitelabel.order.completed`, `whitelabel.order.fulfillment_failed`, `whitelabel.order.payment_failed`, `whitelabel.order.refunded` | Event | When it is sent | |-------|-----------------| | `whitelabel.order.created` | A customer started a purchase in your store. It is not paid yet. | | `whitelabel.order.completed` | An order is paid and the eSIM is delivered or topped up. | | `whitelabel.order.fulfillment_failed` | A customer paid, but the eSIM could not be delivered after all attempts. `order.completed` follows if it is delivered later. | | `whitelabel.order.payment_failed` | The payment of an order failed or was not made in time. | | `whitelabel.order.refunded` | An order was refunded. The delivered eSIM stays active. | The `order` object: | Field | Type | Description | |-------|------|-------------| | `id` | string | Order ID. | | `status` | string | Order status. One of `pending`, `completed`, `failed`, `refunded`. | | `kind` | string | `topup` adds a plan to an eSIM the customer already has. One of `new_esim`, `topup`. | | `plan_id` | string \| null | Plan ID. | | `link_id` | string \| null | Link UUID, once delivered (known from the start for a top-up). | | `iccid` | string \| null | ICCID, once delivered. | | `total` | string | Value of the order: amount, discount and wallet money. Decimal string. | | `amount` | string | Part paid by card or another gateway. Decimal string. | | `discount_amount` | string | Promo code discount. Decimal string. | | `wallet_amount` | string | Part paid from the customer's store wallet. Decimal string. | | `currency` | string | Currency of these amounts. | | `charged_amount` | string \| null | Amount charged when the customer paid in another currency; otherwise `null`. Decimal string. | | `charged_currency` | string \| null | Currency of `charged_amount`. | | `promo_code` | string \| null | Promo code used. | | `gateway` | string | Payment gateway; `store_credit` and `promo_free` involve no card. | | `gateway_mode` | string \| null | Mode of the gateway; `null` when none was involved. One of `live`, `sandbox`. | | `customer` | object | The customer. Name and email are `null` once deleted. | | `created_at` | string | When the order was created. | | `refunded_at` | string \| null | When it was refunded; otherwise `null`. | ```json { "type": "whitelabel.order.created", "order": { "id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a01", "status": "pending", "kind": "new_esim", "plan_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b33", "link_id": null, "iccid": null, "total": "12.00", "amount": "10.00", "discount_amount": "2.00", "wallet_amount": "0.00", "currency": "EUR", "charged_amount": null, "charged_currency": null, "promo_code": "WELCOME", "gateway": "stripe", "gateway_mode": "live", "customer": { "id": "1042", "name": "Ana Example", "email": "ana@example.com" }, "created_at": "2026-12-01T10:15:30Z", "refunded_at": null }, "organization_sso_id": "your-organization", "test": false } ``` #### Customers: `whitelabel.customer.created`, `whitelabel.customer.updated`, `whitelabel.customer.deleted` | Event | When it is sent | |-------|-----------------| | `whitelabel.customer.created` | A customer registered, or an account was created for them after a purchase. | | `whitelabel.customer.updated` | A customer's name, email or email verification changed. | | `whitelabel.customer.deleted` | A customer's account was deleted. Only the ID is sent. | The `customer` object: | Field | Type | Description | |-------|------|-------------| | `id` | string | Customer ID. | | `name` | string \| null | Name. | | `email` | string \| null | Email address. | | `email_verified` | boolean | Whether the email address is verified. | | `created_at` | string | When the account was created. | ```json { "type": "whitelabel.customer.created", "customer": { "id": "1042", "name": "Ana Example", "email": "ana@example.com", "email_verified": false, "created_at": "2026-12-01T10:15:30Z" }, "organization_sso_id": "your-organization", "test": false } ``` The `customer` object of `whitelabel.customer.deleted`: | Field | Type | Description | |-------|------|-------------| | `id` | string | Customer ID. | ```json { "type": "whitelabel.customer.deleted", "customer": { "id": "1042" }, "organization_sso_id": "your-organization", "test": false } ``` #### Customer wallets: `whitelabel.customer_wallet.topped_up`, `whitelabel.customer_wallet.balance_changed` | Event | When it is sent | |-------|-----------------| | `whitelabel.customer_wallet.topped_up` | A customer added money to their store wallet. | | `whitelabel.customer_wallet.balance_changed` | A customer's store wallet changed for another reason: a purchase, refund, cashback, bonus or adjustment. | The `transaction` object: | Field | Type | Description | |-------|------|-------------| | `id` | string | Transaction ID. | | `reason` | string | Why the balance changed. One of `referral_bonus`, `purchase_credit_used`, `manual_adjustment`, `expired`, `wallet_topup`, `affiliate_commission`, `cashback`, `refund`, `clawback`, `purchase_credit_released`. | | `amount` | string | Change of the balance; negative when money was taken. Decimal string. | | `balance_after` | string | Balance after this transaction. Decimal string. | | `currency` | string | Store currency. | | `order_id` | string \| null | Order it belongs to. | | `customer` | object \| null | The customer. Name and email are `null` once deleted. | | `created_at` | string | When it was recorded. | ```json { "type": "whitelabel.customer_wallet.topped_up", "transaction": { "id": "5012", "reason": "wallet_topup", "amount": "20.00", "balance_after": "20.50", "currency": "EUR", "order_id": null, "customer": { "id": "1042", "name": "Ana Example", "email": "ana@example.com" }, "created_at": "2026-12-01T10:15:30Z" }, "organization_sso_id": "your-organization", "test": false } ``` #### Earnings: `whitelabel.earning.created`, `whitelabel.earning.reversed` | Event | When it is sent | |-------|-----------------| | `whitelabel.earning.created` | An order paid through the shared payment gateway earned you money. | | `whitelabel.earning.reversed` | An earning was reversed because its order was refunded. | The `earning` object: | Field | Type | Description | |-------|------|-------------| | `id` | string | Earning ID. | | `order_id` | string \| null | Order ID. | | `status` | string | Earning status. | | `retail_amount` | string | Retail value of the order. Decimal string. | | `cost_amount` | string | Your cost of the plan. Decimal string. | | `fee_total` | string | Transaction fee. Decimal string. | | `net_earning` | string | Your earning. Decimal string. | | `currency` | string | Currency. | | `created_at` | string | When it was recorded. | ```json { "type": "whitelabel.earning.created", "earning": { "id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a03", "order_id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a01", "status": "pending", "retail_amount": "12.00", "cost_amount": "5.00", "fee_total": "0.60", "net_earning": "5.00", "currency": "EUR", "created_at": "2026-12-01T10:15:30Z" }, "organization_sso_id": "your-organization", "test": false } ``` #### Payouts: `whitelabel.payout.requested`, `whitelabel.payout.approved`, `whitelabel.payout.rejected`, `whitelabel.payout.processed` | Event | When it is sent | |-------|-----------------| | `whitelabel.payout.requested` | You requested a payout of your earnings. | | `whitelabel.payout.approved` | Your payout request was approved. | | `whitelabel.payout.rejected` | Your payout request was rejected. | | `whitelabel.payout.processed` | Your payout was made. | The `payout` object: | Field | Type | Description | |-------|------|-------------| | `id` | string | Payout ID. | | `status` | string | Payout status. One of `pending`, `approved`, `rejected`, `processed`. | | `amount` | string | Amount. Decimal string. | | `currency` | string | Currency. | | `destination` | string \| null | Where the money goes. One of `console_wallet`, `bank_account`. | | `requested_at` | string \| null | When it was requested. | | `reviewed_at` | string \| null | When it was reviewed. | | `processed_at` | string \| null | When it was paid. | ```json { "type": "whitelabel.payout.requested", "payout": { "id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a04", "status": "pending", "amount": "250.00", "currency": "EUR", "destination": "bank_account", "requested_at": "2026-12-01T10:15:30Z", "reviewed_at": null, "processed_at": null }, "organization_sso_id": "your-organization", "test": false } ``` #### Affiliates: `whitelabel.affiliate.status_changed`, `whitelabel.affiliate.commission_created`, `whitelabel.affiliate.commission_cancelled` | Event | When it is sent | |-------|-----------------| | `whitelabel.affiliate.status_changed` | An affiliate applied, or their status changed. | | `whitelabel.affiliate.commission_created` | An order earned an affiliate a commission. | | `whitelabel.affiliate.commission_cancelled` | A commission was cancelled because its order was refunded. | The `affiliate` object: | Field | Type | Description | |-------|------|-------------| | `id` | string | Affiliate ID. | | `code` | string \| null | Affiliate code. | | `name` | string \| null | Name. | | `email` | string \| null | Email address. | | `customer_id` | string \| null | Customer ID, when the affiliate is also a customer. | | `status` | string \| null | Status. One of `pending`, `active`, `suspended`, `rejected`. | | `previous_status` | string \| null | Previous status; `null` for a new application. One of `pending`, `active`, `suspended`, `rejected`. | ```json { "type": "whitelabel.affiliate.status_changed", "affiliate": { "id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a02", "code": "ANA10", "name": "Ana Example", "email": "ana@example.com", "customer_id": "1042", "status": "active", "previous_status": "pending" }, "organization_sso_id": "your-organization", "test": false } ``` The `commission` object of `whitelabel.affiliate.commission_created`: | Field | Type | Description | |-------|------|-------------| | `id` | string | Commission ID. | | `status` | string \| null | Commission status. One of `pending`, `approved`, `paid`, `cancelled`. | | `order_id` | string \| null | Order ID. | | `order_amount` | string | Value of the order. Decimal string. | | `commission_amount` | string | Commission. Decimal string. | | `currency` | string | Currency. | | `affiliate` | object \| null | The affiliate. | | `created_at` | string | When it was recorded. | ```json { "type": "whitelabel.affiliate.commission_created", "commission": { "id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a05", "status": "pending", "order_id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a01", "order_amount": "12.00", "commission_amount": "1.20", "currency": "EUR", "affiliate": { "id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a02", "code": "ANA10", "name": "Ana Example", "email": "ana@example.com", "customer_id": "1042" }, "created_at": "2026-12-01T10:15:30Z" }, "organization_sso_id": "your-organization", "test": false } ``` #### Store: `whitelabel.store.live`, `whitelabel.store.demo`, `whitelabel.store.suspended`, `whitelabel.store.reactivated` | Event | When it is sent | |-------|-----------------| | `whitelabel.store.live` | Your store left demo mode. | | `whitelabel.store.demo` | Your store went back to demo mode. | | `whitelabel.store.suspended` | Your store was suspended. | | `whitelabel.store.reactivated` | Your suspended store is active again. | The `store` object: | Field | Type | Description | |-------|------|-------------| | `name` | string | Store name. | | `slug` | string | Store slug. | | `status` | string | Store status. One of `active`, `suspended`. | | `live` | boolean | `false` in demo mode. | | `live_at` | string \| null | When it first went live. | ```json { "type": "whitelabel.store.live", "store": { "name": "Example Travel", "slug": "example-travel", "status": "active", "live": true, "live_at": "2026-12-01T10:15:30Z" }, "organization_sso_id": "your-organization", "test": false } ``` #### eSIMs: `whitelabel.esim.provisioned`, `whitelabel.esim.topped_up`, `whitelabel.esim.activated`, `whitelabel.esim.usage_threshold_reached`, `whitelabel.esim.usage_depleted`, `whitelabel.esim.expired` | Event | When it is sent | |-------|-----------------| | `whitelabel.esim.provisioned` | An eSIM was sold in your store, or through the Partner API with a `recipient`. | | `whitelabel.esim.topped_up` | Another plan was sold for an eSIM a customer already has. | | `whitelabel.esim.activated` | A plan on an eSIM sold by your store became active. Checked every 30 minutes. | | `whitelabel.esim.usage_threshold_reached` | Data use of a plan crossed 50% or 80%. Each threshold is sent once per plan; when several are crossed at once, only the highest is sent. Checked every 30 minutes. | | `whitelabel.esim.usage_depleted` | The data of a plan is used up (100%). Checked every 30 minutes. | | `whitelabel.esim.expired` | A plan expired. Checked every 30 minutes. | The `esim` object: | Field | Type | Description | |-------|------|-------------| | `link_id` | string | Link UUID. | | `iccid` | string \| null | ICCID. | | `plan_id` | string \| null | Plan ID. | | `activation_id` | string \| null | Plan activation ID, the `package.id` of Bappy events. | | `order_id` | string \| null | Order ID; `null` for a sale through the Partner API. | | `source` | string | Where it was sold. One of `storefront`, `api`. | | `customer` | object \| null | The customer. Name and email are `null` once deleted. | | `created_at` | string \| null | When it was sold. | ```json { "type": "whitelabel.esim.provisioned", "esim": { "link_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b11", "iccid": "8932042000001234567", "plan_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b33", "activation_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b22", "order_id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a01", "source": "storefront", "customer": { "id": "1042", "name": "Ana Example", "email": "ana@example.com" }, "created_at": "2026-12-01T10:15:30Z" }, "organization_sso_id": "your-organization", "test": false } ``` The `esim` object of `whitelabel.esim.activated`: | Field | Type | Description | |-------|------|-------------| | `link_id` | string | Link UUID. | | `iccid` | string \| null | ICCID. | | `plan_id` | string \| null | Plan ID. | | `plan_name` | string | Plan name. | | `activation_id` | string | Plan activation ID, the `package.id` of Bappy events. | | `order_id` | string \| null | Order of this plan, when known. | | `customer` | object \| null | The customer. Name and email are `null` once deleted. | | `activated_at` | string \| null | When the plan became active. | | `expires_at` | string \| null | When the plan expires. | ```json { "type": "whitelabel.esim.activated", "esim": { "link_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b11", "iccid": "8932042000001234567", "plan_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b33", "plan_name": "Europe 10 GB", "activation_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b22", "order_id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a01", "customer": { "id": "1042", "name": "Ana Example", "email": "ana@example.com" }, "activated_at": "2026-12-01T10:15:30Z", "expires_at": "2026-12-31T10:15:30Z" }, "organization_sso_id": "your-organization", "test": false } ``` The `esim` object of `whitelabel.esim.usage_threshold_reached`: | Field | Type | Description | |-------|------|-------------| | `link_id` | string | Link UUID. | | `iccid` | string \| null | ICCID. | | `plan_id` | string \| null | Plan ID. | | `plan_name` | string | Plan name. | | `activation_id` | string | Plan activation ID, the `package.id` of Bappy events. | | `order_id` | string \| null | Order of this plan, when known. | | `customer` | object \| null | The customer. Name and email are `null` once deleted. | | `activated_at` | string \| null | When the plan became active. | | `expires_at` | string \| null | When the plan expires. | | `threshold_percent` | integer | Threshold reached: 50, 80 or 100. | | `used_percent` | number | Data used, in percent. | | `used_mb` | number | Data used, in MB. | | `remaining_mb` | number | Data left, in MB. | | `total_mb` | number | Data included in the plan, in MB. | ```json { "type": "whitelabel.esim.usage_threshold_reached", "esim": { "link_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b11", "iccid": "8932042000001234567", "plan_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b33", "plan_name": "Europe 10 GB", "activation_id": "0199c2a4-2b20-7d6e-9a51-3c2b8f0e4b22", "order_id": "0199c2a4-5a10-7d6e-9a51-3c2b8f0e5a01", "customer": { "id": "1042", "name": "Ana Example", "email": "ana@example.com" }, "activated_at": "2026-12-01T10:15:30Z", "expires_at": "2026-12-31T10:15:30Z", "threshold_percent": 80, "used_percent": 81.25, "used_mb": 8320.5, "remaining_mb": 1919.5, "total_mb": 10240.0 }, "organization_sso_id": "your-organization", "test": false } ``` ## Going live checklist 1. Your endpoint is a public `https://` URL and answers `2xx` quickly. 2. Every request is verified: signature, and a timestamp within 5 minutes. 3. Your code works with the raw body for verification, then parses the JSON. 4. Duplicates are ignored using `svix-id`. 5. Your code does not depend on the order of events, and ignores fields and event types it does not know. 6. The signing secret is stored securely, and you know how to rotate it. 7. You sent a test event for each event type you use and checked the **Delivery log**. ## Troubleshooting | Problem | What to check | |---------|---------------| | The signature never matches | Use the raw body, not re-serialized JSON. Use the secret of this endpoint, without the `whsec_` prefix, Base64-decoded. Check that the header names are read correctly by your framework | | The signature stopped matching | The secret was rotated: update it. Check your server clock if the timestamp check fails | | No events arrive | The endpoint is enabled, the event type is selected, and for phone number events the number filter includes the number. Look for failed attempts in the **Delivery log** | | The same event arrives twice | Expected after a retry or a resend. De-duplicate on `svix-id` | | An event is missing | Find it in the **Delivery log** and use **Resend**. If it is not there, contact [support](mailto:support@omaxtelecom.com) with the time and the object ID | ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. ## Event schemas JSON Schema of every event, as OpenAPI 3.1 `webhooks`: https://developer.omaxtelecom.com/openapi/webhooks.json --- # Build with AI Let your AI assistant read these docs for you. Connect it to the **OmaxTelecom docs MCP server**, or hand it a page in Markdown, and it can look up endpoints, request bodies and error codes while it writes your integration. ## The docs MCP server ``` https://developer.omaxtelecom.com/mcp ``` A remote MCP server (Streamable HTTP) with read-only access to this documentation. It needs no sign-in and never calls the APIs or sees your credentials. | Tool | What it does | |------|--------------| | `list_apis` | Lists every OmaxTelecom API with its base URL and documentation | | `get_guide` | Returns the full guide of one API in Markdown | | `list_endpoints` | Lists the endpoints of one API | | `get_endpoint` | Returns one endpoint with its parameters, request body, responses and schemas | | `search_docs` | Searches all guides and endpoints | ## Connect your assistant ### Claude **Claude Code** — run this once in your terminal (or click **Connect MCP → Claude** in the sidebar of any API page to copy it): ```bash claude mcp add --transport http omaxtelecom-docs https://developer.omaxtelecom.com/mcp ``` **Claude desktop and claude.ai** — open **Settings → Connectors**, choose **Add custom connector**, and enter: | Field | Value | |-------|-------| | Name | `OmaxTelecom docs` | | Remote MCP server URL | `https://developer.omaxtelecom.com/mcp` | Leave the authentication settings empty — the server needs no sign-in. Then enable the connector in a chat from the tools menu. ### Cursor Click **Connect MCP → Cursor** in the sidebar of any API page, or add this to `~/.cursor/mcp.json`: ```json { "mcpServers": { "omaxtelecom-docs": { "url": "https://developer.omaxtelecom.com/mcp" } } } ``` ### VS Code Click **Connect MCP → VS Code** in the sidebar of any API page, or add this to `.vscode/mcp.json`: ```json { "servers": { "omaxtelecom-docs": { "type": "http", "url": "https://developer.omaxtelecom.com/mcp" } } } ``` ### ChatGPT and other assistants Add `https://developer.omaxtelecom.com/mcp` as a custom connector (remote MCP server) in the app's settings. Any assistant that supports remote MCP servers over Streamable HTTP works the same way. ## Example prompts Once connected, ask in plain language: - *"Using the OmaxTelecom docs, write a Node.js function that gets an access token and sends an SMS. Reuse the token until it expires."* - *"Add OTP verification to my sign-up flow with the OmaxTelecom OTP API. Handle every `reason` that `/otp/verify` can return."* - *"Verify the signature of OmaxTelecom webhooks in my Express app."* - *"Which OmaxTelecom API tells me the carrier of a phone number? Show me the request and the response fields."* ## Without MCP - **Open in ChatGPT or Claude** — every API page has these links at the top. They open a new chat that already points to the page. - **Markdown pages** — add `.md` to any page URL, for example [`/sms-api.md`](/sms-api.md), and paste it into any assistant. - **llms.txt** — [`/llms.txt`](/llms.txt) lists every page; [`/llms-full.txt`](/llms-full.txt) is the whole documentation in one file. - **OpenAPI** — every API page has **Download OpenAPI Document**. Most assistants and code generators understand it directly. > [!WARNING] > Never paste your Client Secret or an access token into an AI chat. Let the generated code read them from environment variables. ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token. --- # FAQ Short answers to the questions we hear most. Every answer links to the page with the details. ## Getting started ### How do I get started with OmaxTelecom APIs? Follow [Getting started](/getting-started): copy your credentials from [OmaxTelecom Console](https://console.omaxtelecom.com), get an access token and make your first call. It takes a few minutes. ### Where can I find my API credentials? Sign in to [OmaxTelecom Console](https://console.omaxtelecom.com) and open the API settings. You need the **Client ID** and the **Client Secret**. ### What authentication do the APIs use? OAuth 2.0 client credentials. Exchange your Client ID and Client Secret for an access token at `POST https://api.omaxtelecom.com/auth/token`, then send it on every request: ``` Authorization: Bearer ``` The same token works for every OmaxTelecom API. [Getting started](/getting-started) has code samples in curl, Node.js and Python. ### An API answers 403 although my token is valid. Why? Each API has to be enabled for your organization. The error code tells you what is missing — for example `MCC_MNC_DISABLED`, `PHONE_VALIDATION_DISABLED` or `BILLING_NOT_CONFIGURED`. Contact [support@omaxtelecom.com](mailto:support@omaxtelecom.com) to enable it. ### Can I test without sending real traffic? The SMS API has a **test mode**: messages go through the whole API — charging, statuses and webhooks — but are simulated and never reach a phone. Support switches your account between test and live mode. You can also try any endpoint in this portal with **Test Request**; those are real requests to your account. ### What are the rate limits? The SMS API returns `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` on every response, and `Retry-After` with a `429`. For other APIs, contact support if you plan high volumes. ## SMS and OTP ### How do I send SMS messages? Get an access token, then call the [SMS API](/sms-api): - one message — `POST /messages` - one text to up to 10,000 numbers — `POST /messages/bulk` - a one-time code — `POST /otp/send` Sends require an `Idempotency-Key` header, so a retry never sends a message twice. ### How do I know whether a message was delivered? Every message has a status that follows the operator's delivery report: `queued`, `sent`, `delivered`, `undelivered`, `failed`, `rejected` or `expired`. Subscribe to [webhooks](/webhooks) to receive a signed event when a message is sent, delivered, failed or expired, or read `GET /messages/{id}`. ### Can I receive incoming SMS? Not with the SMS API — it sends messages and reports their delivery. To receive SMS, use a number from the [Phone Numbers API](/phone-numbers-api); inbound messages reach you by [webhook](/webhooks) (`phone_numbers.sms.received`) or by email. ### Which countries can I send SMS to? `GET /pricing` lists the destinations available to you and your price for each. Contact support if a destination you need is missing. ### How do one-time codes work? `POST /otp/send` creates a 6-digit code, sends it by SMS and returns a `verification_id`. `POST /otp/verify` checks the code the user typed. The code is valid for 5 minutes by default (`ttl_seconds` from 30 to 3600), works once and allows 5 attempts. Your own text goes in `template` and must contain `{code}`. Details are in the [OTP API guide](/otp-api). ## SIM and eSIM ### Bappy API or Telkor API — which one do I need? - **[Bappy API](/bundle-sim)** — you **sell** ready-made eSIM and SIM data plans to your customers. Each card is a Link; you create it with a plan and top it up. Billing and provisioning are handled for you. - **[Telkor API](/telkor)** — you **run** your own SIM inventory: you define coverages and plans yourself, manage links on your SIMs and run bulk jobs on thousands of SIMs. ### How do I activate a SIM? - **Bappy:** `POST /links` with a `plan_id`. You get the eSIM install details right away. - **Telkor:** `POST /links` for one SIM, or `POST /sims/bulk-provision` for many, optionally with `plan_ids`. ### Can I see how much data a SIM has used? Yes. In Bappy, `GET /links/{identifier}` shows live usage per plan. In Telkor, every link and activation has `usage`, and `GET /org/cost` shows the monthly usage and cost. ## Billing and account ### How do I check my balance? In [OmaxTelecom Console](https://console.omaxtelecom.com), or with the API you use: `GET /wallet` (SMS), `GET /organization/balance` (Bappy) or `GET /org/balance` (Telkor). ### How do I top up? In the billing section of [OmaxTelecom Console](https://console.omaxtelecom.com). Contact support if you need a different payment method. ## Errors and support ### What should I do when I get an error? 1. Read the error code in the response — branch on the code, not on the message. 2. Look the code up in the **Errors** section of the API's page. 3. On `401`, get a new access token and retry once. 4. If the problem continues, contact support. ### Which errors are common to all APIs? | Status | Meaning | |--------|---------| | `400` | The request is malformed | | `401` | The access token is missing, invalid or expired | | `402` | Your wallet balance is too low | | `403` | The API or the action is not enabled for your organization | | `404` | The resource does not exist | | `422` | A field is invalid — the response says which | | `429` | Too many requests — wait for `Retry-After` seconds | | `5xx` | A temporary problem on our side — retry later | ### Which programming languages can I use? Any language that can make HTTP requests. Every endpoint in this portal shows ready-to-copy code for curl, JavaScript, Python, PHP, Ruby and more. ## Need help? Email [support@omaxtelecom.com](mailto:support@omaxtelecom.com). Tell us which endpoint you called, when, and what the response was — including its `request_id` if it has one. Never send your Client Secret or access token.