Skip to main content

How to tag multiple SIMs using the REST API

If you want to tag hundreds, or even thousands of devices, we recommend using our REST API. This option lets you programmatically tag devices. Use the devices/tags endpoints to create a tag, list tag IDs, and link devices to a tag. 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.
Note: You can also make bulk SIM changes in your dashboard.
1

Create the tag and capture its ID

curl --request POST \
  --url 'https://dashboard.hologram.io/api/1/devices/tags' \
  -u apikey:YOUR_HOLOGRAM_API_KEY \
  --header 'Content-Type: application/json' \
  --data-raw '{"name":"YOUR_TAG_NAME"}'
2

Look up an existing tag ID (optional)

curl --request GET \
  --url 'https://dashboard.hologram.io/api/1/devices/tags' \
  -u apikey:YOUR_HOLOGRAM_API_KEY
3

Link devices to your tag

curl --request POST \
  --url 'https://dashboard.hologram.io/api/1/devices/tags/YOUR_TAG_ID/link/' \
  -u apikey:YOUR_HOLOGRAM_API_KEY \
  --header 'Content-Type: application/json' \
  --data-raw '{"deviceids":[YOUR_DEVICE_ID_1, YOUR_DEVICE_ID_2, YOUR_DEVICE_ID_N]}'
Note: For tags scoped to a custom organization, include orgid=YOUR_ORG_ID where required.

Programmatically tag large fleets using the REST API.

How do I use the REST API to tag SIMs in bulk?

1

Create a tag

POST https://dashboard.hologram.io/api/1/devices/tags
Body:
{ "name": "YOUR_TAG_NAME" }
2

List tags

GET https://dashboard.hologram.io/api/1/devices/tags
3

List devices

GET https://dashboard.hologram.io/api/1/devices
4

Link devices to a tag

POST https://dashboard.hologram.io/api/1/devices/tags/{TAG_ID}/link
Body:
{ "deviceids": [DEVICE_ID_1, DEVICE_ID_2] }

Dashboard bulk actions

Tag SIMs in bulk in your dashboard.