---
updatedAt: 2026-06-25T07:48:39.000Z
agentTools:
  projectIndex: https://marketing.developer.dotdigital.com/llms.txt
---

# Gets a token that can be used to start an anonymous session

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Session API",
    "description": "APIs for authenticating and managing SDK sessions.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{region}-api.dotdigital.com",
      "variables": {
        "region": {
          "default": "r1",
          "enum": [
            "r1",
            "r2",
            "r3"
          ],
          "description": "The Dotdigital region id your account belongs to"
        }
      }
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/cpaas/sessions/tokens/anon": {
      "get": {
        "summary": "Gets a token that can be used to start an anonymous session",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The ID to use for the anonymous user (will be prefixed by the system)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nonce",
            "in": "query",
            "description": "The cryptographic nonce to be added to the token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Anonymous auth token details",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "token"
                  ],
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "The token to use to validate a session"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "ApiSpace not found",
            "content": {}
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "csharp",
      "java",
      "node",
      "php",
      "python",
      "ruby"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```