---
updatedAt: 2026-05-29T20:37:02.000Z
agentTools:
  projectIndex: https://docs.sublime.security/llms.txt
---

# Restore a previously-trashed message

Restore a previously-trashed message. "For an Office 365 message source, the message will be put back in the folder it was in before. For a Google Workspace message source, any applied labels (e.g. "Trash") will be removed from the message."

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "Handler_typesTaskAccepted": {
        "properties": {
          "task_id": {
            "description": "Task ID. Use the /v0/tasks/:id endpoint to check the task status.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "task_id"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "Sublime Platform API",
    "version": "generated"
  },
  "openapi": "3.0.1",
  "paths": {
    "/v0/messages/{id}/restore": {
      "post": {
        "description": "Restore a previously-trashed message. \"For an Office 365 message source, the message will be put back in the folder it was in before. For a Google Workspace message source, any applied labels (e.g. \"Trash\") will be removed from the message.\"",
        "operationId": "restoreMessage",
        "parameters": [
          {
            "description": "ID of the message to restore",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "ID of the message to restore",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Handler_typesTaskAccepted"
                }
              }
            },
            "description": "Accepted"
          }
        },
        "summary": "Restore a previously-trashed message",
        "tags": [
          "Messages"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "{scheme}://{server}",
      "variables": {
        "scheme": {
          "default": "https",
          "enum": [
            "http",
            "https"
          ]
        },
        "server": {
          "default": "platform.sublime.security",
          "description": "Base URL of your Sublime deployment"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Messages"
    }
  ],
  "x-readme": {
    "explorer-enabled": false
  }
}
```