# Quickstart

> Create your first ticket and send your first email in under a minute.

Source: https://tickos.dev/docs/quickstart

## 1. Create an API key

Go to Settings > Developers and create a new API key. Copy the value once -- it is shown only at creation time. Pick at least the write permission to be able to create tickets and send emails.

## 2. Create a ticket

```bash
curl https://api.tickos.dev/v1/tickets \
  -H 'Authorization: Bearer sk_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "subject": "Cannot access my account",
    "message": "Hi, I am unable to log in since yesterday.",
    "customer_email": "jane@example.com",
    "customer_name": "Jane Doe",
    "priority": "normal"
  }'
```

subject, message and customer_email (or customer_id) are required. If the customer does not exist yet, it is created automatically from customer_email and customer_name. Without inbox_id, the ticket goes to the oldest active inbox of the workspace. The response (201) contains the ticket, its first message and any attachments:

```json
{
  "ticket": { "id": "tkv_...", "client_id": "SUP-000123", "subject": "Cannot access my account", "status": "open", "priority": "normal", ... },
  "message": { "id": "msg_...", "body_text": "Hi, I am unable to log in since yesterday.", ... },
  "attachments": []
}
```

## 3. Send a transactional email

```bash
curl https://api.tickos.dev/v1/emails \
  -H 'Authorization: Bearer sk_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{
    "from": "support@yourdomain.com",
    "to": ["jane@example.com"],
    "subject": "Welcome to Acme",
    "html": "<p>Hello Jane, welcome aboard!</p>"
  }'
```

The email is queued and the API answers 202 Accepted with its id. Use GET /v1/emails/{id} to follow its delivery status.

```json
{
  "id": "email_...",
  "status": "queued",
  "queued_at": "2026-10-13T15:04:05.000Z"
}
```

> **Note:** The from address must belong to a domain connected and verified for outbound email in your workspace. Set one up in Settings > Domains before your first send; otherwise the API answers 400.
