> For the complete documentation index, see [llms.txt](https://docs.cubu.com/guides/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cubu.com/guides/s2s-api-guide/agent-impersonation-api/clock-out.md).

# Clock-out

Clocks the user into work.

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

## URL

<pre><code><strong>POST: https://[base-url]/{applicationId}/agents/{userId}/actions/clockOut
</strong></code></pre>

## Headers

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

## Request Body

* **clockOutReason** (enum): Can be one of the following values: EndOfShift | Other
* **clockOutDescription** (text, max 200 chars): A free-text description of the clock-out reason. Required when clockOutReason is "Other".

## 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
