Using
Creates a new user with the `User` role. The API key is returned **only in this response** and is not stored afterward. Only admins may call this endpoint.
applies to v0.5.1POST
/store-api/auth/users
const url = 'https://example.com/store-api/auth/users';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"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://example.com/store-api/auth/users \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
Username (1-50 chars, only [a-zA-Z0-9_-]).
string
Example generated
{ "name": "example"}Responses
Section titled “Responses”User created. API key is shown once in the response.
Media typeapplication/json
object
api_key
required
API key (visible only once — cannot be retrieved afterward).
string
name
required
string
role
required
string
Example generated
{ "api_key": "example", "name": "example", "role": "example"}Invalid name
Media typetext/plain
string
User already exists
Media typetext/plain
string