# Create Sync API not working?

**URL:** <https://community.doppler.com/t/create-sync-api-not-working/1080>\
**Category:** Need Help\
**Tags:** integration\
**Created:** [April 7, 2023, 5:26pm UTC](https://community.doppler.com/t/create-sync-api-not-working/1080 "2023-04-07T17:26:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![djandreau](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@djandreau](https://community.doppler.com/u/djandreau)\
**Post date:** [April 7, 2023, 5:26pm UTC](https://community.doppler.com/t/create-sync-api-not-working/1080/1 "2023-04-07T17:26:42Z")

</div>

Hey there!

I saw recently that the API for “Create Sync” was recently added. I’ve been waiting for this functionality as we rapidly create and delete environments weekly and being able to automate turning on the sync would eliminate the last manual step we have in the process. However, when I try use the documentation page to test out this feature with valid data, I get a return object like below. I’ve also tried in Postman with no luck. Any help is appreciated!

```auto
{
  "messages": [
    "Data must be an object"
  ],
  "validationIssues": [
    {
      "code": "invalid_type",
      "expected": "object",
      "received": "undefined",
      "path": [
        "body",
        "data"
      ],
      "message": "Data must be an object"
    }
  ],
  "success": false
}

```

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [April 7, 2023, 5:34pm UTC](https://community.doppler.com/t/create-sync-api-not-working/1080/2 "2023-04-07T17:34:26Z")

</div>

Hi @djandreau!

Welcome to the Doppler Community!

Would you mind sharing the actual request you’re sending (feel free to redact any actual IDs or sensitive information)? Without that it’ll be hard to help diagnose what’s going wrong here for you!

Regards,  
-Joel

---

<div class="post-metadata">

**Author:** ![djandreau](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@djandreau](https://community.doppler.com/u/djandreau)\
**Post date:** [April 10, 2023, 1:35pm UTC](https://community.doppler.com/t/create-sync-api-not-working/1080/3 "2023-04-10T13:35:57Z")

</div>

Sure! Here’s a screencap of the fields I inputted as well as what the example is showing for a request

![Screenshot 2023-04-10 at 9.34.29 AM](https://us1.discourse-cdn.com/flex016/uploads/doppler/original/1X/186bbbd68a0c9d76ddace2ab41e02e897f63c48b.png)

```auto
curl --request POST \
     --url 'https://api.doppler.com/v3/configs/config/syncs?project=sm-portal&config=local' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer [REDACTED]' \
     --header 'content-type: application/json' \
     --data '
{
  "integration": "[REDACTED]"
}
'

```

---

<div class="post-metadata">

**Author:** ![djandreau](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@djandreau](https://community.doppler.com/u/djandreau)\
**Post date:** [April 25, 2023, 6:28pm UTC](https://community.doppler.com/t/create-sync-api-not-working/1080/4 "2023-04-25T18:28:55Z")

</div>

Hey @watsonian! Any ideas on the above? Thanks!

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [April 25, 2023, 7:53pm UTC](https://community.doppler.com/t/create-sync-api-not-working/1080/5 "2023-04-25T19:53:44Z")

</div>

Hi @djandreau!

Sorry, I totally missed your earlier reply. I think I see what the issue is. You’re not including the required `data` entry in the payload. Your payload is:

```auto
{
  "integration": "[integration-slug]"
}

```

when it should be:

```auto
{
  "integration": "[integration-slug]",
  "data": {
    "path": "[asm-or-parameter-path]",
    "region": "[aws-region]"
  }
}

```

Could you give that a shot and let me know how it goes?

Regards,  
-Joel

---

<div class="post-metadata">

**Author:** ![djandreau](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@djandreau](https://community.doppler.com/u/djandreau)\
**Post date:** [April 26, 2023, 2:23pm UTC](https://community.doppler.com/t/create-sync-api-not-working/1080/6 "2023-04-26T14:23:24Z")

</div>

Sure! I’ll try that through Postman! Just a heads up that the docs on the website don’t allow you to edit the data block at all or include that those pieces are needed.
