---
title: "Interface ICommandsClient"
slug: "sdk--stylelabs.m.sdk.clients.icommandsclient"
abstract: ""
---
# Interface ICommandsClient

Contains functionality to execute commands in Sitecore Content Hub.

## Namespace: StylelabsStylelabs.MSdkClients

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public interface ICommandsClient
```

## Methods

### ExecuteCommandAsync(string, string, JObject)

Executes an Sitecore Content Hub command.

#### Declaration

```csharp
Task<JToken> ExecuteCommandAsync(string @namespace, string command, JObject arguments = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | namespace | The name of the folder containing the command. |
| string | command | The name of the command. |
| JObject | arguments | The arguments of the command. If the command has no arguments, `null` can be specified. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>JToken | The result of the command. If the command has no result, `null` is returned. |

#### Exceptions

| Type | Condition |
| --- | --- |
| [NotFoundException](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.exceptions.notfoundexception.html) | The specified command cannot be found. |
