# Create an ephemeral key

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

## Request

```curl
curl https://api.stripe.com/v1/ephemeral_keys \
  -u "<<YOUR_SECRET_KEY>>" \
  -d customer=cus_NcCEBjJZgYGgljz
```

### Response

```json
{
  "id": "ephkey_1Mr6PhLkdIwHu7ix9Al0eucz",
  "object": "ephemeral_key",
  "associated_objects": [
    {
      "type": "customer",
      "id": "cus_NcCEBjJZgYGgljz"
    }
  ],
  "created": 1680226347,
  "expires": 1680229947,
  "livemode": false,
  "secret": "ek_test_YWNjdF8xTTJKVGtMa2RJd0h1N2l4LDJTWXVEUUY2c0hZTllRc0dGb2hVanBXRktQTlZoNHc_00TkfmS8Az"
}
```

## Returns

Returns the key object.

## Parameters

- `customer` (string, optional)
  The ID of the Customer you’d like to modify using the resulting ephemeral key.

- `issuing_card` (string, optional)
  The ID of the Issuing Card you’d like to access using the resulting ephemeral key.

- `nonce` (string, optional)
  A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information.

- `verification_session` (string, optional)
  The ID of the Identity VerificationSession you’d like to access using the resulting ephemeral key
