Welcome to the ONSIM API
https://api.onsimapp.com
Cease Account. WARNING:: Please use with caution this will irrevocably cease the SIM and Account - it can not be reversed
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
iccid
SIM ICCID
1
{
"iccid": "8944530000000012345"
}
Get account information, services and bundle
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
mpn
mpn of account you want to retrieve info for
1
Use this method to update the bundle associated to the Account use either BASE (no data) or UNLIMITED (data)
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
mpn
mpn of account you want to update
bundle
Bundle SKU
1
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.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
i_account
Your accounts/subscribers unique ID
mpn
Enter any of your SIM's numbers mobile or landline in e164 (i.e 44777...)
iccid
Your 19 digit SIM ID
refresh_code
If set to 1 will refresh the activation code if eSIM has not yet been installed
0
1
1
{
"mpn": "447777777777",
"refresh_code": 1
}
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
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
esim_code
eSIM Activation Code
1
{
"esim_code": "LPA:XXXXXX"
}
Update Mobile Settings for Account
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
mpn
mpn of account you are updating
mpn
Accounts new mpn
pbx_user
Accounts new SIP address/username
pbx_password
Accounts new SIP password
1
{
"pbx_user": "USER12345"
}
Update the SIM (perform a SIM Swap) used by an Account
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
mpn
Accounts mobile phone number
new_iccid
New ICCID for physical SIM or if set to eSIM it will switch to the next available eSIM.
1
{
"mpn": "447777777777",
"new_iccid": "eSIM"
}
Get a list of reseller numbers filtered by state
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
state
State of mpn - either 'ACTIVE' or 'RESERVED'
1
Deletes a number. NOTE: you can only delete numbers that are in a 'RESERVED' state (i.e not on an active account)
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
mpn
mpn to delete
1
Adds a number
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
mpn
mpn to add
1
Provison a new SIM.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
mpn
Number to be used as the accounts primary mobile number (used for SMS, iMessage, etc)
iccid
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.
1
{
"mpn": "447777777777"
}
Returns a list of existing Subscribers for the Reseller.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
state
Subscriber Status/State
1
{
"state": "PROVISIONED"
}
Delivers a SMS message to an ONSIM subscriber - please make sure you have enabled SMS Gateway for this subscriber.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
id
Your unique reference for the SMS Message
from
+e164 number of sender (i.e +44777...)
to
+e164 number of ONSIM Subscriber (i.e +44777...)
message
Body of SMS encoded in UTF-8
1
{
"id": "39edf9a4-7e2d-4126-af69-5246da735278",
"from": "+447777777777",
"to": "+447888888888",
"message": "Hello ONSIM Subscriber!"
}