---
updatedAt: 2025-06-04T20:30:56.000Z
agentTools:
  projectIndex: https://developer-docs.datamotion.com/v2/llms.txt
---

# Logout

This method is used to invalidate a session key, making any subsequent calls with that session key invalid.
A session key must be submitted via the X-Session-Key header.
The request body should be left empty.
The response body will be empty.
A successful transaction will receive a 200 status code.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Secure Messaging API",
    "version": "v2"
  },
  "servers": [
    {
      "url": "https://sandbox.datamotion.com/SecureMessagingApi"
    }
  ],
  "paths": {
    "/Account/Logout": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Logout",
        "description": "This method is used to invalidate a session key, making any subsequent calls with that session key invalid.\r\nA session key must be submitted via the X-Session-Key header.\r\nThe request body should be left empty.\r\nThe response body will be empty.\r\nA successful transaction will receive a 200 status code.",
        "operationId": "Account_Logout",
        "parameters": [
          {
            "name": "X-Session-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "The X-Session-Key header is missing. ||\r\nBad session key. ||\r\nSession key expired.",
            "content": {}
          }
        }
      }
    }
  },
  "x-original-swagger-version": "2.0",
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```