> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hologram.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Tag SIMs using the REST API

> If you want to tag hundreds, or even thousands of devices, we recommend using our REST API for additional control over how your SIMs are named.

## 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](https://docs.hologram.io/api/1/). 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](https://docs.hologram.io/guides/rest-api/beginners-guide-to-the-hologram-rest-api.md) as well as using [Postman](https://www.getpostman.com/) to make the API calls mentioned in this guide.

> [!NOTE]
>
> **Note:** You can also make bulk SIM changes [in your dashboard](https://docs.hologram.io/dashboard/sim-actions/tag-sims.md).

**1. Create the tag and capture its ID**

```bash cURL theme={null}
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)**

```bash cURL theme={null}
curl --request GET \
  --url 'https://dashboard.hologram.io/api/1/devices/tags' \
  -u apikey:YOUR_HOLOGRAM_API_KEY
```

**3. Link devices to your tag**

```bash cURL theme={null}
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]
>
> **Note:** For tags scoped to a custom organization, include `orgid=YOUR_ORG_ID` where required.

***

title: "Tag multiple SIMs using the REST API"
description: "Create tags and link them to many devices using REST API endpoints."
----------------------------------------------------------------------------------

Programmatically tag large fleets using the REST API.

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

**1. Create a tag**

```http theme={null}
POST https://dashboard.hologram.io/api/1/devices/tags
```

Body:

```json theme={null}
{ "name": "YOUR_TAG_NAME" }
```

**2. List tags**

```http theme={null}
GET https://dashboard.hologram.io/api/1/devices/tags
```

**3. List devices**

```http theme={null}
GET https://dashboard.hologram.io/api/1/devices
```

**4. Link devices to a tag**

```http theme={null}
POST https://dashboard.hologram.io/api/1/devices/tags/{TAG_ID}/link
```

Body:

```json theme={null}
{ "deviceids": [DEVICE_ID_1, DEVICE_ID_2] }
```

## Related actions

> [card] [Dashboard bulk actions](https://docs.hologram.io/dashboard/sim-actions/tag-sims.md)
>
> Tag SIMs in bulk in your dashboard.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.