{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/adyen/main/json-schema/adyen-me-api-credential-schema.json",
  "title": "MeApiCredential",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adyen-me-api-openapi.yml#/components/schemas/MeApiCredential",
  "properties": {
    "_links": {
      "description": "References to resources linked to the API credential.",
      "$ref": "#/$defs/ApiCredentialLinks"
    },
    "active": {
      "description": "Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration.",
      "type": "boolean"
    },
    "allowedIpAddresses": {
      "description": "List of IP addresses from which your client can make requests.\n\nIf the list is empty, we allow requests from any IP.\nIf the list is not empty and we get a request from an IP which is not on the list, you get a security error.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "allowedOrigins": {
      "description": "List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.",
      "items": {
        "$ref": "#/$defs/AllowedOrigin"
      },
      "type": "array"
    },
    "associatedMerchantAccounts": {
      "description": "List of merchant accounts that the API credential has explicit access to. \n If the credential has access to a company, this implies access to all merchant accounts and no merchants for that company will be included.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "clientKey": {
      "description": "Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations.",
      "type": "string"
    },
    "companyName": {
      "description": "Name of the company linked to the API credential.",
      "type": "string"
    },
    "description": {
      "description": "Description of the API credential.",
      "maxLength": 50,
      "type": "string"
    },
    "id": {
      "description": "Unique identifier of the API credential.",
      "type": "string"
    },
    "roles": {
      "description": "List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "username": {
      "description": "The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "username",
    "clientKey",
    "allowedIpAddresses",
    "roles",
    "active"
  ],
  "type": "object",
  "$defs": {
    "AllowedOrigin": {
      "properties": {
        "_links": {
          "description": "References to resources linked to the allowed origin.",
          "$ref": "#/$defs/Links"
        },
        "domain": {
          "description": "Domain of the allowed origin.",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier of the allowed origin.",
          "type": "string"
        }
      },
      "required": [
        "domain"
      ],
      "type": "object"
    },
    "ApiCredentialLinks": {
      "properties": {
        "allowedOrigins": {
          "description": "List of allowed origins.",
          "$ref": "#/$defs/LinksElement"
        },
        "company": {
          "description": "Company account that the API credential is linked to. Only present for company-level webhooks.",
          "$ref": "#/$defs/LinksElement"
        },
        "generateApiKey": {
          "description": "Generates a new API key. When you generate a new one, the existing key remains valid for 24 hours. ",
          "$ref": "#/$defs/LinksElement"
        },
        "generateClientKey": {
          "description": "Generates a new client key, used to authenticate client-side requests. When you generate a new one, the existing key remains valid for 24 hours.",
          "$ref": "#/$defs/LinksElement"
        },
        "merchant": {
          "description": "The merchant account that the API credential is linked to. Only present for merchant-level API credentials.",
          "$ref": "#/$defs/LinksElement"
        },
        "self": {
          "description": "Link to the resource itself.",
          "$ref": "#/$defs/LinksElement"
        }
      },
      "required": [
        "self"
      ],
      "type": "object"
    },
    "Links": {
      "properties": {
        "self": {
          "description": "Link to the resource itself.",
          "$ref": "#/$defs/LinksElement"
        }
      },
      "required": [
        "self"
      ],
      "type": "object"
    },
    "LinksElement": {
      "properties": {
        "href": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}