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

# Authenticate User

`POST /api/v1/user/authenticate`

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
  - `authentication` string, required — The long-lived DealHub authentication key generated in the system settings screen.
  - `user_information` UserInformation, required — A list of fields required to create a user in DealHub.
    - `type` 'partner', required — The type of user, which must be 'partner'.
    - `user_id` string, required — The external ID of the user in the PRM system.
    - `login` string, required — Login of the user.
    - `email` string, email, required — The user's email to receive notifications.
    - `name` string, required — The user's first and last name.
    - `position` string — The user's position or job title.
    - `phone` string — The user's phone number.
    - `mobile` string — The user's mobile phone number.
    - `company` string — The user's company name.
    - `street` string — The user's street address.
    - `city` string — The user's city.
    - `state` string — The user's state or province.
    - `country` string — The user's country.
    - `postal_code` string — The user's postal code.
    - `profile_img` string, uri — A URL to the user's profile image.

## Response `200`

Authentication successful.

- AuthenticationResponse
  - `access_token` string — A one-time access token, which expires after 60 seconds.
  - `errors` object[]

## Other responses

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

---

[API](https://skmtc.net/dealhub/apis/quote-api.md) · [All operations](https://skmtc.net/dealhub/apis/quote-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dealhub/quote-api/versions/c30f5b9fbfab/schema)
