---
title: "Authenticate a user"
method: POST
path: "/authentication"
tags: ["Authentication"]
---

# Authenticate a user

`POST /authentication`

## Request

- Base URL: `https://api.worqhat.com`
- URL: `https://api.worqhat.com/authentication`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2/docs/authentication/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint is used to authenticate a user by providing their API Key. It verifies the provided API Key and returns the user's details upon successful authentication.

## Response `200`

User authenticated successfully

- object
  - `status` string: Status indicating the success of the authentication.
  - `userEmail` string: The email address of the authenticated user.
  - `userDisplayName` string: The display name of the authenticated user.
  - `orgName` string: The organization name associated with the authenticated user.
  - `processing_time` integer: The time taken to process the request, in milliseconds.
  - `processing_id` string: A universally unique identifier for the request. This can be used to track the request in the logs.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found
- `406`: Not Acceptable
- `500`: Internal Server Error

## Changes

- **2023-11-03** `4dfb38675161`: 1 info
  - the endpoint scheme security `bearerAuth` was added to the API
- **2023-10-20** `871850b7231f`: 6 warning, 15 info
  - removed the optional property `id` from the response with the `200` status
  - removed the optional property `message` from the response with the `200` status
  - removed the optional property `organization_name` from the response with the `200` status
  - removed the optional property `timestamp` from the response with the `200` status
  - …17 more
- **2023-08-15** `b5ffe2a9748f`: 5 breaking, 17 info
  - the response's body type changed from no type to `object` for status `200`
  - the response's body type changed from no type to `object` for status `400`
  - the response's body type changed from no type to `object` for status `401`
  - the response's body type changed from no type to `object` for status `404`
  - …18 more
- **2023-08-04** `be85a8f8fc8c`: 5 breaking, 15 warning
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `object` to no type for status `400`
  - the response's body type changed from `object` to no type for status `401`
  - the response's body type changed from `object` to no type for status `404`
  - …16 more
- **2023-08-04** `d6dbf089e00d`: 1 info
  - the endpoint scheme security `bearerAuth` was removed from the API

[Operation history](https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2/changes/authentication/post.md)

---

[API](https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2.md) - [All operations](https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2/llms.txt) - [OpenAPI document](https://skmtc.dev/worqhat/apis/worqhat-ai-api-endpoints-2/revisions/fc369f69a3e6?raw)
