# Login

Password-based login

## POST /api/v1/login

> Starts a session given a username/password and puts it into a cookie.

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"hq_login","description":"Password-based login"}],"servers":[{"url":"{server}","variables":{"server":{"default":"https://api.example.com"}}}],"security":[],"paths":{"/api/v1/login":{"post":{"description":"Starts a session given a username/password and puts it into a cookie.","operationId":"login","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/hq_LoginRequest"}}}},"responses":{"204":{"description":"Happy response. A set-cookie header will be present."}},"tags":["hq_login"]}}},"components":{"schemas":{"hq_LoginRequest":{"type":"object","description":"Bundles a username/password for authentication purposes.","properties":{"username":{"type":"string"},"password":{"type":"string"}},"required":["username","password"]}}}}
```
