# Error Activating Repository via API

**URL:** <https://drone.discourse.group/t/error-activating-repository-via-api/7508>\
**Category:** Drone Support\
**Created:** [March 10, 2020, 6:20pm UTC](https://drone.discourse.group/t/error-activating-repository-via-api/7508 "2020-03-10T18:20:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blackglade](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Blackglade](https://drone.discourse.group/u/Blackglade)\
**Post date:** [March 10, 2020, 6:20pm UTC](https://drone.discourse.group/t/error-activating-repository-via-api/7508/1 "2020-03-10T18:20:02Z")

</div>

I ran into this issue and I’m not totally even sure Drone has a fix for it.

I have an organization on GitHub and I want to automatically activate any repo that is created in that org in drone. To this I tried to setup a webhook on the org where it would send the repo that is created to an endpoint which would trigger an api POST request to

`/api/repos/{owner}/{name}`

The problem is that it doesn’t seem to be working. No idea why… When I try to send the POST request via CURL with my Auth Token, I get this response:

```auto
{"message":"Not Found"}

```

It seems as if drone is not detecting my newly created repo and the only way to have it detect it is by clicking the **Sync** button in the UI or doing a sync via the CLI. Is there anyway I can get around this and have drone detect newly created repos?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [March 10, 2020, 6:25pm UTC](https://drone.discourse.group/t/error-activating-repository-via-api/7508/2 "2020-03-10T18:25:29Z")

</div>

If the repository is not found, you can execute the sync endpoint

```auto
POST /api/user/repos

```

---

<div class="post-metadata">

**Author:** ![Blackglade](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Blackglade](https://drone.discourse.group/u/Blackglade)\
**Post date:** [March 10, 2020, 6:27pm UTC](https://drone.discourse.group/t/error-activating-repository-via-api/7508/3 "2020-03-10T18:27:52Z")

</div>

Thanks! I couldn’t find the sync documentation

I don’t see it listed anywhere here: [https://docs.drone.io/api/](https://docs.drone.io/api/)
