---
title: "Generate an Instant Key"
method: POST
path: "/user_identities/generate_instant_key"
tags: ["/user_identities"]
---

# Generate an Instant Key

`POST /user_identities/generate_instant_key`

Generates a new [instant key](/capability-guides/instant-keys) for a specified [user identity](/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).

## Request body

- object
  - `customization_profile_id` string, uuid
  - `max_use_count` number, float — Maximum number of times the instant key can be used. Default: 1.
  - `user_identity_id` string, uuid, required — ID of the user identity for which you want to generate an instant key.

## Response `200`

OK

- object
  - `instant_key` InstantKey, required — Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. See the [instant_key object](/api/instant_keys/object).
    - `client_session_id` string, uuid, required — ID of the client session associated with the Instant Key.
    - `created_at` string, date-time, required — Date and time at which the Instant Key was created.
    - `customization` object — Customization applied to the Instant Key UI.
      - `logo_url` string, uri — URL of the logo displayed on the Instant Key.
      - `primary_color` string — Primary color used in the Instant Key UI.
      - `secondary_color` string — Secondary color used in the Instant Key UI.
    - `customization_profile_id` string, uuid — ID of the customization profile associated with the Instant Key.
    - `expires_at` string, date-time, required — Date and time at which the Instant Key expires.
    - `instant_key_id` string, uuid, required — ID of the Instant Key.
    - `instant_key_url` string, uri, required — Shareable URL for the Instant Key. Use the URL to deliver the Instant Key to your user through a link in a text message or email or by embedding it in your web app.
    - `user_identity_id` string, uuid, required — ID of the user identity associated with the Instant Key.
    - `workspace_id` string, uuid, required — ID of the workspace that contains the Instant Key.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized

---

[API](https://skmtc.net/seam/apis/seam-connect.md) · [All operations](https://skmtc.net/seam/apis/seam-connect/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/seam/seam-connect/versions/00c35395ce12/schema)
