Help

API curl error - "error":{"type":"INVALID_REQUEST_BODY","message":"Could not parse request body"}

646 0
cancel
Showing results for 
Search instead for 
Did you mean: 
jamesodo
4 - Data Explorer
4 - Data Explorer

Hi there, I'm receiving the following error when attempting to register a webhook via curl to notify when there is a new entry in a table.  "error":{"type":"INVALID_REQUEST_BODY","message":"Could not parse request body"}

Here is the code that I'm attempting to execute:

 

curl -X POST "https://api.airtable.com/v0/bases/MYBASEID/webhooks" -H "Authorization: Bearer MYTOKEN" -H "Content-Type: application/json" --data '{
    body {
    "notificationUrl": "https://MYURL",
    "specification": {
      "options": {
        "filters": {
          "dataTypes": [
            "tableData"
          ],
          "changeTypes": [
            "add"
          ],
          "recordChangeScope": "MYTABLE"
        }
          "includes": {
            "includeCellValuesInFieldIds": [
            "MYFIELD"
      ]
    }
      
      }
    }
  }
  
}'

 

same goes for

curl -X POST "https://api.airtable.com/v0/bases/MYBASE/webhooks" -H "Authorization: Bearer MYTOKEN" -H "Content-Type: application/json" --data '{
    "notificationUrl": "https://MYURL",
    "specification": {                                           
      "options": {
        "filters": {
          "dataTypes": [
            "tableData"
          ],           
          "changeTypes": [
            "add"
          ],     
          "recordChangeScope": "MYTABLE"
        }                                         
          "includes": {
            "includeCellValuesInFieldIds": [
            "MYFIELD"
      ]                        
    }
      
      }
    }
  }'

 Any ideas?

{"error":{"type":"INVALID_REQUEST_BODY","message":"Could not parse request body"}}
0 Replies 0