---
updatedAt: 2026-06-03T15:32:12.000Z
agentTools:
  projectIndex: https://docs.glassix.com/llms.txt
---

# Generate Survey Link

Surveys are your way of receiving from your customer information about their experience contacting your center.

Glassix allows you to create and send surveys once tickets are closed.

**For the phone call protocol**, mapping a survey isn't possible. Using this API endpoint, you can generate a URL to a survey for your ticket that can be sent either using the [protocols/send](https://docs.glassix.com/reference/protocols-send#/) endpoint or an external service.

Using this endpoint is possible only if:
1. The ticket is closed.
2. A survey hasn't been sent in the ticket.
3. The specific channel of the ticket isn't mapped to a survey.

Glassix allows you to create and send surveys once tickets are closed.

Mapping a survey isn't possible for the phone call protocol. Using this API endpoint, you can generate a URL to a survey for your ticket that can be sent either using the [this](https://docs.glassix.com/reference/protocols-send/) endpoint or an external service.

Using this endpoint is possible only if:

1. The ticket is closed.
2. A survey hasn't been sent in the ticket.
3. The specific channel of the ticket isn't mapped to a survey.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.2",
    "title": "Glassix",
    "description": "Glassix REST API",
    "contact": {}
  },
  "servers": [
    {
      "description": "Production server",
      "url": "https://{workspace}.glassix.com/api/v1.2"
    }
  ],
  "security": [
    {
      "Bearer": []
    }
  ],
  "paths": {
    "/tickets/generatesurveylink/{ticketId}": {
      "post": {
        "operationId": "POST_tickets-GenerateSurveyLink",
        "summary": "Generate Survey Link",
        "tags": [
          "Tickets"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "description": "Surveys are your way of receiving from your customer information about their experience contacting your center.\n\nGlassix allows you to create and send surveys once tickets are closed.\n\n**For the phone call protocol**, mapping a survey isn't possible. Using this API endpoint, you can generate a URL to a survey for your ticket that can be sent either using the [protocols/send](https://docs.glassix.com/reference/protocols-send#/) endpoint or an external service.\n\nUsing this endpoint is possible only if:\n1. The ticket is closed.\n2. A survey hasn't been sent in the ticket.\n3. The specific channel of the ticket isn't mapped to a survey.",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unique identifier for a ticket.",
              "example": 16018
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "surveyId": {
                    "type": "integer",
                    "description": "The Id of your survey. This can be found next to your survey in the departmant's settings."
                  },
                  "participantId": {
                    "type": "integer",
                    "description": "If not specified the link will be generated for the ticket's main active participant."
                  }
                },
                "required": [
                  "surveyId"
                ]
              },
              "examples": {
                "Example 1": {
                  "value": {
                    "surveyId": 1807,
                    "participantId": 0
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "surveyLink": {
                    "value": {
                      "surveyLink": "https://glsx.co/tBTQfetkhThS"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Ticket doesn't exist": {
                    "value": {
                      "message": "Ticket must be closed"
                    }
                  },
                  "Survey is already been sent": {
                    "value": {
                      "message": "Survey has already been sent"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "ticketId",
          "in": "path",
          "required": true
        }
      ]
    }
  },
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "oauth2",
        "description": "",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "",
            "tokenUrl": "",
            "refreshUrl": "",
            "scopes": {}
          }
        }
      }
    }
  }
}
```