{"title":"Create opportunities","url":"https://jonas-paprotka.de/docs/dev-itpro/api-reference/v2.0/api/dynamics_opportunity_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/api-reference/v2.0/api/dynamics_opportunity_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/api-reference/v2.0/api/dynamics_opportunity_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 an opportunity object in Dynamics 365 Business Central.","date":"2026-08-21","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Create opportunities","slug":"create-opportunities","at":0,"chars":1901},{"level":2,"title":"HTTP request","slug":"http-request","at":67,"chars":213},{"level":2,"title":"Request headers","slug":"request-headers","at":280,"chars":102},{"level":2,"title":"Request body","slug":"request-body","at":382,"chars":91},{"level":2,"title":"Response","slug":"response","at":473,"chars":126},{"level":2,"title":"Example","slug":"example","at":599,"chars":1070},{"level":2,"title":"Related information","slug":"related-information","at":1669,"chars":232}],"text":"# Create opportunities\nCreates an opportunity in Business Central.\n## HTTP request\nReplace the URL prefix for Business Central depending on environment following the guideline<../endpoints-apis-for-dynamics>.\n```\nPOST businesscentralPrefix/companies({id})/opportunities({id})\n```\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 opportunity object.\n## Response\nIf successful, this method returns ```201 Created``` response code and a opportunity object in the response body.\n## Example\nRequest\nHere's an example of the request.\n```json\nPOST https://{businesscentralPrefix}/api/v2.0/companies({id})/opportunities({id})\nContent-type: application/json\n{\n\"number\": \"OP100101\",\n\"contactNumber\": \"CT200116\",\n\"salespersonCode\": \"BC\",\n\"description\": \"Description\"\n}\n```\nResponse\nHere's an example of the response.\n```json\nHTTP/1.1 201 Created\nContent-type: application/json\n{\n\"@odata.etag\": \"W/\\\"JzQ0O05OZnZiNXpLT1BhTmkvQmduNDBxL1pMR09tdE1aZjVJUVYrYVBWb0VzeDA9MTswMDsn\\\"\",\n\"id\": \"563c6d96-cd04-ec11-9310-000d3abb70f9\",\n\"number\": \"OP100101\",\n\"contactNumber\": \"CT200116\",\n\"contactName\": \"David Oliver Lawrence\",\n\"contactCompanyName\": \"A. Gibson\\\"s Law Firm\",\n\"salespersonCode\": \"BC\",\n\"description\": \"Description\",\n\"status\": \"Not_x0020_Started\",\n\"closed\": false,\n\"creationDate\": \"2021-08-24\",\n\"dateClosed\": \"0001-01-01\",\n\"calculatedCurrentValue\": 0,\n\"chancesOfSuccessPrc\": 0,\n\"completedPrc\": 0,\n\"estimatedClosingDate\": \"0001-01-01\",\n\"estimatedValue\": 0,\n\"systemCreatedAt\": \"2021-08-24T11:22:39.02Z\",\n\"lastModifiedDateTime\": \"2021-08-24T11:22:39.02Z\"\n}\n```\n## Related information\nTips for working with the APIs<../../../developer/devenv-connect-apps-tips>\n../resources/dynamics_opportunity\ndynamics_opportunity_get\ndynamics_opportunity_delete\nPATCH opportunity<dynamics_opportunity_update>"}