From ab39ebc5126cfe7665b3f61d18725348b6c4da82 Mon Sep 17 00:00:00 2001 From: Ske Date: Mon, 3 Feb 2020 14:47:08 +0100 Subject: [PATCH] Document Content-Type requirement for API --- docs/3-api-documentation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/3-api-documentation.md b/docs/3-api-documentation.md index 48553241..f8e8bed2 100644 --- a/docs/3-api-documentation.md +++ b/docs/3-api-documentation.md @@ -13,6 +13,8 @@ Endpoints will always return all fields, using `null` when a value is missing. O missing fields from the JSON request will be ignored and preserved as is, but on `POST` endpoints will be set to `null` or cleared. +Endpoints taking JSON bodies (eg. most `PATCH` and `PUT` endpoints) require the `Content-Type: application/json` header set. + ## Authentication Authentication is done with a simple "system token". You can get your system token by running `pk;token` using the Discord bot, either in a channel with the bot or in DMs. Then, pass this token in the `Authorization` HTTP header