diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php
index 5eeca63a4aacf32bddfe8e7d2ec834801e7399c2..b1014b9171a25c68a8a3ffeb05ed7a1c6a629492 100644
--- a/htdocs/comm/action/class/api_agendaevents.class.php
+++ b/htdocs/comm/action/class/api_agendaevents.class.php
@@ -289,7 +289,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];