# Clock-in

Clocks the user into work.

{% hint style="info" %}
This endpoint requires the **Agent Impersonator** rol&#x65;**.**
{% endhint %}

## URL

```
POST: https://[base-url]/{applicationId}/agents/{userId}/actions/clockIn
```

## Headers

```
Authorization: Bearer <accessToken>
```

## Request Body

* **unitId** (GUID, required): The current unit the user is in.

## Response

#### Success -> 200

#### Invalid access token --> 401

#### The "Track Agents Status" feature is disabled -> 403

#### The user status is not "Away" -> 409, 3301

#### The unit is not in the current organization, or the user is not allowed to access the selected unit --> 403


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cubu.com/guides/s2s-api-guide/agent-impersonation-api/clock-in.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
