Attachments API 400ing due to "invalid UUID" but it is valid?

I’m a little stumped.

I’m calling a POST with a body of {"type":"comment","message":"hello world!","taskId":"2b569eda-525b-454f-a352-535addb6453b"} and it’s complaining that the taskId is an invalid format. Here’s the result I’m getting:

{"error": {"name": "ServerError", "type": "badRequest-
attributeMalformed", "status" : 400, "message": "taskId must
be a UUID", "attributes": ["taskId"], "raw": true}}

Anyone else run into this? My auth token is fine because I’m able to do other requests successfully. The taskId UUID is correct (which I verified by inspecting the response in the browser’s devtools)

Hey Justin,

Is it normal your body starts with a double {?
You can also inspect Height itself to check how it sends messages, as it uses the same API (different hostname, but same API layer)

That was just a copy paste error on my part. I was looking to see how it’s done in height itself. It uses a PUT request to /activities with what I assume is a client generated UUID for the activities ID. I’ll give it a try though.

Ahh, I figured it out. You have to explicitly set the content-type to application/json