---
title: "createKey"
method: POST
path: "/keys"
tags: ["SORACOM Endorse"]
---

# createKey

`POST /keys`

## Request

- Base URL: `https://krypton.soracom.io:8036/v1`
- URL: `https://krypton.soracom.io:8036/v1/keys`
- Auth: none declared

Create a new master key for a subscriber.

## Request body

- CreateKeyRequest
  - `auts` string
  - `imsi` string, required
  - `rand` string

## Response `200`

Successfully generated a newly created, unverified master key

- GenerateMasterKeyResponse
  - `autn` string, byte
  - `expiryTime` integer
  - `keyId` string
  - `rand` string, byte

## Other responses

- `401`: A challenge is issued for the client to verify the ownership of IMSI

---

[API](https://skmtc.dev/soracom/apis/soracom-krypton-api.md) - [All operations](https://skmtc.dev/soracom/apis/soracom-krypton-api/llms.txt) - [OpenAPI document](https://skmtc.dev/soracom/apis/soracom-krypton-api/revisions/63b222bba432?raw)
