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