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

# Move Emails To Trash

> Delete specified mail items and move to the Trash folder

NsApiSlow threshold: 5000 ms.
<para />## Online Restricted: ## The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.



## OpenAPI

````yaml /openapi/agent/openapi-v3-EMailAgent.json post /api/v1/Agents/EMail/MoveEmailsToTrash
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - EMailAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/EMail/MoveEmailsToTrash:
    post:
      tags:
        - EMail_Agent
      summary: Move Emails To Trash
      description: "Delete specified mail items and move to the Trash folder\n\nNsApiSlow threshold: 5000 ms.\r\n<para />## Online Restricted: ## The EMail agent is not available in Online by default. Access must be requested specifically when app is registered."
      operationId: v1EMailAgent_MoveEmailsToTrash
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.MoveEmailsToTrashRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.MoveEmailsToTrashRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.MoveEmailsToTrashRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.MoveEmailsToTrashRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.MoveEmailsToTrashRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.MoveEmailsToTrashRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.MoveEmailsToTrashRequest
        description: Ids
        required: true
      responses:
        '204':
          description: No Content
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.EMailCarriers.MoveEmailsToTrashRequest:
      description: >-
        MoveEmailsToTrash: Delete specified mail items and move to the Trash
        folder
      type: object
      properties:
        Ids:
          type: array
          items:
            format: int32
            type: integer

````

## Related topics

- [SuperOffice.WebApi.Data.EMail MoveEmailsToTrashRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.EMail_MoveEmailsToTrashRequest.md)
- [SuperOffice.WebApi.Agents.EMailAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.EMailAgent.md)
- [SuperOffice.WebApi.Agents.IEMailAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IEMailAgent.md)
- [Move With Email](/en/api/reference/restful/agent/appointment_agent/move-with-email.md)
- [Move Emails To Folder](/en/api/reference/restful/agent/email_agent/move-emails-to-folder.md)
- [View email messages](/en/email/inbox/learn/preview.md)
