---
title: "Create an ephemeral key"
method: POST
path: "/v1/ephemeral_keys"
---

# Create an ephemeral key

`POST /v1/ephemeral_keys`

Creates a short-lived API key for a given resource.

## Response `200`

Successful response.

- EphemeralKey
  - `created` integer, required — Time at which the object was created. Measured in seconds since the Unix epoch.
  - `expires` integer, required — Time at which the key will expire. Measured in seconds since the Unix epoch.
  - `id` string, required — Unique identifier for the object.
  - `livemode` boolean, required — If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
  - `object` 'ephemeral_key', required — String representing the object's type. Objects of the same type share the same value.
  - `secret` string — The key's secret. You can use this value to make authorized requests to the Stripe API.

## Other responses

- `default` — Error response.

---

[API](https://skmtc.net/stripe/apis/spec3.md) · [All operations](https://skmtc.net/stripe/apis/spec3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stripe/spec3/revisions/3653ad45bbec/schema)
