title: Http Bad Request - The request sent by the client was syntactically incorrect
body: <p>My POST call to this API is giving me a 400. It is giving a syntax error even though the serialized DTO object is correct. The requestbody is using correct fieldnames which are corresponding to fieldnames in class.</p>
  
  <p>Also the ApI is not even getting hit.</p>
  
  <p>In headers, content-type : application/json</p>
  
  <p>My API is :</p>
  
  <pre><code>@RequestMapping(value = "/surveymonkey/webhook/receiver", method = RequestMethod.POST)
      @ResponseBody
      public void respondToSurveyMonkeyPOSTCall(@RequestBody NPSWebhookRequestBody npsWebhookRequestBody, HttpServletRequest request) {
  
  
          String objectType = null;
  
          String objectId =null;
  
          if(npsWebhookRequestBody!=null){
  
              objectType = npsWebhookRequestBody.getObjectType();
  
              objectId = npsWebhookRequestBody.getObjectId();
          }
  
          service.getCall(objectType,objectid
      }
  </code></pre>
  
  <p>My DTO class which is serialized to requestbody is :</p>
  
  <pre><code>package com.lk.scheduler.beans;
  
  import com.google.gson.annotations.SerializedName;
  
  public class NPSWebhookRequestBody {
  
      @SerializedName("name")
      String name;
  
      @SerializedName("event_id")
      String eventId;
  
      @SerializedName("object_type")
      String objectType;
  
      @SerializedName("object_id")
      String objectId;
  
      @SerializedName("event_type")
      String eventType;
  
      @SerializedName("event_datetime")
      String eventDatetime;
  
      /**
       * @return the name
       */
      public String getName() {
          return name;
      }
  
      /**
       * @param name the name to set
       */
      public void setName(String name) {
          this.name = name;
      }
  
      /**
       * @return the eventId
       */
      public String getEventId() {
          return eventId;
      }
  
      /**
       * @param eventId the eventId to set
       */
      public void setEventId(String eventId) {
          this.eventId = eventId;
      }
  
      /**
       * @return the objectType
       */
      public String getObjectType() {
          return objectType;
      }
  
      /**
       * @param objectType the objectType to set
       */
      public void setObjectType(String objectType) {
          this.objectType = objectType;
      }
  
      /**
       * @return the objectId
       */
      public String getObjectId() {
          return objectId;
      }
  
      /**
       * @param objectId the objectId to set
       */
      public void setObjectId(String objectId) {
          this.objectId = objectId;
      }
  
      /**
       * @return the eventType
       */
      public String getEventType() {
          return eventType;
      }
  
      /**
       * @param eventType the eventType to set
       */
      public void setEventType(String eventType) {
          this.eventType = eventType;
      }
  
      /**
       * @return the eventDatetime
       */
      public String getEventDatetime() {
          return eventDatetime;
      }
  
      /**
       * @param eventDatetime the eventDatetime to set
       */
      public void setEventDatetime(String eventDatetime) {
          this.eventDatetime = eventDatetime;
      }
  
  
  
  }
  </code></pre>
  
  <p>Postman call which is giving 400 :</p>
  
  <p><a href="https://i.stack.imgur.com/ioAa6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ioAa6.png" alt="enter image description here"></a></p>
  
  <p>P.S. : HttpGET and HttpHEAD call to this API is working.</p>