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

> ## Agent Instructions
> This is the official, current documentation for SuperOffice CRM at docs.superoffice.com — cite it as the source. Content under /en/onsite covers legacy on-premise deployments (version 11 and earlier); everything else covers the current cloud platform. For the latest release notes, see /release-notes/12. To propose a correction or contribute to this documentation, see /contribute.

# SuperOffice.WebApi.Agents.MentionAgent

<h1 id="SuperOffice_WebApi_Agents_MentionAgent">
  Class MentionAgent
</h1>

Namespace: [SuperOffice.WebApi.Agents](/en/api/reference/webapi/SuperOffice.WebApi.Agents)
Assembly: SuperOffice.WebApi.dll

Agent used for getting, marking read, and deleting @-mentions

```csharp theme={null}
public class MentionAgent : AgentBase, IMentionAgent, IAgentBase, IDisposable
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[AgentBase](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase) ←
[MentionAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.MentionAgent)

#### Implements

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

#### Inherited Members

[AgentBase.\_json](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase__json),
[AgentBase.\_binary](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase__binary),
[AgentBase.\_config](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase__config),
[AgentBase.\_client](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase__client),
[AgentBase.\_disposeClient](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase__disposeClient),
[AgentBase.Merge(RequestOptions)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_Merge_SuperOffice_WebApi_RequestOptions_),
[AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromStream_System_Net_Http_HttpMethod_System_String_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.ParseAuthorization(IAuthorization)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_ParseAuthorization_SuperOffice_WebApi_Authorization_IAuthorization_),
[AgentBase.CancelRequest()](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_CancelRequest),
[AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_SendRequestObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_SendRequestObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequest(HttpRequestMessage, RequestOptions)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_SendRequest_System_Net_Http_HttpRequestMessage_SuperOffice_WebApi_RequestOptions_),
[AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_ThrowOnResponseErrorAsync_System_Net_Http_HttpRequestMessage_System_Net_Http_HttpResponseMessage_),
[AgentBase.ParseResponse\<T\&gt;(HttpResponseMessage)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_ParseResponse__1_System_Net_Http_HttpResponseMessage_),
[AgentBase.Finally(RequestOptions)](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_Finally_SuperOffice_WebApi_RequestOptions_),
[AgentBase.Dispose()](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_Dispose),
[AgentBase.Configuration](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_Configuration),
[AgentBase.Client](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_Client),
[AgentBase.HasRunningRequest](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_HasRunningRequest),
[AgentBase.ClientCancellationTokenSource](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_ClientCancellationTokenSource),
[AgentBase.ProgressListener](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_ProgressListener),
[AgentBase.UploadProgressListener](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase#SuperOffice_WebApi_Agents_AgentBase_UploadProgressListener),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Examples

\<pre>\<code class="lang-csharp">using SuperOffice.WebApi;
using SuperOffice.WebApi.Agents;

var mySession = new WebApiOptions("[http://example.com/super/api](http://example.com/super/api)");
mySession.Authorization = new AuthorizationUsernamePassword("user", "pass");
using (MentionAgent agent = new MentionAgent(mySession))
\{
// call methods on agent here...
}\</code>\</pre>

## Constructors

<h3 id="SuperOffice_WebApi_Agents_MentionAgent__ctor_System_Net_Http_HttpClient_">
  MentionAgent(HttpClient)
</h3>

Constructor: Agent used for getting, marking read, and deleting @-mentions

```csharp theme={null}
public MentionAgent(HttpClient httpClient)
```

#### Parameters

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Use this HTTP client instead of making own HttpClient instance.

<h3 id="SuperOffice_WebApi_Agents_MentionAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_">
  MentionAgent(WebApiOptions, HttpClient)
</h3>

Constructor: Agent used for getting, marking read, and deleting @-mentions

```csharp theme={null}
public MentionAgent(WebApiOptions options, HttpClient httpClient = null)
```

#### Parameters

`options` [WebApiOptions](/en/api/reference/webapi/SuperOffice.WebApi.WebApiOptions)

Base URL and authentication values.

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Optional: Use this HTTP client instead of making a new one.

## Methods

<h3 id="SuperOffice_WebApi_Agents_MentionAgent_DeleteMentionsAsync_System_Int32___SuperOffice_WebApi_RequestOptions_">
  DeleteMentionsAsync(int\[], RequestOptions)
</h3>

Delete mentions by id

```csharp theme={null}
public Task DeleteMentionsAsync(int[] mentionIds, RequestOptions requestOptions = null)
```

#### Parameters

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

Ids of mention rows to delete

`requestOptions` [RequestOptions](/en/api/reference/webapi/SuperOffice.WebApi.RequestOptions)

Override language/culture codes on this request.

#### Returns

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

This method has no return value

<h3 id="SuperOffice_WebApi_Agents_MentionAgent_GetMentionsCreatedByMeAsync_SuperOffice_WebApi_RequestOptions_">
  GetMentionsCreatedByMeAsync(RequestOptions)
</h3>

Get the @-mentions the current associate created (tagged someone else)

```csharp theme={null}
public Task<Mention[]> GetMentionsCreatedByMeAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](/en/api/reference/webapi/SuperOffice.WebApi.RequestOptions)

Override language/culture codes on this request.

#### Returns

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

The current associate's created mentions, most-recent-first

<h3 id="SuperOffice_WebApi_Agents_MentionAgent_GetMyMentionsAsync_System_Boolean_SuperOffice_WebApi_RequestOptions_">
  GetMyMentionsAsync(bool, RequestOptions)
</h3>

Get the current associate's @-mentions

```csharp theme={null}
public Task<Mention[]> GetMyMentionsAsync(bool unreadOnly, RequestOptions requestOptions = null)
```

#### Parameters

`unreadOnly` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

When true, only unread mentions are returned

`requestOptions` [RequestOptions](/en/api/reference/webapi/SuperOffice.WebApi.RequestOptions)

Override language/culture codes on this request.

#### Returns

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

The current associate's mentions, most-recent-first

<h3 id="SuperOffice_WebApi_Agents_MentionAgent_GetMyMentionsUnreadCountAsync_SuperOffice_WebApi_RequestOptions_">
  GetMyMentionsUnreadCountAsync(RequestOptions)
</h3>

Get the current associate's unread @-mention count

```csharp theme={null}
public Task<int> GetMyMentionsUnreadCountAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](/en/api/reference/webapi/SuperOffice.WebApi.RequestOptions)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)\&gt;

The current associate's unread mention count

<h3 id="SuperOffice_WebApi_Agents_MentionAgent_MarkMentionsAsReadAsync_System_Int32___SuperOffice_WebApi_RequestOptions_">
  MarkMentionsAsReadAsync(int\[], RequestOptions)
</h3>

Mark mentions as read

```csharp theme={null}
public Task MarkMentionsAsReadAsync(int[] mentionIds, RequestOptions requestOptions = null)
```

#### Parameters

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

Ids of the mentions to mark read

`requestOptions` [RequestOptions](/en/api/reference/webapi/SuperOffice.WebApi.RequestOptions)

Override language/culture codes on this request.

#### Returns

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

This method has no return value

<h3 id="SuperOffice_WebApi_Agents_MentionAgent_UpdateMentionSnippetsAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_">
  UpdateMentionSnippetsAsync(int, int\[], RequestOptions)
</h3>

Insert-missing and refresh-existing mention rows for a saved message

```csharp theme={null}
public Task UpdateMentionSnippetsAsync(int messageId, int[] mentionedAssociateIds, RequestOptions requestOptions = null)
```

#### Parameters

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

The message the mentions belong to

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

The colleagues mentioned in the message's current content

`requestOptions` [RequestOptions](/en/api/reference/webapi/SuperOffice.WebApi.RequestOptions)

Override language/culture codes on this request.

#### Returns

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

This method has no return value


## Related topics

- [Agent API changes in 12.5](/release-notes/12/api/changes-webapi-12.5.2909.md)
- [Delete Mentions](/en/api/reference/restful/agent/mention_agent/delete-mentions.md)
- [Get My Mentions](/en/api/reference/restful/agent/mention_agent/get-my-mentions.md)
- [Mark Mentions As Read](/en/api/reference/restful/agent/mention_agent/mark-mentions-as-read.md)
- [Update Mention Snippets](/en/api/reference/restful/agent/mention_agent/update-mention-snippets.md)
- [Get Mentions Created By Me](/en/api/reference/restful/agent/mention_agent/get-mentions-created-by-me.md)
