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.
Note: If you aren't familiar with APIs, we highly recommend checking out our introduction to Hologram's REST API guide as well as using Postman to make the API calls mentioned in this guide.
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.
Activating SIMs using the API
The first step to activating SIMs via the REST API is finding out the data plan ID 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 (ICCIDs) or a range of ICCIDs. 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: