---
title: "Generate new client key"
method: POST
path: "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateClientKey"
tags: ["Client key - merchant level"]
---

# Generate new client key

`POST /merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateClientKey`

Returns a new [client key](https://docs.adyen.com/development-resources/client-side-authentication#how-it-works) for the API credential identified in the path. You can use the new client key a few minutes after generating it. The old client key stops working 24 hours after generating a new one.

To make this request, your API credential must have the following [roles](https://docs.adyen.com/development-resources/api-credentials#api-permissions):
* Management API—API credentials read and write

## Path parameters

- `merchantId` string, required
- `apiCredentialId` string, required

## Response `200`

OK - the request has succeeded.

- GenerateClientKeyResponse
  - `clientKey` string, required — Generated client key

## Other responses

- `204` — No Content - the request has been successfully processed, but there is no additional content.
- `400` — Bad Request - a problem reading or understanding the request.
- `401` — Unauthorized - authentication required.
- `403` — Forbidden - insufficient permissions to process the request.
- `422` — Unprocessable Entity - a request validation error.
- `500` — Internal Server Error - the server could not process the request.

---

[API](https://skmtc.net/adyen/apis/management-api.md) · [All operations](https://skmtc.net/adyen/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/adyen/management-api/revisions/1089ade06e17/schema)
