XF 2.2 API Get requests working but not Post


New member
Hello I am trying to update my profile via the API while using Node.js with Axios.

Here is my code, the header seems to be working just find and Axios objects seems to be creating properly.
const axios = require('axios');
const qs = require('qs');

const website = axios.create({
baseURL: 'http://website.com/api/',
headers: {
'XF-Api-Key': 'apikey',
'Content-Type': 'application/x-www-form-urlencoded',
'XF-Api-User': '1',

My get requests are working properly and returning the expected values
{ 'params': {'username': 'admin'} }
.then(response => {

However, when I attempt to do a post request I do not receive any errors but rather it just returns as if i had sent a get request.
{ 'params': {'visible': false}}
.then(response => {

Instead of returning the proper Response of, success true/false I am just getting the whole user json as if I had sent a get request. If you have any ideas of what I could be doing wrong please post below, thank you!