Create a non-admin native user (DEVELOPMENT MODE ONLY)
POST
/users
const url = 'https://antimony.example.com/api/users';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"collections":["example"],"password":"example","username":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://antimony.example.com/api/users \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "collections": [ "example" ], "password": "example", "username": "example" }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”The user
Media typeapplication/json
object
collections
Array<string>
password
required
string
username
required
string
Example generated
{ "collections": [ "example" ], "password": "example", "username": "example"}Responses
Section titled “Responses”The ID of the newly created user
Media typeapplication/json
object
payload
string
Example generated
{ "payload": "example"}The credentials were empty or the username is taken
Media typeapplication/json
object
code
integer
message
string
Example generated
{ "code": 1, "message": "example"}The user isn’t authorized
Media typeapplication/json
The user is not an admin
Media typeapplication/json
object
code
integer
message
string
Example generated
{ "code": 1, "message": "example"}The provided access token is not valid
Media typeapplication/json