---
title: Add Application Token Account
slug: kron-pam-api-collection-381-patch3/add-application-token-account
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "QLm_mJVIoGjoA0e_yMBQR",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/aapm/addAapmAccount",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>The <strong>Add Application Token Account</strong> API enables the creation of new Application Token accounts.</p>\n<h4>Usage:</h4>\n<ul>\n<li>Use this method to generate a new Application Token account within the system.</li>\n</ul>\n<hr>\n<h3>Add Application Token Account parameters</h3>\n<p><code>POST /rest/aapm/addAapmAccount</code> accepts <code>AapmAccountModel</code>.</p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<table><thead><tr><th align=\"left\">JSON field</th><th align=\"left\">Type</th><th align=\"left\">Required</th><th align=\"left\">Description</th></tr></thead><tbody><tr><td align=\"left\"><code>applicationName</code></td><td align=\"left\">String</td><td align=\"left\">Yes</td><td align=\"left\">Application identifier. Must not be blank.</td></tr><tr><td align=\"left\"><code>applicationIPs</code></td><td align=\"left\">Array[String]</td><td align=\"left\">Yes</td><td align=\"left\">Allowed client IP addresses or CIDR ranges. At least one value is required.</td></tr><tr><td align=\"left\"><code>level</code></td><td align=\"left\">SecurityLevel</td><td align=\"left\">Yes</td><td align=\"left\">Server-supported security level; for example <code>BASIC_PIN_PATH_HASH</code>.</td></tr><tr><td align=\"left\"><code>sapmAccounts</code></td><td align=\"left\">Array[Long]</td><td align=\"left\">Conditional</td><td align=\"left\">SAPM account database IDs. At least one SAPM account or SAPM group is required.</td></tr><tr><td align=\"left\"><code>sapmGroups</code></td><td align=\"left\">Array[Long]</td><td align=\"left\">Conditional</td><td align=\"left\">SAPM group database IDs. At least one SAPM account or SAPM group is required.</td></tr><tr><td align=\"left\"><code>restrictions.allowListingAccounts</code></td><td align=\"left\">Boolean</td><td align=\"left\">No</td><td align=\"left\">Allows the token to list linked SAPM accounts. Defaults to <code>false</code>.</td></tr><tr><td align=\"left\"><code>restrictions.eventUserId</code></td><td align=\"left\">String</td><td align=\"left\">No</td><td align=\"left\">User UUID used for event attribution.</td></tr><tr><td align=\"left\"><code>restrictions.expiryDate</code></td><td align=\"left\">Long</td><td align=\"left\">No</td><td align=\"left\">Token expiry time in Unix epoch milliseconds.</td></tr><tr><td align=\"left\"><code>restrictions.maxUsageCount</code></td><td align=\"left\">String</td><td align=\"left\">No</td><td align=\"left\">Maximum usage count represented as an integer string, such as <code>\"100\"</code>.</td></tr><tr><td align=\"left\"><code>properties</code></td><td align=\"left\">Object</td><td align=\"left\">No</td><td align=\"left\">Security-level-specific settings such as <code>pinPort</code>, <code>appPath</code>, <code>appHash</code>, <code>OSType</code>, <code>OSCredentialType</code>, <code>OSCredentialSAPM</code>, <code>manualUserName</code>, and <code>manualPassword</code>.</td></tr></tbody></table>\n<p><code>dbId</code>, <code>token</code>, <code>lastAccessTime</code>, and <code>numberOfUsage</code> are generated or maintained by the system and are not add-request fields.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "x-xsrf-token",
          "description": "",
          "default": "{{x-xsrf-token}}",
          "value": "{{x-xsrf-token}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\n  \"applicationName\": \"ExampleApplication\",\n  \"applicationIPs\": [\n    \"192.0.2.10/32\"\n  ],\n  \"sapmAccounts\": [\n    100001\n  ],\n  \"sapmGroups\": [],\n  \"restrictions\": {\n    \"allowListingAccounts\": false,\n    \"expiryDate\": 1893456000000,\n    \"maxUsageCount\": \"100\"\n  },\n  \"level\": \"BASIC_PIN_PATH_HASH\",\n  \"properties\": {\n    \"appHash\": \"EXAMPLE_APP_HASH\",\n    \"appPath\": \"C:\\\\Program Files\\\\Example\\\\example.exe\",\n    \"OSType\": \"WINDOWS\",\n    \"OSCredentialType\": \"SAPM\",\n    \"OSCredentialSAPM\": 100001,\n    \"pinPort\": 8080\n  }\n}",
          "value": "{\n  \"applicationName\": \"ExampleApplication\",\n  \"applicationIPs\": [\n    \"192.0.2.10/32\"\n  ],\n  \"sapmAccounts\": [\n    100001\n  ],\n  \"sapmGroups\": [],\n  \"restrictions\": {\n    \"allowListingAccounts\": false,\n    \"expiryDate\": 1893456000000,\n    \"maxUsageCount\": \"100\"\n  },\n  \"level\": \"BASIC_PIN_PATH_HASH\",\n  \"properties\": {\n    \"appHash\": \"EXAMPLE_APP_HASH\",\n    \"appPath\": \"C:\\\\Program Files\\\\Example\\\\example.exe\",\n    \"OSType\": \"WINDOWS\",\n    \"OSCredentialType\": \"SAPM\",\n    \"OSCredentialSAPM\": 100001,\n    \"pinPort\": 8080\n  }\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Add Application Token Account",
        "jsonExample": "{\n  \"dbId\": 200001,\n  \"token\": \"REDACTED_EXAMPLE_TOKEN\"\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "sdD04o3pGsFD14wrrxknp",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/aapm/addAapmAccount \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{x-xsrf-token}}' \\\n     --data '\"{\\n  \\\"applicationName\\\": \\\"ExampleApplication\\\",\\n  \\\"applicationIPs\\\": [\\n    \\\"192.0.2.10/32\\\"\\n  ],\\n  \\\"sapmAccounts\\\": [\\n    100001\\n  ],\\n  \\\"sapmGroups\\\": [],\\n  \\\"restrictions\\\": {\\n    \\\"allowListingAccounts\\\": false,\\n    \\\"expiryDate\\\": 1893456000000,\\n    \\\"maxUsageCount\\\": \\\"100\\\"\\n  },\\n  \\\"level\\\": \\\"BASIC_PIN_PATH_HASH\\\",\\n  \\\"properties\\\": {\\n    \\\"appHash\\\": \\\"EXAMPLE_APP_HASH\\\",\\n    \\\"appPath\\\": \\\"C:\\\\\\\\Program Files\\\\\\\\Example\\\\\\\\example.exe\\\",\\n    \\\"OSType\\\": \\\"WINDOWS\\\",\\n    \\\"OSCredentialType\\\": \\\"SAPM\\\",\\n    \\\"OSCredentialSAPM\\\": 100001,\\n    \\\"pinPort\\\": 8080\\n  }\\n}\"'"
        },
        {
          "id": "oH_otewFWdz9AXFlkDKqt",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{x-xsrf-token}}\");\n\nvar raw = JSON.stringify(\"{\\n  \\\"applicationName\\\": \\\"ExampleApplication\\\",\\n  \\\"applicationIPs\\\": [\\n    \\\"192.0.2.10/32\\\"\\n  ],\\n  \\\"sapmAccounts\\\": [\\n    100001\\n  ],\\n  \\\"sapmGroups\\\": [],\\n  \\\"restrictions\\\": {\\n    \\\"allowListingAccounts\\\": false,\\n    \\\"expiryDate\\\": 1893456000000,\\n    \\\"maxUsageCount\\\": \\\"100\\\"\\n  },\\n  \\\"level\\\": \\\"BASIC_PIN_PATH_HASH\\\",\\n  \\\"properties\\\": {\\n    \\\"appHash\\\": \\\"EXAMPLE_APP_HASH\\\",\\n    \\\"appPath\\\": \\\"C:\\\\\\\\Program Files\\\\\\\\Example\\\\\\\\example.exe\\\",\\n    \\\"OSType\\\": \\\"WINDOWS\\\",\\n    \\\"OSCredentialType\\\": \\\"SAPM\\\",\\n    \\\"OSCredentialSAPM\\\": 100001,\\n    \\\"pinPort\\\": 8080\\n  }\\n}\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/aapm/addAapmAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "OelqA80k9MV36ohB5dRxd",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/aapm/addAapmAccount\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{x-xsrf-token}}\"\nrequest.body = JSON.dump(\"{\\n  \\\"applicationName\\\": \\\"ExampleApplication\\\",\\n  \\\"applicationIPs\\\": [\\n    \\\"192.0.2.10/32\\\"\\n  ],\\n  \\\"sapmAccounts\\\": [\\n    100001\\n  ],\\n  \\\"sapmGroups\\\": [],\\n  \\\"restrictions\\\": {\\n    \\\"allowListingAccounts\\\": false,\\n    \\\"expiryDate\\\": 1893456000000,\\n    \\\"maxUsageCount\\\": \\\"100\\\"\\n  },\\n  \\\"level\\\": \\\"BASIC_PIN_PATH_HASH\\\",\\n  \\\"properties\\\": {\\n    \\\"appHash\\\": \\\"EXAMPLE_APP_HASH\\\",\\n    \\\"appPath\\\": \\\"C:\\\\\\\\Program Files\\\\\\\\Example\\\\\\\\example.exe\\\",\\n    \\\"OSType\\\": \\\"WINDOWS\\\",\\n    \\\"OSCredentialType\\\": \\\"SAPM\\\",\\n    \\\"OSCredentialSAPM\\\": 100001,\\n    \\\"pinPort\\\": 8080\\n  }\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "s_7QzI4ps1sqUOYsYNNMF",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/aapm/addAapmAccount\"\n\npayload = json.dumps(\"{\\n  \\\"applicationName\\\": \\\"ExampleApplication\\\",\\n  \\\"applicationIPs\\\": [\\n    \\\"192.0.2.10/32\\\"\\n  ],\\n  \\\"sapmAccounts\\\": [\\n    100001\\n  ],\\n  \\\"sapmGroups\\\": [],\\n  \\\"restrictions\\\": {\\n    \\\"allowListingAccounts\\\": false,\\n    \\\"expiryDate\\\": 1893456000000,\\n    \\\"maxUsageCount\\\": \\\"100\\\"\\n  },\\n  \\\"level\\\": \\\"BASIC_PIN_PATH_HASH\\\",\\n  \\\"properties\\\": {\\n    \\\"appHash\\\": \\\"EXAMPLE_APP_HASH\\\",\\n    \\\"appPath\\\": \\\"C:\\\\\\\\Program Files\\\\\\\\Example\\\\\\\\example.exe\\\",\\n    \\\"OSType\\\": \\\"WINDOWS\\\",\\n    \\\"OSCredentialType\\\": \\\"SAPM\\\",\\n    \\\"OSCredentialSAPM\\\": 100001,\\n    \\\"pinPort\\\": 8080\\n  }\\n}\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{x-xsrf-token}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "sdD04o3pGsFD14wrrxknp"
    },
    "results": {
      "languages": [
        {
          "id": "2TtEbvyjLEQ5UD8B63mzV",
          "language": "200",
          "code": "{\n  \"dbId\": 200001,\n  \"token\": \"REDACTED_EXAMPLE_TOKEN\"\n}"
        }
      ],
      "selectedLanguageId": "2TtEbvyjLEQ5UD8B63mzV"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}