{"openapi":"3.0.1","info":{"title":"Login API","version":"5.0.0"},"servers":[{"url":"https://{api_url}/api/v5","variables":{"api_url":{"default":"example.jrni.com"}}}],"security":[{"APIKeyHeader":[]}],"tags":[{"name":"Login"}],"paths":{"/login":{"post":{"tags":["Login"],"summary":"Login","description":"Creates an auth token","operationId":"postLogin","requestBody":{"content":{"application/json":{"schema":{"required":["email","password"],"properties":{"email":{"type":"string","example":"jdoe@example.com"},"password":{"type":"string","example":"letmein"}}}}},"required":true},"responses":{"201":{"description":"Success","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Login"}}}}}}},"/login/admin":{"post":{"tags":["Login"],"summary":"Admin Login","description":"Creates an auth token with admin role","operationId":"postAdminLogin","requestBody":{"content":{"application/json":{"schema":{"required":["email","password"],"properties":{"email":{"type":"string","example":"jdoe@example.com"},"password":{"type":"string","example":"letmein"}}}}},"required":true},"responses":{"201":{"description":"Success","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Login"}}}}}}},"/login/admin/{company_id}":{"post":{"tags":["Login"],"summary":"Company Admin Login","description":"Creates an auth token with admin role. Use this endpoint if user is associated with multiple companies.","operationId":"postCompanyAdminLogin","parameters":[{"name":"company_id","in":"path","description":"Company ID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"required":["email","password"],"properties":{"email":{"type":"string","example":"jdoe@example.com"},"password":{"type":"string","example":"letmein"}}}}},"required":true},"responses":{"201":{"description":"Success","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Login"}}}}}}}},"components":{"schemas":{"Login":{"type":"object","properties":{"email":{"type":"string","example":"jdoe@example.com"},"auth_token":{"type":"string","example":"1234"},"company_id":{"type":"string","example":"1"},"path":{"type":"string"},"role":{"type":"string","example":"admin"}}}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","name":"App-Id","in":"header"}}},"x-readme":{"explorer-enabled":true,"proxy-enabled":true}}