> 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/resolve-a-case.md).

# Resolve a Case

Resolves a Pending, Waiting, or Active case.

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

## URL

{% code overflow="wrap" %}

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

{% endcode %}

## Headers

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

## Request Body

N/A

## Response

#### On success -> 200

```json
{
    "caseTimestamp": "2024-05-16T09:46:08.801352Z"
}
```

#### Invalid case status -> 409, errorCode = 1001

The case status status must be Active, Pending, or Waiting.

#### The case is locked by another user --> 409, 1002

A user can resolve an Active case only when locking (serving) this case.

#### The case is assigned to another user --> 409, 1004

Users cannot resolve Pending or Waiting cases assigned to other users.
