# API or Webhook (POST) to create a case from an external source

**URL:** <https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309>\
**Category:** Primero IMS\
**Tags:** v2-0\
**Created:** [April 26, 2020, 11:00am UTC](https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309 "2020-04-26T11:00:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekieyapojesus](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ekieyapojesus](https://support.primero.org/forum/u/ekieyapojesus)\
**Post date:** [April 26, 2020, 11:00am UTC](https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309/1 "2020-04-26T11:00:31Z")

</div>

Hello,  
We have some idea of bringing an App to tackle GBV in this Covid19 and lockdown period and we wanted to explore the opportunity to merge the system with Primero in other.

Basically put our current system will collect data from GBV survivors and we wanted to pass it to Primero for proper follow up.

I wanted to know if there is an option or a way in Primero that will enable us to create a case and fill in some information thought an API or an endpoint in Primero or if you think it’s possible to just insert the data directly in the database to achieve that.

Regards,  
Jesus

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [April 27, 2020, 11:26am UTC](https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309/2 "2020-04-27T11:26:21Z")

</div>

This is possible in v2 of Primero (which is a React app on top of an API) so that would be a good place to start [https://github.com/primeroIMS/primero/tree/development\_v2](https://github.com/primeroIMS/primero/tree/development_v2)  
You could of course also use the Primero mobile app [https://github.com/primeroIMS/rapidreg](https://github.com/primeroIMS/rapidreg) if you wanted to

---

<div class="post-metadata">

**Author:** ![ekieyapojesus](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ekieyapojesus](https://support.primero.org/forum/u/ekieyapojesus)\
**Post date:** [April 27, 2020, 11:29am UTC](https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309/3 "2020-04-27T11:29:55Z")

</div>

Thank you very much for your answer. Can you please direct me on the API documentation on how to perform that?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [April 27, 2020, 11:51am UTC](https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309/4 "2020-04-27T11:51:44Z")

</div>

sure!..v2 is in active development so there is no documentation of the API yet. The best thing is to look at the code

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [April 29, 2020, 1:34pm UTC](https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309/6 "2020-04-29T13:34:39Z")

</div>

Do you mind if I make this public so others might benefit?

---

<div class="post-metadata">

**Author:** ![ekieyapojesus](https://support.primero.org/forum/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ekieyapojesus](https://support.primero.org/forum/u/ekieyapojesus)\
**Post date:** [April 29, 2020, 1:37pm UTC](https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309/7 "2020-04-29T13:37:12Z")

</div>

Yes please. So it will help others. I will just hide the secret key and password in the sh file

---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [April 29, 2020, 2:11pm UTC](https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309/8 "2020-04-29T14:11:47Z")

</div>



---

<div class="post-metadata">

**Author:** ![irlawrence](https://support.primero.org/forum/user_avatar/support.primero.org/irlawrence/32/8_2.png) [@irlawrence](https://support.primero.org/forum/u/irlawrence)\
**Post date:** [April 29, 2020, 2:15pm UTC](https://support.primero.org/forum/t/api-or-webhook-post-to-create-a-case-from-an-external-source/309/9 "2020-04-29T14:15:10Z")

</div>

Thanks!  
I [posted a guide here about setting up v2](https://support.primero.org/forum/t/installing-primero-v2-for-development-on-ubuntu-18-04/300).While its still in development its best to use this guide rather than bash scripting stuff
