Run in Apifox
Create an admin User. The user has the same privileges as all admin users, and will be able to authenticate and perform admin functionalities right after creation.
Request Body Params application/json
{
"email" : "user@example.com" ,
"first_name" : "string" ,
"last_name" : "string" ,
"password" : "pa$$word" ,
"role" : "admin"
}
Request Code Samples
curl --location --request POST 'https://api.medusa-commerce.com/admin/users' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com",
"first_name": "string",
"last_name": "string",
"password": "pa$$word",
"role": "admin"
}'
Responses application/json Generate Code
{
"user" : {
"id" : "usr_01G1G5V26F5TB3GPAPNJ8X1S3V" ,
"email" : "user@example.com" ,
"first_name" : "Levi" ,
"last_name" : "Bogan" ,
"api_token" : null ,
"created_at" : "2019-08-24T14:15:22Z" ,
"updated_at" : "2019-08-24T14:15:22Z" ,
"deleted_at" : "2019-08-24T14:15:22Z" ,
"role" : "member" ,
"metadata" : {
"car" : "white"
}
}
}
Modified at 2023-10-08 12:50:29