onesim eSIM API reference
onesim is an eSIM provider. Its partner API is a REST API for businesses that resell eSIMs under their own brand: your servers buy blank eSIMs, data packages and bundles from your partner balance, get each eSIM's activation code, follow its usage and receive signed webhooks.
Base URL: https://api.onesim.global/v1. Every request sends your key as
Authorization: Bearer osk_live_…. Keys are created in the partner platform and belong on
your servers only.
TypeScript SDK
npm install @onesim.global/sdk
import OnesimClient from '@onesim.global/sdk';
const onesim = new OnesimClient(); // reads ONESIM_API_KEY
const { data: packages } = await onesim.packages.list();
const order = await onesim.orders.createAndPoll(
{ type: 'bundle', package_id: packages[0].id },
{ idempotencyKey: booking.orderKey } // a UUID kept with the booking
);
Other languages call the API over HTTPS. The full reference needs JavaScript; the OpenAPI contract below holds all of it as JSON.
Links
- OpenAPI contract (JSON): every endpoint, field, error and webhook
- TypeScript SDK on npm
- Technology partners: how to get API access
- Agent skill for coding agents that integrate the API
- llms.txt: this API in brief, for AI assistants