A call to create a timeline event returns ` 405 Method Not Allowed`


I am trying to follow closely the API for creating timeline events, with no success.

Here is the example from the documentation that I am trying to follow:

curl -X PUT -H "Content-Type: application/json" \
-H "Authorization: Bearer CJSP5qf1KhICAQEYs-gDIIGOBii1hQIyGQAf3xBKmlwHjX7OIpuIFEavB2-qYAGQsF4" \
-d '
  "id": "001-001001",
  "eventTypeId": <<eventTypeId>>,
  "webinarName": "A Test Webinar",
  "webinarId": "001001",
  "email": "a.test.contact@email.com"
}' \

and here is the command I execute:

curl -isb -X PUT -H "Content-Type: application/json" \
-H "Authorization: Bearer <redacted>" \
-d '{  "id": "001-001aasdfas001",  "eventTypeId": "16187",  "email": "konstantin@schubert.fr"}' \

But all I get is

HTTP/1.1 405 Method Not Allowed
Access-Control-Allow-Credentials: false
Content-Length: 0
Date: Fri, 03 Feb 2017 14:46:34 GMT
Connection: close

which is confusing to me, because clearly, I am using PUT ?

Why could this not be working?


In case it adds anything, my developer account is https://app.hubspot.com/developers/2879096/


Hi @KonstantinSchubert

Trying this on my system, there seems to be some problem with -isb -X, specifically with the b option. It’s treating the -X as the data for that option, so curl ends up making two requests, one to PUT/ (which fails since it doesn’t resolve), with the second one being POST /integrations/v1/33461/timeline/event HTTP/1.1, which is why you’re seeing the 405 error.

If you remove the b option (the request shouldn’t require any cookie data), you should be able to get the correct response.