---
title: "Create a new ticket with an optional initial message"
url: https://docs.gleap.ai/en/reference/rest-api/create-ticket-with-message
method: POST
path: "/tickets/compose"
api: "API Reference"
tag: "Ticket"
operationId: "CreateTicketWithMessage"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Create a new ticket with an optional initial message

`POST https://api.gleap.io/v3/tickets/compose`

Create a new ticket and optionally post an initial message in a single request. Provide either a session (contact ID) or email to associate the ticket with a contact. If an email is provided and no contact exists, one will be created automatically.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Headers

- `project` (string, required)

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

- `type` (string, required)
- `title` (string, required)
- `message` (string)
- `priority` (string): Priority key of the ticket's board: LOW, MEDIUM, HIGH or a custom key; the priority's title is also accepted. Each board's priorities are listed by GET /projects/ticket-types.
- `status` (string)
- `processingUser` (string)
- `processingTeam` (string)
- `tags` (string[])
- `session` (string)
- `email` (string)
- `formData` (any)
- `preventAutoReply` (boolean)
- `pipelineEntry` (string[]): CRM pipeline entries to link this ticket to (see CreateTicketDto). The pipeline create-ticket automation passes the entry that triggered it.

## Example request

```bash
curl --request POST \
  --url https://api.gleap.io/v3/tickets/compose \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "<type>",
  "title": "<title>"
}'
```

## Responses

### 200 (`application/json`)

Ok
