{"title":"(automation API) Create configurationPackage","url":"https://jonas-paprotka.de/docs/dev-itpro/administration/api/dynamics_configurationpackage_create/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/api/dynamics_configurationpackage_create, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/api/dynamics_configurationpackage_create","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Creates a configuration package object in Dynamics 365 Business Central.","date":"2024-05-31","meta":{"topic":"reference"},"outline":[{"level":1,"title":"(automation API) Create configurationPackage","slug":"automation-api-create-configurationpackage","at":0,"chars":2699},{"level":2,"title":"Bound Actions","slug":"bound-actions","at":113,"chars":212},{"level":2,"title":"HTTP requests","slug":"http-requests","at":325,"chars":1261},{"level":3,"title":"Insert configurationPackage","slug":"insert-configurationpackage","at":493,"chars":223},{"level":3,"title":"Response","slug":"response","at":716,"chars":136},{"level":3,"title":"Request headers","slug":"request-headers","at":852,"chars":103},{"level":3,"title":"Request body","slug":"request-body","at":955,"chars":101},{"level":3,"title":"Import configurationPackage","slug":"import-configurationpackage","at":1056,"chars":156},{"level":3,"title":"Apply configurationPackage","slug":"apply-configurationpackage","at":1212,"chars":154},{"level":3,"title":"Request headers","slug":"request-headers-1","at":1366,"chars":73},{"level":3,"title":"Request body","slug":"request-body-1","at":1439,"chars":63},{"level":3,"title":"Response","slug":"response-1","at":1502,"chars":84},{"level":2,"title":"Example","slug":"example","at":1586,"chars":975},{"level":2,"title":"Related information","slug":"related-information","at":2561,"chars":138}],"text":"# (automation API) Create configurationPackage\nCreates a configuration package in Dynamics 365 Business Central.\n## Bound Actions\nActions|Return Type|Description\nMicrosoft.NAV.import<dynamics_extension_get>|none|Imports a configurationPackage.\nMicrosoft.NAV.apply<dynamics_extension_get>|none|Applies a configurationPackage.\n## HTTP requests\nReplace the URL prefix for Business Central depending on environment following the guideline<../../api-reference/v2.0/enabling-apis-for-dynamics-nav>.\n### Insert configurationPackage\n```json\nPOST /microsoft/automation/v2.0/companies({companyId})/configurationPackages\nContent-type: application/json\n{\n    \"code\":\"YourPackageCode\",\n    \"packageName\": \"YourPackageName\"\n}\n```\n### Response\nIf successful, this method returns ```201 Created``` response code and a configurationPackage object in the response body.\n### Request headers\nHeader|Value\nAuthorization|Bearer {token}. Required.\nContent-Type|application/json\n### Request body\nIn the request body, supply a JSON representation of a configurationPackage object.\n### Import configurationPackage\n```json\nPOST /microsoft/automation/v2.0/companies({companyId})/configurationPackages({packageId})/Microsoft.NAV.import\n\n```\n### Apply configurationPackage\n```json\nPOST /microsoft/automation/v2.0/companies({companyId})/configurationPackages({packageId})/Microsoft.NAV.apply\n\n```\n### Request headers\nHeader|Value\nAuthorization|Bearer {token}. Required.\n### Request body\nDo not supply a request body for this method.\n### Response\nIf successful, this method returns ```204 No Content``` response code.\n## Example\nRequest\nHere is an example of the request.\n```json\nPOST https://api.businesscentral.dynamics.com/v2.0/{environment name}/api/microsoft/automation/v2.0/companies({companyId})/configurationPackages\nContent-type: application/json\n{\n    \"code\":\"YourPackageCode\",\n    \"packageName\": \"YourPackageName\"\n}\n```\nResponse\nHere is an example of the response.\n> NOTE\n> The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.\n```json\nHTTP/1.1 201 Created\nContent-type: application/json\n{\n    \"id\": \"b6d25c66-f33d-eb11-846f-0022482037e2\",\n    \"code\": \"YourPackageCode\",\n    \"packageName\": \"YourPackageName\",\n    \"languageId\": 0,\n    \"productVersion\": \"\",\n    \"processingOrder\": 0,\n    \"excludeConfigurationTables\": false,\n    \"numberOfTables\": 12,\n    \"numberOfRecords\": 3,\n    \"numberOfErrors\": 3,\n    \"importStatus\": \"Completed\",\n    \"applyStatus\": \"Completed\",\n    \"applyError\": \"\",\n    \"importError\": \"\"\n}\n```\n## Related information\nTips for working with the APIs<../../developer/devenv-connect-apps-tips>\n../resources/dynamics_configurationpackage"}