Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Update campaigns

    Posted 04-01-2025 13:31

    I am needing to update the following names in about 1000 campaigns. My code is responding with a 204 while sending a PATCH to /api/v2/outbound/campaigns/{campaignId}.  Looking at the API resource for this API but is it true only a small set of names can be updated?  Is my only option to copy out the entire JSON of a campaign and PUT it all back in with the few updated values or is there something I am missing here?  Below are the names I am trying to update.

    Thanks in advanced!

    {
    "name":"03312025-Test-Campaign",
    "skipPreviewDisabled":"true",
    "previewTimeOutSeconds":"30",
    "callbackAutoAnswer":"true"
    }

    #API/Integrations

    ------------------------------
    Chad Meyer
    Global Voice Engineer
    ------------------------------


  • 2.  RE: Update campaigns

    Posted 04-01-2025 15:57

    Hello Chad,

    I've moved your thread to our Developer Community. Hopefully someone can take a look at your JSON and help you out soon.



    ------------------------------
    Jason Kleitz
    Online Community Manager/Moderator
    ------------------------------



  • 3.  RE: Update campaigns

    Posted 04-02-2025 08:19

    Hi Chad, the PUT endpoint is the correct way to accomplish what you are after.  The PATCH endpoint is fairly new, and was implemented for a specific purpose of updating a handful of fields.  These are the only values you can change via the PATCH endpoint: 

    {
      "outboundLineCount": 0,
      "abandonRate": 0,
      "maxCallsPerAgent": 0,
      "dynamicLineBalancingSettings": "",
      "queue": ""
    }

    You're correct when you say that your only option is to use the PUT endpoint, which yes does require sending the campaign JSON with the fields updated to your liking.

    Hope this helps!

    Chris



    ------------------------------
    Christopher Rowe
    Senior Manager, Principal Software Engineer
    ------------------------------



  • 4.  RE: Update campaigns

    Posted 04-02-2025 11:25

    Thank you Christopher.  Do you know if there is a roadmap to open this API to update all other names?



    ------------------------------
    Chad Meyer
    Global Voice Engineer
    ------------------------------



  • 5.  RE: Update campaigns

    Posted 04-02-2025 11:31

    As of now, I don't know of any plans to expand the PATCH endpoint.  I have reached out to the team that owns the campaign endpoints, and they will assess whether there are improvements to its current implementation.  Thanks!



    ------------------------------
    Christopher Rowe
    Senior Manager, Principal Software Engineer
    ------------------------------