---
title: "Create Pre-shared Key for the Device"
method: POST
path: "/v1/integrate/devices/{deviceId}/psk"
tags: ["IoT Integrator"]
---

# Create Pre-shared Key for the Device

`POST /v1/integrate/devices/{deviceId}/psk`

## Request

- Base URL: `https://api.1nce.com/management-api`
- URL: `https://api.1nce.com/management-api/v1/integrate/devices/{deviceId}/psk`
- Auth: HTTP bearer

Post a new Custom Pre-Shared Key for a specific Device.

## Path parameters

- `deviceId` string, required

## Request body

- PostPreSharedKeyschema: Post a pre-shared key for a specific device.
  - `secretKey` string, required: Pre-shared secret key for a device.
  - `protocol` 'COAP' | 'LWM2M', required: Protocol PSK is applied for
  - `format` 'STRING' | 'HEX': The format in which the secret key was provided.

## Response `200`

OK

- PostPreSharedKeyResponseschema: Post pre-shared key response.
  - `deviceId` string, required: Identifier of the device.
  - `identity` string, required: Client identity of the pre-shared key.
  - `secretKey` string, required: Secret key of the pre-shared key.
  - `createdAt` string, date-time, required: Created timestamp of the pre-shared key.
  - `updatedAt` string, date-time, required: Updated timestamp of the pre-shared key.
  - `protocol` 'COAP' | 'LWM2M', required: Protocol PSK is applied for
  - `format` 'STRING' | 'HEX', required: The format in which the secret key was provided.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found Error
- `500`: Internal Server Error

---

[API](https://skmtc.dev/1nce/apis/1nce-os.md) - [All operations](https://skmtc.dev/1nce/apis/1nce-os/llms.txt) - [OpenAPI document](https://skmtc.dev/1nce/apis/1nce-os/revisions/f1aabbc6aeea?raw)
