---
title: "Create Ticket"
method: POST
path: "/company/tickets"
---

# Create Ticket

`POST /company/tickets`

## Request

- Base URL: `https://queries.test.envia.com`
- URL: `https://queries.test.envia.com/company/tickets`
- Auth: HTTP bearer

## Headers

- `Content-Type` string

## Request body

- object
  - `type_id` integer, required: Ticket type ID.
  - `comments` string: Initial message from the customer. Recommended for context.
  - `data` string, json: JSON-stringified, type-specific fields stored as ticket variables.
  - `shipment_id` integer: Shipment reference. Required for shipment-based types (lost, damaged, delay, wrong address, overweight, etc).
  - `credit_id` integer: Credit/recharge reference for credit-based types.
  - `carrier_id` integer: Carrier reference (e.g. carrier activation, type 2).
  - `warehouse_package_id` string: Warehouse package reference (PO box types). Accepts the package ID or the shipper name.
  - `documents` object[]: Required for credit line (type 19). See sub-props below.
    - `field_id` string, required: Identifier of the required document field.
    - `key` string: Human-readable field key.
    - `type` 'file' | 'input' | 'date': How the value should be interpreted.
    - `value` string: The document URL, text value, or date.

## Response `200`

- object
  - `id` integer

## Other responses

- `409`: Conflict

---

[API](https://skmtc.dev/envia/apis/envia-queries-api.md) - [All operations](https://skmtc.dev/envia/apis/envia-queries-api/llms.txt) - [OpenAPI document](https://skmtc.dev/envia/apis/envia-queries-api/revisions/56f601a52f3f?raw)
