All API requests require a session Cookie, which you get when you login to the app.
For mutative requests (DELETE, POST, PUT, PATCH), you need add a csrftoken to the cookie header and the same value need to be sent as a header X-CSRFToken.
Get a session cookie
To get a session cookie, you need to login, then get the cookie in sessionid.
Perform an authorized Request
Perform a mutative request
To perform a mutative request i.e POST, PUT, PATCH, DELETE requests, you need to follow 2 steps :
Obtain a csrf token :
Then add the csrftoken both in the cookie and in X-Csrftoken header :