---
title: Edit AAPM Account
slug: single-connect-api-3-2-0/edit-aapm-account
description: Learn how to use the curl command effectively for sending POST requests to a desired URL, accompanied by custom headers and request body. This code example simplifies the process, helping you master POST requests effortlessly.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "BfuKZn9HcW_LfvdAVtTeI",
  "data": {
    "url": "http://localhost/aioc-rest-web/rest/aapm/editAapmAccount",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "x-xsrf-token",
          "type": "string",
          "example": "{{x-xsrf-token}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\r\n    \"dbId\": 237913,\r\n    \"applicationName\": \"My New Updated AAPM Account\",\r\n    \"applicationIPs\": [\"0.0.0.0/0\"],\r\n    \"sapmAccounts\": null,\t\r\n    \"sapmGroups\": [19731, 73758, 109612, 109635],\r\n    \"restrictions\": {\r\n        \"allowListingAccounts\": true,\r\n        \"maxUsageCount\": \"50\"\r\n    \t}\r\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "<p>This API enables to edit AAPM accounts existing ones. To edit existing accounts, db id parameter of existing account shoould be filled.</p>",
    "examples": {
      "languages": [
        {
          "id": "NV0mIoBSk4xCYhtGBNn5E",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url http://localhost/aioc-rest-web/rest/aapm/editAapmAccount \\\n     --header 'accept: application/json'"
        },
        {
          "id": "emE1sVCH7V5_mjnMOiBD-",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost/aioc-rest-web/rest/aapm/editAapmAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "NqsCtnijqnj2TiE5zv9Qs",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost/aioc-rest-web/rest/aapm/editAapmAccount\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "kkHKSJoGpdNkBtb9ihdcm",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"http://localhost/aioc-rest-web/rest/aapm/editAapmAccount\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "NV0mIoBSk4xCYhtGBNn5E"
    },
    "results": {
      "languages": [
        {
          "id": "Kpkq-2qKTOX9eTmenNcYr",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "Kpkq-2qKTOX9eTmenNcYr"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}