# userRole

## POST /info

> Request user role.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid API - info/userRole","version":"1.0.0"},"tags":[{"name":"userRole"}],"servers":[{"url":"https://api.hyperliquid.xyz","description":"Mainnet"},{"url":"https://api.hyperliquid-testnet.xyz","description":"Testnet"}],"paths":{"/info":{"post":{"tags":["userRole"],"description":"Request user role.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"description":"Type of request.","enum":["userRole"]},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"User address."}},"required":["type","user"],"description":"Request user role."}}},"required":true},"responses":{"200":{"description":"User role.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"role":{"enum":["missing","user","vault"],"description":"Role identifier."}},"required":["role"]},{"type":"object","properties":{"role":{"description":"Role identifier.","enum":["agent"]},"data":{"type":"object","properties":{"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"Master account address associated with the agent."}},"required":["user"],"description":"Details for agent role."}},"required":["role","data"]},{"type":"object","properties":{"role":{"description":"Role identifier.","enum":["subAccount"]},"data":{"type":"object","properties":{"master":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"Master account address associated with the sub-account."}},"required":["master"],"description":"Details for sub-account role."}},"required":["role","data"]}],"description":"User role."}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"null"}}}}}}}}}
```
