# Cannot create a note-Engagement

**URL:** <https://community.hubspot.com/t/cannot-create-a-note-engagement/14115>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [April 25, 2019, 4:09pm UTC](https://community.hubspot.com/t/cannot-create-a-note-engagement/14115 "2019-04-25T16:09:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricky23](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ricky23/32/101739_2.png) [@ricky23](https://community.hubspot.com/u/ricky23)\
**Post date:** [April 25, 2019, 4:09pm UTC](https://community.hubspot.com/t/cannot-create-a-note-engagement/14115/1 "2019-04-25T16:09:07Z")

</div>

I am trying to create a note for a deal but I get this error message-

`FetchError: invalid json response body at https://api.hubapi.com/engagements/v1/engagements?hapikey=demo reason: Unexpected end of JSON input`

This is the code that I had written-

```auto
var form = {
 "engagement": {
 "active": true,
 "ownerId": 1,
 "type": "NOTE",
 "timestamp": 1409172644778
 },
 "associations": {
 "contactIds": [2],
 "companyIds": [],
 "dealIds": [],
 "ownerIds": []
 },
 "attachments": [
 {
 "id": 4241968539
 }
 ],
 "metadata": {
 "body": "note body"
 }
}

 url_deal='https://api.hubapi.com/engagements/v1/engagements?hapikey=demo';
 fetch(url_deal, {
 method: 'put',
 headers: {
 'Accept': 'application/json, text/plain, */*',
 'Content-Type': 'application/json'
 },
 body: JSON.stringify(form)
 }).then(res=>res.json())
 .then(res => context.log(res));

```

Any help on this matter would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [May 9, 2019, 1:36pm UTC](https://community.hubspot.com/t/cannot-create-a-note-engagement/14115/2 "2019-05-09T13:36:19Z")

</div>

Hey, @ricky23.

It looks like you found the issue in [this post](https://community.hubspot.com/t5/APIs-Integrations/Not-able-to-create-a-note-for-a-deal-Engagement/m-p/267047): You were using the `PUT` method when [this endpoint](https://developers.hubspot.com/docs/methods/engagements/create_engagement) only accepts `POST`.
