# How to create, update course using API

**URL:** <https://discuss.openedx.org/t/how-to-create-update-course-using-api/8374>\
**Category:** Architecture\
**Tags:** how-to\
**Created:** [September 27, 2022, 7:19am UTC](https://discuss.openedx.org/t/how-to-create-update-course-using-api/8374 "2022-09-27T07:19:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luan.tm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/luan.tm/32/4138_2.png) [@luan.tm](https://discuss.openedx.org/u/luan.tm)\
**Post date:** [September 27, 2022, 7:19am UTC](https://discuss.openedx.org/t/how-to-create-update-course-using-api/8374/1 "2022-09-27T07:19:36Z")

</div>

Hello everyone, I want to create a new course and update exist course using API (synch from another system), I read api-docs but I can’t see any API to do that. If I have to write new API, please guide me (about model course to create and update ). I’m using lilac version

---

<div class="post-metadata">

**Author:** ![msamir2000](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@msamir2000](https://discuss.openedx.org/u/msamir2000)\
**Post date:** [October 4, 2022, 8:56am UTC](https://discuss.openedx.org/t/how-to-create-update-course-using-api/8374/2 "2022-10-04T08:56:09Z")

</div>

you can use [https://your-studio-url/api/v1/course\_runs/](https://your-studio-url/api/v1/course_runs/) post and put APIs to create and update courses

---

<div class="post-metadata">

**Author:** ![pdpinch](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/pdpinch/32/36_2.png) [@pdpinch](https://discuss.openedx.org/u/pdpinch)\
**Post date:** [October 4, 2022, 3:50pm UTC](https://discuss.openedx.org/t/how-to-create-update-course-using-api/8374/3 "2022-10-04T15:50:14Z")

</div>

Welcome to open edX @luan.tm

Can you say more about what you are wanting to update in your course?

I don’t know if it will help your use case, but MIT Open Learning has a plugin that can be used for importing course content from a github repo. It can also be configured with web hooks to import the course every time the repo is updated (we use this with GitHub Enterprise).

> **[GitHub - mitodl/edx-sysadmin: A plugin for SysAdmin panel of Open edX](https://github.com/mitodl/edx-sysadmin/)**
>
> A plugin for SysAdmin panel of Open edX. Contribute to mitodl/edx-sysadmin development by creating an account on GitHub.

> **[edx-sysadmin](https://pypi.org/project/edx-sysadmin/)**
>
> An Open edX plugin to enable SysAdmin panel

---

<div class="post-metadata">

**Author:** ![luan.tm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/luan.tm/32/4138_2.png) [@luan.tm](https://discuss.openedx.org/u/luan.tm)\
**Post date:** [October 5, 2022, 2:59am UTC](https://discuss.openedx.org/t/how-to-create-update-course-using-api/8374/4 "2022-10-05T02:59:14Z")

</div>

Thanks for your answer @pdpinch  
I want to update: display\_name , start, end, enrollment\_start, enrollment\_end of a specific course  
Absolutely, I can edit or create them in studio but I need an API because I can not edit or create manual courses one by one.  
This is my use case:  
I have system A, this system also has model course and fields like edx, when system A has addition course or update course , system A will call API of edx to synchronize, after system A call API , edx will create or edit course, after I read api-docs I find this API

 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/a/ae218088b525f1f7220eb62a087cced96de9c0a6.png)  
However this API only support readonly , so I try change RetriveAPIView to RetriveUpdateAPIView  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/4/4669e80e9ebe17f8f3c998834680ec96ab280dba.png)  
When I go to endpoint it appear PUT and PATCH method, but after I run PATCH , there’s nothing update
