logo
Index
API Reference
Account - Cease Account
Account - Get Info
Account - Update Bundle
Account - Recording
Account - eSIM
Account - Generate QR
Account - Update Mobile Settings
Account - SIM Swap
Numbers - List all numbers
Numbers - Delete a number
Numbers - Add a number
Reseller - Provision Account (own UC)
Reseller - Provision Account (ONSIM UC)
Reseller - List Subscribers
SMS - Terminate SMS
Porting - List All
Porting - Lookup Port
Porting - Port Request
Porting - Get PAC
powered by zuplo

ONSIM API

Welcome to the ONSIM API

BASE URL
https://api.onsimapp.com

Account - Cease Account

Cease Account. WARNING:: Please use with caution this will irrevocably cease the SIM and Account - it can not be reversed

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

iccid

required, string

SIM ICCID

DELETE
/account
1
EXAMPLE BODY
{
  "iccid": "8944530000000012345"
}

Account - Get Info

Get account information, services and bundle

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

mpn

required

mpn of account you want to retrieve info for

GET
/account/:mpn
1

Account - Update Bundle

Use this method to update the bundle associated to the Account use either BASE (no data) or UNLIMITED (data)

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

mpn

required

mpn of account you want to update

bundle

required

Bundle SKU

POST
/account/:mpn/bundle/:bundle
1

Account - Recording

Enable or disable call and SMS recording for the specified account. ⚠️ Use with caution, especially for users in regulated industries. Disabling recording will immediately stop all data capture, and any unrecorded events cannot be recovered retroactively.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

mpn

required

mpn of account you want to update

Request Body

voice_recording

required, string enum, default: ON

Use a value of ON or OFF to enable or disable Voice Recording

Possible Enum Values

ON

OFF

sms_recording

required, string enum, default: ON

Use a value of ON or OFF to enable or disable SMS Recording

Possible Enum Values

ON

OFF

POST
/account/:mpn/recording
1
EXAMPLE BODY
{
  "voice_recording": "ON",
  "sms_recording": "ON"
}

Account - eSIM

Returns the eSIM activation code and status for the supplied i_account, MPN or ICCID. Additionally allows eSIM activation code to be refreshed if not currently installed. The eSIM activation code can be used to generate a QR code for installtion on an eSIM compatible device.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

i_account

optional, string, default:

Your accounts/subscribers unique ID

mpn

optional, string, default:

Enter any of your SIM's numbers mobile or landline in e164 (i.e 44777...)

iccid

optional, string, default:

Your 19 digit SIM ID

refresh_code

optional, integer enum, default: 0

If set to 1 will refresh the activation code if eSIM has not yet been installed

Possible Enum Values

01
POST
/account/esim
1
EXAMPLE BODY
{
  "mpn": "447777777777",
  "refresh_code": 1
}

Account - Generate QR

Pass a valid eSIM activation code in order to generate a QR Image. Note: Images are presigned S3 URLs with an expiry of 24 hours

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

esim_code

required, string

eSIM Activation Code

POST
/account/esim/generate
1
EXAMPLE BODY
{
  "esim_code": "LPA:XXXXXX"
}

Account - Update Mobile Settings

Update Mobile Settings for Account

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

mpn

required

mpn of account you are updating

Request Body

mpn

optional, string

Accounts new mpn

pbx_user

optional, string

Accounts new SIP address/username

pbx_password

optional, string

Accounts new SIP password

first_name

optional, string

Accounts new First Name

last_name

optional, string

Accounts new Last Name

email

optional, string

Accounts new Email Address

mobile_data

optional, string enum, default: ON

Use a value of ON or OFF to enable or disable Mobile Data

Possible Enum Values

ON

OFF

mobile_voice

optional, string enum, default: ON

Use a value of ON or OFF to enable or disable Mobile Voice

Possible Enum Values

ON

OFF

mobile_sms

optional, string enum, default: ON

Use a value of ON or OFF to enable or disable Mobile SMS

Possible Enum Values

ON

OFF

mobile_hotspot

optional, string enum, default: OFF

Use a value of ON or OFF to enable or disable Mobile Hotspot/Tethering of mobile data

Possible Enum Values

ON

OFF

POST
/account/pbxinfo/:mpn
1
EXAMPLE BODY
{}

Account - SIM Swap

Update the SIM (perform a SIM Swap) used by an Account

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

mpn

required, string

Accounts mobile phone number

new_iccid

required, string

New ICCID for physical SIM or if set to eSIM it will switch to the next available eSIM.

POST
/account/sim-swap
1
EXAMPLE BODY
{
  "mpn": "447777777777",
  "new_iccid": "eSIM"
}

Numbers - List all numbers

Get a list of reseller numbers filtered by state

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

state

required

State of mpn - either 'ACTIVE' or 'RESERVED'

GET
/numbers/:state
1

Numbers - Delete a number

Deletes a number. NOTE: you can only delete numbers that are in a 'RESERVED' state (i.e not on an active account)

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

mpn

required

mpn to delete

DELETE
/numbers/:mpn
1

Numbers - Add a number

Adds a number

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

mpn

required

mpn to add

POST
/numbers/:mpn
1

Reseller - Provision Account (own UC)

Provison a new SIM when using your own PBX.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

mpn

required, string

Number to be used as the accounts primary mobile number (used for SMS, iMessage, etc)

iccid

optional, string

19 digit ICCID of physcial SIM (remove the final digit from printed version). If ICCID is not supplied the next available eSIM will be used.

pbx_user

optional, string

Accounts SIP address/username - if not included in request it will default to 'ONSIM[ICCID]'

pbx_password

optional, string

Accounts new SIP password - if not included in request we will create one and return this in the response

POST
/reseller/provision
1
EXAMPLE BODY
{
  "mpn": "447777777777",
  "iccid": "8944530000000012345",
  "pbx_user": "USER12345",
  "pbx_password": "1a2B3c4D"
}

Reseller - Provision Account (ONSIM UC)

Provison a new account and SIM on ONSIM.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

mpn

required, string

Number to be used as the accounts primary mobile number (used for SMS, iMessage, etc)

iccid

optional, string

19 digit ICCID of physcial SIM (remove the final digit from printed version). If ICCID is not supplied the next available eSIM will be used.

group_name

required, string

Customer Group ID

home_location

required, string enum

Home Location of USER (GBR, USA, etc)

Possible Enum Values

GBR

USA

first_name

required, string

Accounts First Name

last_name

required, string

Accounts Last Name

email

required, string

Accounts Email Address

product

required, number

ID of the product to provision

mobile_data

required, string enum

Data Bundle to be applied to the subscriber

Possible Enum Values

BACKGROUND-ONLY

2GB

4GB

10GB

20GB

UNLIMITED

POST
/reseller/provision-onsim
1
EXAMPLE BODY
{
  "mpn": "447777777777",
  "iccid": "8944530000000012345",
  "group_name": "CUSTOMER_A",
  "home_location": "USA",
  "first_name": "John",
  "last_name": "Smith",
  "email": "j.smith@example.com",
  "product": 18,
  "mobile_data": "2GB"
}

Reseller - List Subscribers

Returns a list of existing Subscribers for the Reseller.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

state

required, string enum

Subscriber status/state. Must be 'PROVISIONED'.

Possible Enum Values

PROVISIONED

is_recorded

optional, boolean

Return the recording state of all subscribers

group

optional, string

Optionally filter by group

POST
/reseller/subscribers
1
EXAMPLE BODY
{
  "state": "PROVISIONED",
  "is_recorded": true,
  "group": "CUSTOMERA"
}

SMS - Terminate SMS

Delivers a SMS message to an ONSIM subscriber - please make sure you have enabled SMS Gateway for this subscriber.

Protected by API Key

Headers

Authorization

required, string

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Request Body

id

required, string, default:

Your unique reference for the SMS Message

from

required, string, default:

+e164 number of sender (i.e +44777...)

to

required, string, default:

+e164 number of ONSIM Subscriber (i.e +44777...)

message

required, string, default:

Body of SMS encoded in UTF-8

POST
/sms/terminate
1
EXAMPLE BODY
{
  "id": "39edf9a4-7e2d-4126-af69-5246da735278",
  "from": "+447777777777",
  "to": "+447888888888",
  "message": "Hello ONSIM Subscriber!"
}

Porting - List All

GET
/port/all
1

Porting - Lookup Port

GET
/port/:id
1

Porting - Port Request

POST
/port
1

Porting - Get PAC

POST
/port/pac
1