> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.Agents.IMessagingAgent

# \<a id="SuperOffice\_WebApi\_Agents\_IMessagingAgent">\</a> Interface IMessagingAgent

Namespace: [SuperOffice.WebApi.Agents](SuperOffice.WebApi.Agents.md)\
Assembly: SuperOffice.WebApi.dll

SMS and other external messaging systems
\<p>\</p>
\<b>Online Restricted:\</b> This agent is not available in Online by default. Access must be requested specifically when app is registered.

```csharp theme={null}
public interface IMessagingAgent : IAgentBase, IDisposable
```

#### Implements

[IAgentBase](SuperOffice.WebApi.Agents.IAgentBase.md),
[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_IMessagingAgent\_CreateMessageAsync\_SuperOffice\_WebApi\_Data\_IncomingMessage\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateMessageAsync(IncomingMessage, RequestOptions)

Create a new message and insert it in the message queue. (inbox)
\<p>\</p>
\<b>Online Restricted:\</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

```csharp theme={null}
Task CreateMessageAsync(IncomingMessage incomingMessage, RequestOptions requestOptions = null)
```

#### Parameters

`incomingMessage` [IncomingMessage](SuperOffice.WebApi.Data.IncomingMessage.md)

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_IMessagingAgent\_GetDeliveryStatusAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetDeliveryStatusAsync(int\[], RequestOptions)

Get delivery status
\<p>\</p>
\<b>Online Restricted:\</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

```csharp theme={null}
Task<MessageDeliveryStatus[]> GetDeliveryStatusAsync(int[] messagingIds, RequestOptions requestOptions = null)
```

#### Parameters

`messagingIds` [int](https://learn.microsoft.com/dotnet/api/system.int32)\[]

Array of messaging ids.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[MessageDeliveryStatus](SuperOffice.WebApi.Data.MessageDeliveryStatus.md)\[]\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_IMessagingAgent\_GetPluginsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetPluginsAsync(RequestOptions)

\<p>\</p>
\<b>Online Restricted:\</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

```csharp theme={null}
Task<ProviderInfo[]> GetPluginsAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ProviderInfo](SuperOffice.WebApi.Data.ProviderInfo.md)\[]\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_IMessagingAgent\_SendMessagesAsync\_System\_String\_SuperOffice\_WebApi\_Data\_OutgoingMessage\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SendMessagesAsync(string, OutgoingMessage\[], RequestOptions)

Send an array of messages
\<p>\</p>
\<b>Online Restricted:\</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

```csharp theme={null}
Task<MessageDeliveryStatus[]> SendMessagesAsync(string plugin, OutgoingMessage[] outgoingMessages, RequestOptions requestOptions = null)
```

#### Parameters

`plugin` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of plugin to use.

`outgoingMessages` [OutgoingMessage](SuperOffice.WebApi.Data.OutgoingMessage.md)\[]

Array of outgoing messages you want to send.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[MessageDeliveryStatus](SuperOffice.WebApi.Data.MessageDeliveryStatus.md)\[]\&gt;

Array of MessageDeliveryStatus. Length of the array is equal to the number of outgoing messages.

### \<a id="SuperOffice\_WebApi\_Agents\_IMessagingAgent\_SendMessagesWithConfigAsync\_System\_String\_SuperOffice\_WebApi\_Data\_OutgoingMessage\_\_\_SuperOffice\_WebApi\_Data\_StringDictionary\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SendMessagesWithConfigAsync(string, OutgoingMessage\[], StringDictionary, RequestOptions)

Send an array of messages using given config
\<p>\</p>
\<b>Online Restricted:\</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

```csharp theme={null}
Task<MessageDeliveryStatus[]> SendMessagesWithConfigAsync(string plugin, OutgoingMessage[] outgoingMessages, StringDictionary config, RequestOptions requestOptions = null)
```

#### Parameters

`plugin` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of plugin to use.

`outgoingMessages` [OutgoingMessage](SuperOffice.WebApi.Data.OutgoingMessage.md)\[]

Array of outgoing messages you want to send.

`config` [StringDictionary](SuperOffice.WebApi.Data.StringDictionary.md)

Config values used by the plugin.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[MessageDeliveryStatus](SuperOffice.WebApi.Data.MessageDeliveryStatus.md)\[]\&gt;

Array of MessageDeliveryStatus. Length of the array is equal to the number of outgoing messages.

### \<a id="SuperOffice\_WebApi\_Agents\_IMessagingAgent\_SetDeliveryStatusAsync\_System\_String\_System\_String\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetDeliveryStatusAsync(string, string, int, string, RequestOptions)

Set or change the delivery status on an outgoing messsage.
\<p>\</p>
\<b>Online Restricted:\</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

```csharp theme={null}
Task SetDeliveryStatusAsync(string plugin, string externalMessageId, int status, string statusDescription, RequestOptions requestOptions = null)
```

#### Parameters

`plugin` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of plugin

`externalMessageId` [string](https://learn.microsoft.com/dotnet/api/system.string)

External message id known to plugin.

`status` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Delivery status

`statusDescription` [string](https://learn.microsoft.com/dotnet/api/system.string)

String describing delivery status.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)


## Related topics

- [SuperOffice.WebApi.Agents.MessagingAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.MessagingAgent.md)
- [SuperOffice.WebApi.Agents](/en/api/reference/webapi/SuperOffice.WebApi.Agents.md)
- [SuperOffice.WebApi.Data.ProviderInfo](/en/api/reference/webapi/SuperOffice.WebApi.Data.ProviderInfo.md)
- [SuperOffice.WebApi.Data.IncomingMessage](/en/api/reference/webapi/SuperOffice.WebApi.Data.IncomingMessage.md)
- [SuperOffice.WebApi.Data.OutgoingMessage](/en/api/reference/webapi/SuperOffice.WebApi.Data.OutgoingMessage.md)
- [SuperOffice.WebApi.Data.MessageDeliveryStatus](/en/api/reference/webapi/SuperOffice.WebApi.Data.MessageDeliveryStatus.md)
