How do I bulk activate SIMs using the REST API?

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. 

If you aren't familiar with APIs, we highly recommend checking out or 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.

 
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:

GET https://dashboard.hologram.io/api/1/plans

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.

plan_api.png

Next, we will activate our SIMs using the Activate SIMs endpoint: 

POST https://dashboard.hologram.io/api/1/links/cellular/bulkclaim 

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:

{
"sims":["SIM_NUMBER_1","SIM_NUMBER_2","SIM_NUMBER_N"],    
"plan": YOUR_PLAN_NUMBER,
"zone": "YOUR_PLAN'S_ZONE",
"orgid": YOUR_ORG_ID
}


If you are planning on using a SIM range, your request should have the following body:

{
"simrange": "FIRST_SIM_IN_RANGE-LAST_SIM_IN_RANGE",
"plan": YOUR_PLAN_NUMBER,
"zone": "YOUR_PLAN'S_ZONE",
"orgid": YOUR_ORG_ID
}
Was this article helpful?
0 out of 0 found this helpful