{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wso2/main/json-schema/wso2-application-key-schema.json",
  "title": "Application key details",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wso2-application-keys-api-openapi.yml#/components/schemas/ApplicationKey",
  "type": "object",
  "properties": {
    "keyMappingId": {
      "type": "string",
      "description": "Key Manager Mapping UUID",
      "readOnly": true
    },
    "keyManager": {
      "type": "string",
      "description": "Key Manager Name"
    },
    "consumerKey": {
      "type": "string",
      "description": "Consumer key of the application",
      "readOnly": true
    },
    "consumerSecret": {
      "type": "string",
      "description": "Consumer secret of the application",
      "readOnly": true
    },
    "consumerSecrets": {
      "type": "array",
      "description": "A list of all consumer secrets of the application When multiple consumer secrets are enabled",
      "items": {
        "$ref": "#/$defs/ConsumerSecret"
      }
    },
    "supportedGrantTypes": {
      "type": "array",
      "description": "The grant types that are supported by the application",
      "items": {
        "type": "string"
      }
    },
    "callbackUrl": {
      "type": "string",
      "description": "Callback URL"
    },
    "keyState": {
      "type": "string",
      "description": "Describes the state of the key generation."
    },
    "keyType": {
      "type": "string",
      "description": "Describes to which endpoint the key belongs",
      "enum": [
        "PRODUCTION",
        "SANDBOX"
      ]
    },
    "mode": {
      "type": "string",
      "description": "Describe the which mode Application Mapped.",
      "enum": [
        "MAPPED",
        "CREATED"
      ]
    },
    "groupId": {
      "type": "string",
      "description": "Application group id (if any)."
    },
    "token": {
      "$ref": "#/$defs/ApplicationToken"
    },
    "additionalProperties": {
      "type": "object",
      "properties": {},
      "description": "additionalProperties (if any)."
    }
  },
  "$defs": {
    "ApplicationToken": {
      "title": "Application token details to invoke APIs",
      "type": "object",
      "properties": {
        "accessToken": {
          "type": "string",
          "description": "Access token"
        },
        "tokenScopes": {
          "type": "array",
          "description": "Valid comma seperated scopes for the access token",
          "items": {
            "type": "string"
          }
        },
        "validityTime": {
          "type": "integer",
          "description": "Maximum validity time for the access token",
          "format": "int64"
        }
      }
    },
    "ConsumerSecret": {
      "type": "object",
      "properties": {
        "secretId": {
          "type": "string",
          "description": "Unique identifier for the secret"
        },
        "secretValue": {
          "type": "string",
          "description": "The actual secret string"
        },
        "additionalProperties": {
          "type": "object",
          "description": "Additional dynamic properties for the secret creation request.",
          "additionalProperties": {
            "type": "object"
          }
        }
      }
    }
  }
}