---
title: "Authenticate User"
method: POST
path: "/api/v1/user/authenticate"
tags: ["CRM Integration"]
---

# Authenticate User

`POST /api/v1/user/authenticate`

## Request

- Base URL: `https://api.dealhub.io`
- URL: `https://api.dealhub.io/api/v1/user/authenticate`
- Auth: HTTP bearer

Authenticates a user from an external CRM and returns a short-lived (60 seconds) one-time access token. This is a server-to-server call that uses a long-lived secret token for authorization. If the user does not exist in DealHub, a new user with a `Sales` role is created.

## Request body

- AuthenticationRequest
  - `user_information` UserInformation, required
    - `external_user_id` string, required: CRM user ID (employee of the organization that integrates with DealHub).
    - `login` string: Login of the user. If a new user is created and login is not provided, the email will be used as the login.
    - `email` string, email, required: Primary email of the user.
    - `name` string, required: User's full name.
    - `position` string: The role of the user in the organization (job title).
    - `phone` string: User's phone number.
    - `mobile` string: User's mobile phone number.
    - `company` string: User's company name.
    - `street` string: Street name.
    - `city` string: City name.
    - `state` string: State name.
    - `country` string: Country name.
    - `postal_code` string: Postal code.
    - `user_manager_login` string: Login of the user's manager.

## Response `200`

Authentication successful.

- AuthenticationResponse
  - `access_token` string: A one-time access token, which expires after 60 seconds.
  - `dealhub_user_id` string: The unique identifier for the user in DealHub.
  - `errors` string[]

## Other responses

- `403`: Unauthenticated. The secret token is missing or invalid.

---

[API](https://skmtc.dev/dealhub/apis/crm-api.md) - [All operations](https://skmtc.dev/dealhub/apis/crm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dealhub/apis/crm-api/revisions/b9e9ae2a98b5?raw)
