---
title: "Create ticket | Crea ticket"
method: POST
path: "/student/tickets"
tags: ["Tickets"]
---

# Create ticket | Crea ticket

`POST /student/tickets`

## Request

- Base URL: `https://app.didattica.polito.it/api`
- URL: `https://app.didattica.polito.it/api/student/tickets`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/polito/apis/polito-students-api/docs/student/tickets/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body `multipart/form-data`

- CreateTicketRequest
  - `subject` string, required
  - `message` string, required
  - `subtopicId` number, required
  - `attachment` string, binary

## Response `200`

The request has succeeded.

- object
  - `data` TicketOverview, required
    - `id` number, required
    - `subject` string, required
    - `message` string, required
    - `status` 'open' | 'pending' | 'waiting_user' | 'incoming' | 'resolved' | 'autoresolved' | 'duplicate', required
    - `hasAttachments` boolean, required
    - `needsFeedback` boolean, required
    - `isFromAgent` boolean, required: If true, this ticket was opened by an agent (not by the student)
    - `agentId` number, nullable, required
    - `unreadCount` number, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `500`: Server error

## Changes

- **2026-07-14** `4836604c1ce1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/polito/apis/polito-students-api/changes/student/tickets/post.md)

---

[API](https://skmtc.dev/polito/apis/polito-students-api.md) - [All operations](https://skmtc.dev/polito/apis/polito-students-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polito/apis/polito-students-api/revisions/9d87728aaa56?raw)
