# Joplin API "Method not allowed"

**URL:** <https://discourse.joplinapp.org/t/joplin-api-method-not-allowed/758>\
**Category:** Development\
**Created:** [2 October 2018 10:11 UTC](https://discourse.joplinapp.org/t/joplin-api-method-not-allowed/758 "2018-10-02T10:11:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [2 October 2018 10:11 UTC](https://discourse.joplinapp.org/t/joplin-api-method-not-allowed/758/1 "2018-10-02T10:11:43Z")

</div>

@laurent

I try to submit update of note with PATCH or PUT method but I get that

```auto
curl -i -X PATCH -d title="NEW TITLE" -d id="6970d62cf2af43e49405d2041ce3d3bf" http://127.0.0.1:41184/notes\?token=_my_wonrderful_long_joplin_token
HTTP/1.1 405 Method Not Allowed
Content-Type: text/plain
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, PATCH, DELETE
Access-Control-Allow-Headers: X-Requested-With,content-type
Date: Tue, 02 Oct 2018 10:05:41 GMT
Connection: keep-alive
Transfer-Encoding: chunked

```

and same with PUT method

What did I miss ?

otherwise, GET/DELETE/POST work great

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [2 October 2018 10:32 UTC](https://discourse.joplinapp.org/t/joplin-api-method-not-allowed/758/2 "2018-10-02T10:32:50Z")

</div>

PATCH is not supported, but PUT is, however you need to specify the note ID in the URL.

Also you need to pass it a JSON object with the properties you want to change:

```auto
curl -i -X PUT --data '{ "title":"NEW TITLE" }' http://127.0.0.1:41184/notes/6970d62cf2af43e49405d2041ce3d3bf\?token=_my_wonrderful_long_joplin_token

```

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [2 October 2018 10:57 UTC](https://discourse.joplinapp.org/t/joplin-api-method-not-allowed/758/3 "2018-10-02T10:57:11Z")

</div>

ok, but not ok 🙂

```auto
curl -i -X PUT --data '{"title": "NEW TITLE"}' 'http://127.0.0.1:41184/notes/6970d62cf2af43e49405d2041ce3d3bf?token=a long token'
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, PATCH, DELETE
Access-Control-Allow-Headers: X-Requested-With,content-type
Date: Tue, 02 Oct 2018 10:52:13 GMT
Connection: keep-alive
Transfer-Encoding: chunked

Unexpected end of JSON input

```

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [2 October 2018 11:42 UTC](https://discourse.joplinapp.org/t/joplin-api-method-not-allowed/758/4 "2018-10-02T11:42:44Z")

</div>

Indeed, that looks like an application error. Is there anything in any of the logs?

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [2 October 2018 12:14 UTC](https://discourse.joplinapp.org/t/joplin-api-method-not-allowed/758/5 "2018-10-02T12:14:55Z")

</div>

in log-clipper.txt there is just the `PUT` line as this one

```auto
2018-10-02 12:55:27: "Request: PUT /notes/6970d62cf2af43e49405d2041ce3d3bf?token=<joplin token>"

```

I have nothing else ☹

Do you want an issue on github for that?

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [4 October 2018 07:04 UTC](https://discourse.joplinapp.org/t/joplin-api-method-not-allowed/758/6 "2018-10-04T07:04:55Z")

</div>

That will be fixed in the next release 🙂
