> For the complete documentation index, see [llms.txt](https://api-docs.myhappyforce.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.myhappyforce.com/docs/api-reference/login-resource.md).

# Login Resource

## POST /api/v1/company/sendAccessLink

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"AccountRequest":{"type":"object","properties":{"email":{"type":"string"},"expiredToken":{"type":"string"}}}}},"paths":{"/api/v1/company/sendAccessLink":{"post":{"tags":["login-resource"],"operationId":"sendAccessLink_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}}}}
```

## POST /api/v1/company/register

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"UserRegistrationRequestDTO":{"type":"object","properties":{"name":{"type":"string"},"companyName":{"type":"string"},"email":{"type":"string"},"language":{"type":"string"}}},"UserRegistrationResponseDTO":{"type":"object","properties":{"accountCreated":{"type":"boolean"}}}}},"paths":{"/api/v1/company/register":{"post":{"tags":["login-resource"],"operationId":"register_2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegistrationRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserRegistrationResponseDTO"}}}}}}}}}
```

## POST /api/v1/company/logout

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}}},"paths":{"/api/v1/company/logout":{"post":{"tags":["login-resource"],"operationId":"logout","responses":{"200":{"description":"OK"}}}}}}
```

## POST /api/v1/company/login

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"LoginResponse":{"type":"object","properties":{"sessionId":{"type":"string"},"companyUser":{"$ref":"#/components/schemas/UserDTO"}}},"UserDTO":{"type":"object","properties":{"id":{"type":"string"},"rememberMe":{"type":"boolean"},"multipleCompanies":{"type":"boolean"},"pureAdvisor":{"type":"boolean"},"name":{"type":"string"},"role":{"type":"string","enum":["ADVISOR","ADMIN","RESPONSIBLE","PUBLIC","MANAGER","EMPLOYEE"]},"managementFocus":{"$ref":"#/components/schemas/ManagementFocus"},"profileImagePath":{"type":"string"},"email":{"type":"string"},"mailStatus":{"type":"string","enum":["SENT","DELIVERED","OPEN","DEFERRAL","HARDBOUNCE","SOFTBOUNCE","SPAM","UNSUB","REJECTED","DELAYED","OTHER"]},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"companyId":{"type":"string"},"language":{"type":"string"},"mailNotificationSettings":{"type":"array","items":{"$ref":"#/components/schemas/UserNotificationSetting"},"uniqueItems":true},"pushNotificationSettings":{"type":"array","items":{"$ref":"#/components/schemas/UserNotificationSetting"},"uniqueItems":true},"addedOn":{"type":"string","format":"date-time"},"requiresPasswordChange":{"type":"boolean"}}},"ManagementFocus":{"type":"string","description":"The focus/interest a user has when consuming their report","enum":["TEAM_LEAD","MANAGER_OF_MANAGERS","EXECUTIVE","PEOPLE_ADVISOR","PEOPLE_EXECUTIVE","ACCOUNT_ADMIN","GENERIC"]},"UserNotificationSetting":{"type":"object","properties":{"type":{"type":"string","enum":["PRIVATE_COMMENT_RECEIVED","INAPPROPRIATE_COMMENT_RECEIVED","COMMENT_RECEIVED","QUESTION_FINISHED"]},"frequency":{"type":"string","enum":["IMMEDIATELY","NEVER"]}}}}},"paths":{"/api/v1/company/login":{"post":{"tags":["login-resource"],"operationId":"login_1","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}}}}}}}
```

## POST /api/v1/company/forget

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"AccountRequest":{"type":"object","properties":{"email":{"type":"string"},"expiredToken":{"type":"string"}}}}},"paths":{"/api/v1/company/forget":{"post":{"tags":["login-resource"],"operationId":"forget","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}}}}
```

## GET /api/v1/company/me

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"UserMeDTO":{"type":"object","properties":{"date":{"type":"string","format":"date-time"}}}}},"paths":{"/api/v1/company/me":{"get":{"tags":["login-resource"],"operationId":"me","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserMeDTO"}}}}}}}}}
```

## GET /api/v1/company/hptoken/{code}

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"HPTokenDTO":{"type":"object","properties":{"token":{"type":"string"}}}}},"paths":{"/api/v1/company/hptoken/{code}":{"get":{"tags":["login-resource"],"operationId":"getHpToken","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/HPTokenDTO"}}}}}}}}}
```

## GET /api/v1/company/check/{email}

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"CheckMailResponse":{"type":"object","properties":{"valid":{"type":"boolean"},"userType":{"$ref":"#/components/schemas/UserType"},"allowedLoginMethods":{"type":"array","items":{"type":"string","enum":["USER_PASSWORD","USER_ACCESS_LINK","GOOGLE_AUTH","MICROSOFT_AUTH","HP_AUTH","SSO_SAML2","SSO_OIDC"]},"uniqueItems":true},"ssoRedirectUrl":{"type":"string"},"ssoMandatory":{"type":"boolean"}}},"UserType":{"type":"string","description":"Type of user in the system, either an employee or a company user (admin, manager, etc).","enum":["EMPLOYEE","COMPANY_USER"]}}},"paths":{"/api/v1/company/check/{email}":{"get":{"tags":["login-resource"],"operationId":"checkMail_1","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CheckMailResponse"}}}}}}}}}
```
