saveUser RestAPI Error

Hello.
I want to create new user, but I have this error.

P.S.
My English is suck, I warn u :smiley:

Hi,

it seems that the data format isnโ€™t right. Please try:

?user[name]=Vasya&user[password]=123&...

Greets,
Artur

1 Like

Check out the API documentation. It looks like youโ€™re sending all your data in the query string of a POST request instead of in the body of the request.

fetch('/api/cockpit/saveUser?token=xxtokenxx', {
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
        user: {...} // user data (user, name, email, active, group)
    })
})