Tagging 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 tag dozens, hundreds, or even thousands of devices? For this we recommend using our REST API. This option lets you programmatically tag devices.

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.

The first step to bulk tagging SIMs via the REST API is creating the tag. This can be done with the following endpoint:
POST https://dashboard.hologram.io/api/1/devices/tags?apikey=YOUR_APIKEY

Body: {"name":"YOUR_TAG_NAME"}

If this tag is for a custom organization make sure to add: &orgid=YOUR_ORG_ID  to the end of that endpoint.

This endpoint will return a success message with your tag's ID. Make sure to write this down as we will need it later.

If you already have a tag you wish to use you can look up its tag id with this endpoint:
GET https://dashboard.hologram.io/api/1/devices/tags?apikey=YOUR_API_KEY

Now that we have the tag ID we need to get the list of Device ID's for the devices we want to tag. This can be done by exporting your device list as a CSV. However, to be consistent, we will get this information via the REST API using this call:

GET https://dashboard.hologram.io/api/1/devices?apikey={YOUR_API_KEY}

Once we have the Device IDs of all the devices we want to tag we simply have to do the tagging which is done with the following call:
POST https://dashboard.hologram.io/api/1/devices/tags/{TAGID}/link/

Body: {"deviceids":[DEVICE_ID_1, DEVICE_ID_2, DEVICE_ID_N]}



Did this answer your question?