web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Create & Update Events through API

(0) ShareShare
ReportReport
Posted on by

Hello,

We have a custom web application that manage events and we try to make it sync with our D365 Marketing Event management system.

Events are created and managed in our custom web app.

Through API, we can retrieve all events of D365 :

GET https://xxx.dynamics.com/api/data/v9.2/msevtmgt_events?$select=msevtmgt_eventid,msevtmgt_name&$count=true

We can also retreive single event (filter by eventid) :

GET https://xxx.dynamics.com/api/data/v9.2/msevtmgt_events?$filter=(msevtmgt_eventid eq xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
or
GET https://xxx.dynamics.com/api/data/v9.2/msevtmgt_events(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

But we are unable to create or update an event :

PATCH https://xxx.dynamics.com/api/data/v9.2/msevtmgt_events(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
data = {
  "msevtmgt_name":"Test",
  "tc_venue":"My best place"
}

(same with data in JSON or form-data format)

We got this error :

The requested resource does not support http method 'PATCH'

And with POST method :

Unmapped Request found, PathTemplate:~/entityset/key, HtppVerb:POST

We try also through webhook :

POST https://xxxxxxxxxxxxxx.svc.dynamics.com/EvtMgmt/api/v2.0/events/{readableEventId}?emApplicationtoken=xxxxxxxxxx
data = {
    "eventName":"Test"
}

And we got 404 error... (same with PATCH method)

Maybe someone has an idea to help us ?

Thanks in advance,

Serge

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi databird,

    I created a web resource and insert it into form to test:

    <html>
    <head>
    <title>test</title>
    <script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>
    <meta><meta><meta><meta><meta><meta><meta></head>
    <body onload="updateEvent()" style="overflow-wrap: break-word;">
    <div>
    test
    </div>
    </body>
    <script type="text/javascript">

    function updateEvent(){
    data = {
    "msevtmgt_name":"Test",
    "msevtmgt_maximumeventcapacity":1
    }
    var uri = "">xxxxxxxx.crm.dynamics.com/.../msevtmgt_events(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)";
    var request = new XMLHttpRequest();
    request.open("PATCH", uri , true);
    request.setRequestHeader("OData-MaxVersion", "4.0");
    request.setRequestHeader("OData-Version", "4.0");
    request.setRequestHeader("Accept", "application/json");
    request.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    request.onreadystatechange = function () {
    if (request.readyState === 4) {
    console.log("success");
    }
    }
    request.send(JSON.stringify(data));
    }
    </script>
    </html>

    And it can work:

    pastedimage1634198554299v1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 184 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 125

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans