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
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.
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
voice_recording
Use a value of ON or OFF to enable or disable Voice Recording
ON
OFF
sms_recording
Use a value of ON or OFF to enable or disable SMS Recording
ON
OFF
1
{
"voice_recording": "ON",
"sms_recording": "ON"
}
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
first_name
Accounts new First Name
last_name
Accounts new Last Name
Accounts new Email Address
mobile_data
Use a value of ON or OFF to enable or disable Mobile Data
ON
OFF
mobile_voice
Use a value of ON or OFF to enable or disable Mobile Voice
ON
OFF
mobile_sms
Use a value of ON or OFF to enable or disable Mobile SMS
ON
OFF
mobile_hotspot
Use a value of ON or OFF to enable or disable Mobile Hotspot/Tethering of mobile data
ON
OFF
1
{
"mpn": "447777777777",
"pbx_password": "PA$$W0RD!",
"last_name": "Smith",
"mobile_sms": "ON"
}
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
Get a list of all reseller groups
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
1
Add a new Group/Customer
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
name
Group Name. ((Must be unique, length 3-45 charachters ('a-z' 'A-Z' '0-9' '_' '-'), MUST start with an alphanumeric character, MUST contain at least one Alphabetical character & No spaces or other characters))
address_line_1
Line 1 of customer address
address_line_2
Line 2 of customer address
city
Customer City
country
Customer Country
post_code
Customer Post Code
home_location
a list of three character country codes(ISO-3166) for which the Group's service is primarily homed, comma separated when more than one location : current values limited to "GBR" or "USA" or a list of the two
description
Description of the customer/group
1
{
"name": "ExampleCustomer",
"address_line_1": "Example Building",
"address_line_2": "18 Example Street",
"city": "Example City",
"country": "Example Country",
"post_code": "SW1A 0AA",
"home_location": "GBR",
"description": "Example Group for testing API"
}
Return a list of available bundles and product SKU's for provisioning ONSIM services
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
1
Provison a new SIM when using your own PBX.
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.
pbx_user
Accounts SIP address/username - if not included in request it will default to 'ONSIM[ICCID]'
pbx_password
Accounts new SIP password - if not included in request we will create one and return this in the response
1
{
"mpn": "447777777777"
}
Provison a new account and SIM on ONSIM.
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.
group_name
Customer Group ID
home_location
Home Location of USER (GBR, USA, etc)
GBR
USA
first_name
Accounts First Name
last_name
Accounts Last Name
Accounts Email Address
product
ID of the product to provision
mobile_data
Data Bundle to be applied to the subscriber
BACKGROUND-ONLY
2GB
4GB
10GB
20GB
UNLIMITED
1
{
"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"
}
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. Must be 'PROVISIONED'.
PROVISIONED
is_recorded
Return the recording state of all subscribers
group
Optionally filter by group
1
{
"state": "PROVISIONED",
"is_recorded": true,
"group": "CUSTOMERA"
}
Get a list of reseller sims filtered by state and Type
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 SIM - either 'ACTIVE' or 'RESERVED'
type
Type of SIM - either 'ALL', 'eSIM' or 'pSIM'
1
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!"
}
Returns a list of ports filter by status. Valid state types = [ALL, INITIAL, IN PROGRESS, FAILED, COMPLETE, CLOSED]
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 to filter results
1
Lookup the details of an ACTIVE Port with the supplied ID
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
ID of the port to query
1
Request PORT IN of UK MPN using a PAC obtained from another network. ⚠️ IMPORTANT:: The Number being replaced (the number currently in use on the target SIM) will be irrevocably removed from the system. If you need to keep both numbers please contact support.
Authorization
The Authorization
header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE
.
number
The Current MPN on the SIM which will be replaced by the number being ported in - this number will be irrevocably lost
PAC
PAC code from current provider
portinNumber
The MPN being ported in that will replace the number on the SIM
portinDate
The requested port in date - please note, this must be a minimum of 24 hours in the future, is not guaranteed and must be formatted YYYYMMDD. We would also strongly suggest not selecting weekend dates. Note: Ports can complete at any time on the day of porting.
1
{
"number": "447777777771",
"PAC": "ABC12345",
"portinNumber": "447777777772",
"portinDate": "20190129"
}
Request PAC Code to Export a UK Mobile Number from the ONSIM network. PAC's are valid for 30 days and must be supplied to your new network provider. ⚠️ IMPORTANT:: porting a number does not terminate a subscriber or your contractual obligations.
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 you wish to port and obtain a PAC Code
1