# Create a case instance via REST API

**URL:** <https://forum.flowable.org/t/create-a-case-instance-via-rest-api/11779>\
**Category:** Flowable Engine\
**Created:** [September 4, 2024, 12:56pm UTC](https://forum.flowable.org/t/create-a-case-instance-via-rest-api/11779 "2024-09-04T12:56:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eztam](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/eztam/32/3568_2.png) [@eztam](https://forum.flowable.org/u/eztam)\
**Post date:** [September 4, 2024, 12:56pm UTC](https://forum.flowable.org/t/create-a-case-instance-via-rest-api/11779/1 "2024-09-04T12:56:13Z")

</div>

I’m trying to create a new case instance through this endpoint: [POST /cmmn-runtime/case-instances](https://documentation.flowable.com/latest/assets/core-swagger/cmmn.html#/Case%20Instances/createCaseInstance)

This is my request body:

```auto
{
  "caseDefinitionKey": "oneTaskCase",
  "startFormVariables": [
    {
      "name": "myVariable",
      "value": "test",
    }
  ]
}

```

Flowable doesn’t create a new case instance but just lists all the existing case instances.  
Is this endpoint really the right one to create new case instances?

---

<div class="post-metadata">

**Author:** ![WelschChristopher](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/welschchristopher/32/2822_2.png) [@WelschChristopher](https://forum.flowable.org/u/WelschChristopher)\
**Post date:** [September 4, 2024, 12:58pm UTC](https://forum.flowable.org/t/create-a-case-instance-via-rest-api/11779/2 "2024-09-04T12:58:38Z")

</div>

Hey @eztam,  
can you please verify that you are actually sending the POST request? From you description, it seems you are executing the GET request.

---

<div class="post-metadata">

**Author:** ![eztam](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/eztam/32/3568_2.png) [@eztam](https://forum.flowable.org/u/eztam)\
**Post date:** [September 4, 2024, 1:23pm UTC](https://forum.flowable.org/t/create-a-case-instance-via-rest-api/11779/3 "2024-09-04T13:23:20Z")

</div>

I’m sending a POST request!

---

<div class="post-metadata">

**Author:** ![WelschChristopher](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/welschchristopher/32/2822_2.png) [@WelschChristopher](https://forum.flowable.org/u/WelschChristopher)\
**Post date:** [September 4, 2024, 1:26pm UTC](https://forum.flowable.org/t/create-a-case-instance-via-rest-api/11779/4 "2024-09-04T13:26:54Z")

</div>

Hey @eztam,  
can you please check the url you are using?  
From what you describe, using a POST request, but getting all case instances as a response, it indicates you are calling the [case instance query endpoint](https://documentation.flowable.com/latest/assets/core-swagger/cmmn.html#/Case%20Instances/queryCaseInstances).

Can you please check that you are using the proper endpoint?

Greetings

Christopher

---

<div class="post-metadata">

**Author:** ![eztam](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/eztam/32/3568_2.png) [@eztam](https://forum.flowable.org/u/eztam)\
**Post date:** [September 4, 2024, 1:30pm UTC](https://forum.flowable.org/t/create-a-case-instance-via-rest-api/11779/5 "2024-09-04T13:30:41Z")

</div>

Thanks Christopher, you are genius, that was indeed the issue 😀
