Update an API credential
Changes the API credential's roles, or allowed origins. The request has the new values for the fields you want to change. The response contains the full updated API credential, including the new values from the request.
To make this request, your API credential must have the following roles:
- Management API—API credentials read and write
In: header
Path Parameters
The unique identifier of the merchant account.
Unique identifier of the API credential.
Request Body
application/json
Indicates if the API credential is enabled.
The new list of allowed origins for the API credential.
Description of the API credential.
List of roles for the API credential. Only roles assigned to 'ws@Company.' can be assigned to other API credentials.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/merchants/string/apiCredentials/string" \ -H "Content-Type: application/json" \ -d '{ "active": true }'Example response for activating an API credential.
{ "id": "YOUR_API_CREDENTIAL", "username": "YOUR_USERNAME", "clientKey": "YOUR_CLIENT_KEY", "allowedIpAddresses": [], "roles": [ "Checkout webservice role", "Merchant PAL Webservice role" ], "active": true, "allowedOrigins": [ { "id": "YOUR_ALLOWED_ORIGIN", "domain": "https://www.mystore.com", "_links": { "self": { "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN" } } } ], "_links": { "self": { "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL" }, "allowedOrigins": { "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins" }, "generateApiKey": { "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateApiKey" }, "generateClientKey": { "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateClientKey" }, "merchant": { "href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT" } }}Get an API credential GET
Returns the [API credential](https://docs.adyen.com/development-resources/api-credentials) identified in the path. 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
Generate new API key POST
Returns a new API key for the API credential. You can use the new API key a few minutes after generating it. The old API 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
