---
raw: true
search:
  tags:
    - Spaces
    - POST
seo:
  description: >-
    Mints a single-use, room-scoped Cast ticket for an… Reference for the POST
    /v1/spaces/{spaceId}/comments/embed-ticket endpoint in the Spacefast Partner
    API.
sidebar:
  label: Mint a third-party comments embed ticket
  badge: POST
title: Mint a third-party comments embed ticket
type: openapi-operation
---
Mints a single-use, room-scoped Cast ticket for an anonymous visitor on an allowlisted embedding site. Both the room and the visitor's identity are server-derived.

`POST /v1/spaces/{spaceId}/comments/embed-ticket`

**Request body** (`application/json`, required)

- `pagePath` (string)
- `identity` (object, required)
- `visitorToken` (string)

Request body example:

```json
{
  "pagePath": "/",
  "identity": {
    "name": "string",
    "namedByUser": true
  },
  "visitorToken": "string"
}
```

**Responses**

- `200` — Response for status 200
- `default` — Problem details (RFC 9457). Any 4xx/5xx response is one \`application/problem+json\` document.

Response example, 200:

```json
{
  "$schema": "http://example.com",
  "data": {
    "token": "string",
    "expiresAt": "2019-08-24T14:15:22Z",
    "cast": {
      "resource": "string",
      "room": "string"
    },
    "visitorToken": "string",
    "visitorExpiresAt": "2019-08-24T14:15:22Z"
  }
}
```
