ManagementAPI credentialsA P I credentials company level

Update an API credential.

PATCH
/companies/{companyId}/apiCredentials/{apiCredentialId}

Changes the API credential's roles, merchant account access, 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

Authorization

AuthorizationBasic <token>

In: header

Path Parameters

companyId*string

The unique identifier of the company account.

apiCredentialId*string

Unique identifier of the API credential.

Request Body

application/json

active?boolean

Indicates if the API credential is enabled.

allowedOrigins?array<string>

The new list of allowed origins for the API credential.

associatedMerchantAccounts?array<string>

List of merchant accounts that the API credential has access to.

description?string

Description of the API credential.

roles?array<string>

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/companies/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": [    "Management API - Accounts read",    "Management API - Webhooks read",    "Management API - API credentials read and write",    "Management API - Stores read",    "Management API — Payment methods read",    "Management API - Stores read and write",    "Management API - Webhooks read and write",    "Merchant Recurring role",    "Data Protection API",    "Management API - Payout Account Settings Read",    "Checkout webservice role",    "Management API - Accounts read and write",    "Merchant PAL Webservice role"  ],  "active": true,  "_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"    }  },  "associatedMerchantAccounts": []}