Create an API credential.
Creates an API credential for the company account identified in the path. In the request, you can specify which merchant accounts the new API credential will have access to, as well as its roles and allowed origins.
The response includes several types of authentication details:
- API key: used for API request authentication.
- Client key: public key used for client-side authentication.
- Username and password: used for basic authentication.
Make sure you store the API key securely in your system. You won't be able to retrieve it later.
If your API key is lost or compromised, you need to generate a new API key.
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 company account.
Request Body
application/json
List of allowed origins for the new API credential.
List of merchant accounts that the API credential has access to.
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 POST "https://example.com/companies/string/apiCredentials" \ -H "Content-Type: application/json" \ -d '{ "roles": [ "Checkout webservice role" ], "allowedOrigins": [ "https://www.mystore.com" ], "associatedMerchantAccounts": [ "YOUR_MERCHANT_ACCOUNT_AU", "YOUR_MERCHANT_ACCOUNT_EU", "YOUR_MERCHANT_ACCOUNT_US" ] }'Example response for adding an API credential.
{ "id": "YOUR_API_CREDENTIAL", "username": "YOUR_USERNAME", "clientKey": "YOUR_CLIENT_KEY", "allowedIpAddresses": [], "roles": [ "Checkout 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" }, "company": { "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT" }, "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" } }, "apiKey": "YOUR_API_KEY", "password": "YOUR_PASSWORD", "associatedMerchantAccounts": [ "YOUR_MERCHANT_ACCOUNT_AU", "YOUR_MERCHANT_ACCOUNT_EU", "YOUR_MERCHANT_ACCOUNT_US" ]}Get a list of API credentials GET
Returns the list of [API credentials](https://docs.adyen.com/development-resources/api-credentials) for the company account. The list is grouped into pages as defined by the query parameters. 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
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
