# Unable to create a deployment via API

**URL:** <https://hub.mender.io/t/unable-to-create-a-deployment-via-api/2244>\
**Category:** General Discussions\
**Created:** [July 27, 2020, 9:36pm UTC](https://hub.mender.io/t/unable-to-create-a-deployment-via-api/2244 "2020-07-27T21:36:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmeirow](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jmeirow](https://hub.mender.io/u/jmeirow)\
**Post date:** [July 27, 2020, 9:36pm UTC](https://hub.mender.io/t/unable-to-create-a-deployment-via-api/2244/1 "2020-07-27T21:36:51Z")

</div>

I am able to login via API and receive back a JWT.  
I can also list devices and list users via API calls.

However, when I attempt to create a deployment (POST /api/management/v1/deployments) via API, I receive HTML back from the server with the message “404 Not Found” embedded in it.

I am using the same $MENDER\_SERVER\_URI for all of the calls.

I am running version 2.3 of the Mender management server.

I greatly appreciate any suggestions anyone may have.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [July 28, 2020, 6:30am UTC](https://hub.mender.io/t/unable-to-create-a-deployment-via-api/2244/2 "2020-07-28T06:30:15Z")

</div>

Hi @jmeirow,

Could you please share more details on how you are constructing your calls?

Also the end-point to create a deployment is

```auto
POST /api/management/v1/deployments/deployments

```

---

<div class="post-metadata">

**Author:** ![jmeirow](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jmeirow](https://hub.mender.io/u/jmeirow)\
**Post date:** [July 28, 2020, 9:47am UTC](https://hub.mender.io/t/unable-to-create-a-deployment-via-api/2244/3 "2020-07-28T09:47:46Z")

</div>

Mirzak,

Thank you! That was it. My call to the API is now working as expected.

Apparently I was not reading the documentation correctly (base path of /api/management/v1/deployments + path of /deployments. )

Thanks again.

---

<div class="post-metadata">

**Author:** ![tahashahidalvi](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tahashahidalvi/32/1689_2.png) [@tahashahidalvi](https://hub.mender.io/u/tahashahidalvi)\
**Post date:** [August 4, 2022, 6:47pm UTC](https://hub.mender.io/t/unable-to-create-a-deployment-via-api/2244/5 "2022-08-04T18:47:11Z")

</div>

please share detail about deployment api call  
i have alot of confusion in it

curl -vvv -k URL/api/management/v1/deployments/artifacts -H “Authorization: Bearer ${JWT}” -H “Transfer-Encoding: chunked” -F artifact=@  
i used this command to upload artifact its work prefectly but confusion on creating deployment

curl -k URL/api/management/v1/deployments/deployments -H “Authorization: Bearer ${JWT}” -H “Transfer-Encoding: chunked” -H “name=” -H “artifact\_name=”

curl -k URL/api/management/v1/deployments/deployments -H “Authorization: Bearer ${JWT}” -H “Transfer-Encoding: chunked” -F “name= ” -F “artifact\_name= ” plz check both
