Activating SIMs via the Dashboard is a great option if you are only doing so for a handful of devices, but what if you want to activate dozens, hundreds, or even thousands of devices? For this we recommend using our REST API. This option lets you programmatically activate devices and also enter SIM ranges instead of individual SIM numbers.
All API requests require your API Key to be included in the header, which is detailed in the introduction guide. For brevity's sake, this guide does not include the header information.
The first step to activating SIMs via the REST API is finding out the plan number and zone for the plan you want to activate under. To check these parameters, you need to use the List Data Plans endpoint:
This will return a list of all the plans you have access to. From this you'll need the id field and the zones field which should be one of the following:
global, USA, usaall, 1, 2.
Next, we will activate our SIMs using the Activate SIMs endpoint:
You can pass a list of SIM numbers or a SIM range. SIM number lists are ideal for unordered SIMs, while SIM ranges are ideal for users who have purchased SIMs in the 100 pack option.
If you are planning on using a list of SIM numbers, your request should have the following body:
If you are planning on using a SIM range, your request should have the following body: