---
title: "AssociateDevice"
method: PUT
path: "/association/{deviceId}"
tags: ["IP Devices"]
---

# AssociateDevice

`PUT /association/{deviceId}`

Add a device to your nRF Cloud account. The association process is idempotent. You may therefore use this endpoint to update your device's `subType`. For more on the use of `subType` see the [OnboardDevices endpoint](#operation/OnboardDevices).
```sh
curl -X PUT $API_HOST/v1/association/$DEVICE_ID -d "$DEVICE_OWNERSHIP_CODE" -H "Authorization: Bearer $API_KEY" -H "Content-Type: text/plain"
```

## Path parameters

- `deviceId` string, required — This is the canonical device id used in the device certificate, and as the MQTT client id.

## Query parameters

- `subType` string — A custom string value to specify the type of thing (device) being provisioned on nRF Cloud.

## Request body

- string

## Response `202`

---

[API](https://skmtc.dev/nrfcloud/apis/nrf-cloud-rest-api.md) · [All operations](https://skmtc.dev/nrfcloud/apis/nrf-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nrfcloud/nrf-cloud-rest-api/revisions/c4e56e458ebf/schema)
