Add _User and Role
							
								
								
									
										25
									
								
								_User-and-Role.md
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
										
											
											
										
										
									
								
							
						
						
									
										25
									
								
								_User-and-Role.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
# Creating a new user
 | 
			
		||||
This is the body to include in the request:
 | 
			
		||||
```json
 | 
			
		||||
{
 | 
			
		||||
  "type": 0,
 | 
			
		||||
  "roleId": "admin_id",
 | 
			
		||||
  "name": "test12231",
 | 
			
		||||
  "password": "tesT1233-123",
 | 
			
		||||
  "privilege": {
 | 
			
		||||
    "all": false,
 | 
			
		||||
    "sites": [
 | 
			
		||||
      "66dcddb804aa0d2978cf145f"
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  "alert": false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
example:
 | 
			
		||||
```bash
 | 
			
		||||
curl "http://localhost:8000/api/v2/account/users" \
 | 
			
		||||
  -H 'content-type: application/json' \
 | 
			
		||||
  -H "X-API-Key: xmB6rIuSSL9MpZqY678pF" \
 | 
			
		||||
   --data-raw '{"type":0,"roleId":"admin_id","name":"test12231","password":"tesT1233-123","privilege":{"all":false,"sites":["66dcddb804aa0d2978cf145f"]},"alert":false}'
 | 
			
		||||
```
 | 
			
		||||
		Reference in New Issue
	
	Block a user