> ## Documentation Index
> Fetch the complete documentation index at: https://www.text.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the Ticketing API

> Integrate Text ticketing with your systems to synchronize ticket data and automate support workflows across your organization.

The Ticketing API provides access to tickets and the resources that support ticket handling across Text. Use this page to find the relevant resource and understand behavior shared across the reference.

## Before you start

For access requirements, see <Icon icon="file" /> [Authorization](/docs/authentication/overview).

## Ticketing resources

| Resource                                                                   | Description                                                                                                                                                                                                      |
| -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Agents](/docs/api/ticketing/agents/list-agents)                                | Manage agents with access to tickets, team membership, roles, and individual settings such as signatures and notifications.                                                                                      |
| [Audit log](/docs/api/ticketing/audit-log/returns-audit-log-events)             | Inspect changes made to ticket resources, including the action, affected resource, author, and timestamp.                                                                                                        |
| [Canned responses](/docs/api/ticketing/canned-responses/list-canned-responses)  | Manage reusable reply content that agents can use while writing ticket messages.                                                                                                                                 |
| [Custom fields](/docs/api/ticketing/custom-fields/list-custom-fields)           | Configure organization-defined fields stored on tickets, including their team visibility, edit permissions, and active state.                                                                                    |
| [Email domains](/docs/api/ticketing/email-domains/email-domains-list)           | Authorize Text to send ticket email from a domain owned by your organization. This setup works with mailboxes and reply addresses.                                                                               |
| [Imported tickets](/docs/api/ticketing/imported-tickets/create-imported-ticket) | Import historical tickets while preserving their original events, timestamps, and attachments.                                                                                                                   |
| [Licenses](/docs/api/ticketing/licenses/list-licenses)                          | Access organization-level ticket settings, including the default team and email template.                                                                                                                        |
| [Macros](/docs/api/ticketing/macros/macros-list)                                | Manage reusable sets of actions that a user can run on a ticket.                                                                                                                                                 |
| [Mailboxes](/docs/api/ticketing/mailboxes-inboxes/list-mailboxes)               | Configure Text-provided inbox addresses that receive forwarded email and route new tickets to a team or agent. The built-in default mailbox cannot be removed and is not returned by list methods.               |
| [Reply addresses](/docs/api/ticketing/reply-addresses/list-reply-addresses)     | Create and manage reply addresses associated with mailboxes. You can create an address on a verified email domain. Text also creates one automatically when you configure a mailbox with a custom reply address. |
| [Reports](/docs/api/ticketing/reports/create-custom-report)                     | Retrieve ticket metrics and create custom data exports for reporting.                                                                                                                                            |
| [Rules](/docs/api/ticketing/rules/list-rules)                                   | Manage trigger-and-action automation that runs when a ticket is created or changed.                                                                                                                              |
| [Spam management](/docs/api/ticketing/spam-management/list-trusted-emails)      | Control trusted and blocked senders or domains. A specific email address takes precedence over a domain when entries conflict.                                                                                   |
| [Tags](/docs/api/ticketing/tags/list-tags)                                      | Manage team-scoped labels used to categorize and find tickets.                                                                                                                                                   |
| [Teams](/docs/api/ticketing/teams/list-teams)                                   | Manage the teams used for ticket visibility and assignment. Every ticket belongs to a team, and one team provides the organization-wide fallback.                                                                |
| [Templates](/docs/api/ticketing/templates/list-templates)                       | Manage the HTML and plain-text templates used for email sent to customers.                                                                                                                                       |
| [Tickets](/docs/api/ticketing/tickets/list-tickets)                             | Work with the ticket lifecycle, from creation and retrieval through assignment, updates, relationships, and storage.                                                                                             |
| [Transactions](/docs/api/ticketing/transactions/create-transaction)             | Prepare temporary attachment sets before using them in tickets, agent signatures, template logos, or canned responses.                                                                                           |
| [Views](/docs/api/ticketing/views/views-list)                                   | Manage saved ticket filters that are available to an individual agent.                                                                                                                                           |
| [Webhooks](/docs/api/ticketing/webhooks/webhooks-list)                          | Register HTTP endpoints that receive notifications about events happening in tickets.                                                                                                                            |

## Related APIs

| If you need to                                    | Use                                      |
| ------------------------------------------------- | ---------------------------------------- |
| Work with live conversations as an agent or bot   | [Agent Chat API](/docs/api/agent-chat/)       |
| Build the customer side of a live chat experience | [Customer Chat API](/docs/api/customer-chat/) |

For a broader comparison, see [Messaging APIs](/docs/api-overview/messaging-apis).

## Ticket silos

Tickets are stored in silos according to their state. Only the `tickets` silo allows writes.

| Silo      | Contents         | Access     | Retention                     |
| --------- | ---------------- | ---------- | ----------------------------- |
| `tickets` | Recent tickets   | Read/write | Not automatically removed     |
| `archive` | Archived tickets | Read-only  | Not automatically removed     |
| `spam`    | Spam tickets     | Read-only  | 60 days after the last update |
| `trash`   | Deleted tickets  | Read-only  | 30 days after the last update |

[List tickets](/docs/api/ticketing/tickets/list-tickets) returns the `tickets` silo by default. Set the `silo` parameter to list tickets from another silo. To change where a ticket is stored, use [Move ticket to silo](/docs/api/ticketing/tickets/move-ticket-to-silo).

## Ticket attachments

Attachments are uploaded through a transaction before you create or update a ticket, agent signature, template logo, or canned response.

<Steps>
  <Step title="Create a transaction">
    Use [Create transaction](/docs/api/ticketing/transactions/create-transaction) for
    the target resource. Provide its ID when it already exists. When creating a
    ticket, template, or canned response, omit the entity ID; the generated
    transaction ID determines the ID of the new resource.
  </Step>

  <Step title="Upload the files">
    Use [Upload attachment](/docs/api/ticketing/transactions/upload-attachment) with
    the transaction ID. You can upload multiple files in one request.
  </Step>

  <Step title="Use the transaction">
    Pass the transaction ID when you create or update the target resource. The
    transaction is consumed by that request.
  </Step>
</Steps>

Unused transactions and their uploaded attachments are removed after 24 hours. Attachments copied from another resource are not removed with an unused transaction.

## Date and time ranges

Date and time ranges in the Ticketing API are half-open: `[from, to)`. The range includes its `from` value and excludes its `to` value.

Filters that accept dates can use absolute timestamps or relative values. Relative values use a sign (`+` or `-`), a number, and a unit: `n` for minutes, `h` for hours, `d` for days, and `m` for months. Lowercase units are relative to the current time. Uppercase units refer to the start of the corresponding current period.

| Value  | Meaning                    |
| ------ | -------------------------- |
| `-2d`  | 48 hours before now        |
| `+1m`  | One month from now         |
| `-0M`  | Start of the current month |
| `-0D`  | Start of the current day   |
| `-10n` | 10 minutes before now      |

## User-Agent header

Include the `User-Agent` header in API requests. Requests without it might be blocked by intermediary services.
