diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php
index 376df238a95abf7a89fcc4aaedd1c0e111e07aff..cf97ae357f37efa983400dd933bc39ec1b1bb34e 100644
--- a/htdocs/comm/action/class/api_agendaevents.class.php
+++ b/htdocs/comm/action/class/api_agendaevents.class.php
@@ -290,7 +290,7 @@ class AgendaEvents extends DolibarrApi
     function _validate($data)
     {
         $event = array();
-        foreach (Events::$FIELDS as $field) {
+        foreach (AgendaEvents::$FIELDS as $field) {
             if (!isset($data[$field]))
                 throw new RestException(400, "$field field missing");
             $event[$field] = $data[$field];