> 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.md).

# Login

## POST /api/v1/employee/unsubscribe

> Sends to the employee a new company 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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"EmployeeMailUnsubscribeRequest":{"type":"object","properties":{"token":{"type":"string"},"comment":{"type":"string"}}}}},"paths":{"/api/v1/employee/unsubscribe":{"post":{"tags":["Login"],"description":"Sends to the employee a new company code","operationId":"unsubscribEmployee","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeMailUnsubscribeRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}}}}
```

## POST /api/v1/employee/unregister

> Disassociates a session from the employee, usually called from a device on 'logout' flow

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{}},"paths":{"/api/v1/employee/unregister":{"post":{"tags":["Login"],"description":"Disassociates a session from the employee, usually called from a device on 'logout' flow","operationId":"unregister","responses":{"200":{"description":"OK"}}}}}}
```

## POST /api/v1/employee/sendAccessLink

> Sends to the employee an access link

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{}},"paths":{"/api/v1/employee/sendAccessLink":{"post":{"tags":["Login"],"description":"Sends to the employee an access link","operationId":"sendAccessLink","responses":{"200":{"description":"OK"}}}}}}
```

## POST /api/v1/employee/resend/{email}

> Sends to the employee a new company 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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{}},"paths":{"/api/v1/employee/resend/{email}":{"post":{"tags":["Login"],"description":"Sends to the employee a new company code","operationId":"resendEmployeeInvitation","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}}}
```

## POST /api/v1/employee/remind

> Sends to the employee a new company 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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{}},"paths":{"/api/v1/employee/remind":{"post":{"tags":["Login"],"description":"Sends to the employee a new company code","operationId":"resendEmployeeInvitation_1","responses":{"200":{"description":"OK"}}}}}}
```

## POST /api/v1/employee/register

> Register the employee with a company code for a device

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"AbstractEmployeeRegistrationRequest":{"type":"object","properties":{"devicePlatform":{"$ref":"#/components/schemas/DevicePlatform"}}},"DevicePlatform":{"type":"string","description":"Platform or channel where the client runs (iOS, Android, Web, Slack, etc.)","enum":["IOS","IPADOS","ANDROID","WEB","WINDOWS","SLACK","MSTEAMS","MAIL","TELEGRAM","GOOGLE_CHAT","UNKNOWN"]},"EmployeeRegistrationResponse":{"type":"object","properties":{"sessionToken":{"type":"string"},"companyConfig":{"$ref":"#/components/schemas/EmployeeCompanyConfigurationDTO"}}},"EmployeeCompanyConfigurationDTO":{"type":"object","properties":{"alertDays":{"type":"array","items":{"type":"integer","format":"int32"}},"alertHour":{"type":"integer","format":"int32"},"alertMinute":{"type":"integer","format":"int32"},"enabledEmployeeFeatures":{"type":"integer","format":"int32"},"indexTerminology":{"$ref":"#/components/schemas/IndexTerminology"}}},"IndexTerminology":{"type":"string","description":"Vocabulary a company uses for its engagement index. HAPPINESS keeps the historical \"Happiness Index\" wording (default for existing companies); WELLBEING shows the \"Wellbeing Index\" wording. Presentation only — it does not change how the index is computed.","enum":["HAPPINESS","WELLBEING"]}}},"paths":{"/api/v1/employee/register":{"post":{"tags":["Login"],"description":"Register the employee with a company code for a device","operationId":"register_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbstractEmployeeRegistrationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeRegistrationResponse"}}}}}}}}}
```

## POST /api/v1/employee/login

> Sends a live updateTopic of employee info and gets the Employee data

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"EmployeeLoginRequest":{"type":"object","properties":{"timeZone":{"type":"string"},"language":{"type":"string"},"country":{"type":"string"},"appVersion":{"type":"string"}}},"EmployeeLoginResponse":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"companyName":{"type":"string"},"companyTimeZone":{"type":"string"},"appStyle":{"type":"string"},"hierarchyId":{"type":"string"},"hierarchyName":{"type":"string"},"configCompleted":{"type":"boolean"},"requireVote":{"type":"boolean"},"pendingAnnouncements":{"type":"boolean"},"pendingFeedback":{"type":"boolean"},"pendingConversations":{"type":"boolean","description":"Whether the user has pending conversations to show on login (open, with the last message from the company side, not the employee's own). When true, fetch the list from GET /v1/employee/conversations/{employeeId}/pending."},"conversationsDisplayMoment":{"$ref":"#/components/schemas/ConversationsDisplayMoment","description":"When pendingConversations is true, whether the on-login conversations list should be shown BEFORE_VOTE or AFTER_VOTE. Null when the on-login conversations feature is disabled."},"requireFirstTimeCommentFilter":{"type":"boolean"},"name":{"type":"string"},"profileImagePath":{"type":"string"},"role":{"type":"string","enum":["ADVISOR","ADMIN","RESPONSIBLE","PUBLIC","MANAGER","EMPLOYEE"]},"debug":{"type":"boolean"},"canResetProfile":{"type":"boolean"},"canManage":{"type":"boolean"},"canBlockUsers":{"type":"boolean"},"hasHFMe":{"type":"boolean","deprecated":true},"canHFMe":{"type":"boolean"},"canRegisterTime":{"type":"boolean"},"hfMeActivated":{"type":"boolean"},"canUseHero":{"type":"boolean"},"rewardsEnabled":{"type":"boolean"},"podiumEnabled":{"type":"boolean","description":"Whether the monthly rewards podium is enabled (rewards enabled AND the podium turned on). Gates the podium tab independently of the rest of the rewards UI."},"canManageHierarchy":{"type":"boolean"},"externalId":{"type":"string"},"votingFlow":{"type":"string","enum":["QUESTIONS","ANNOUNCEMENTS"]},"indexTerminology":{"$ref":"#/components/schemas/IndexTerminology"}}},"ConversationsDisplayMoment":{"type":"string","enum":["BEFORE_VOTE","AFTER_VOTE"]},"IndexTerminology":{"type":"string","description":"Vocabulary a company uses for its engagement index. HAPPINESS keeps the historical \"Happiness Index\" wording (default for existing companies); WELLBEING shows the \"Wellbeing Index\" wording. Presentation only — it does not change how the index is computed.","enum":["HAPPINESS","WELLBEING"]}}},"paths":{"/api/v1/employee/login":{"post":{"tags":["Login"],"description":"Sends a live updateTopic of employee info and gets the Employee data","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeLoginRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeLoginResponse"}}}}}}}}}
```

## POST /api/v1/employee/invitation/{email}

> Allows employees to self invite

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"EmployeeAutoInviteRequest":{"type":"object","properties":{"autoInviteToken":{"type":"string"}}}}},"paths":{"/api/v1/employee/invitation/{email}":{"post":{"tags":["Login"],"description":"Allows employees to self invite","operationId":"autoInviteEmployee","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeAutoInviteRequest"}}}},"responses":{"200":{"description":"OK"}}}}}}
```

## POST /api/v1/employee/check/{emailOrId}

> Checks if the following mail exists on Happyforce

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"EmployeeCheckUserRequest":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"key":{"type":"string"}}},"EmployeeCheckUserResponse":{"type":"object","properties":{"valid":{"type":"boolean"},"accountLocked":{"type":"boolean"},"companyBlocked":{"type":"boolean"},"userType":{"$ref":"#/components/schemas/UserType"}}},"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/employee/check/{emailOrId}":{"post":{"tags":["Login"],"description":"Checks if the following mail exists on Happyforce","operationId":"checkMail","parameters":[{"name":"emailOrId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeCheckUserRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeCheckUserResponse"}}}}}}}}}
```

## GET /api/v1/employee/invitation/info/{token}

> Get's some info of a company for a given token

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"CompanyInfoDTO":{"type":"object","description":"Company info: name and image path.","properties":{"companyName":{"type":"string","description":"Company name"},"companyImagePath":{"type":"string","description":"URL or path to the company image"}}}}},"paths":{"/api/v1/employee/invitation/info/{token}":{"get":{"tags":["Login"],"description":"Get's some info of a company for a given token","operationId":"getCompanyInfo","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyInfoDTO"}}}}}}}}}
```

## GET /api/v1/employee/employee/info/{id}

> Get's some info of a company for a given token

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"EmployeeDataInfo":{"type":"object","properties":{"email":{"type":"string"},"companyName":{"type":"string"},"companyId":{"type":"string"},"sessionToken":{"type":"string"},"language":{"type":"string"}}}}},"paths":{"/api/v1/employee/employee/info/{id}":{"get":{"tags":["Login"],"description":"Get's some info of a company for a given token","operationId":"getEmployeeInfo","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeDataInfo"}}}}}}}}}
```
