---
title: "Assets client"
slug: "assets-client-1523406"
abstract: "Overview of the Assets client used for asset-specific operations, including how to manage the life cycle status and public links."
---
# Assets client

The SDK offers an `Assets client` to provide asset-specific operations.

> [!note]
> The `client` variable in the following code examples refers to the `IMClient` instance. When using the Web SDK, the variable name can be chosen freely, but it is also called `client` at instantiation in the documentation.

## Managing the final life cycle status

The final life cycle status of an asset can be managed using the `FinalLifeCycleManager` of the client.

To modify the life cycle status, the following methods are available:

- `ApproveAsync`: moves the asset to the *approved* state.
- `ArchiveAsync`: moves the asset to the *archived* state.
- `DirectPublishAsync`: moves the asset to the *approved* state.
- `RejectAsync`: moves the asset to the *rejected* state (with an optional reason for rejection).
- `RestoreAsync`: moves the asset to the *approved* state.
- `RestoreFromDeleteAsync`: restores a soft-deleted asset to the state it was in before deletion.
- `SoftDeleteAsync`: moves the asset to the *deleted* state. A soft-deleted asset can be restored to its previous state using `RestoreFromDeleteAsync`.
- `SubmitAsync`: moves the asset to the *underreview* state.

These methods require the id of an existing asset. When the provided id is not that of an Asset entity, or when the transition from the current state to the requested state is not allowed, the client throws a `ForbiddenException`.

For example, approve the asset with the id 1000:

```shell
await MClient.Assets.FinalLifeCycleManager.ApproveAsync(1000);

```

Additionally, it is easy to get the entity id of a final life cycle status entity (this works with an enum constant or with the status string value):

```shell
long? id = await MClient.Assets.FinalLifeCycleManager.GetFinalLifeCycleStatusIdAsync(FinalLifeCycleStatus.StatusValues.Approved);

```

## Create a public link for an asset

For example, the following snippet creates a public link for the `preview` rendition of the asset with id `12345`:

```shell
var publicLinkId = await MClient.Assets.CreatePublicLinkAsync(12345, "preview");

```

Additional arguments allow you to specify the expiration date and relative URL for the public link.