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

# Draft tickets

> Understanding and managing ticket drafts in the Thena platform

Ticket drafts provide a way to prepare and collaborate on tickets before they are officially created. This feature is particularly useful for complex tickets that require multiple edits or team input before being submitted.

<Note>
  Drafts can be either private (visible only to the creator) or public (visible to all team members), allowing for flexible collaboration while maintaining control over work in progress.
</Note>

## Understanding drafts

### Draft types

<CardGroup cols={2}>
  <Card title="Private drafts" icon="user-lock">
    • Visible only to the creator <br />
    • Perfect for personal work <br />
    • No team visibility <br />
    • Convert to public when ready
  </Card>

  <Card title="Public drafts" icon="users">
    • Visible to all team members <br />
    • Enables collaboration <br />
    • Team can provide input <br />
    • Ready for group review
  </Card>
</CardGroup>

### Draft lifecycle

<Steps>
  <Step title="Creation">
    * Start new draft
    * Set visibility (private/public)
    * Add initial content
    * Save progress
  </Step>

  <Step title="Collaboration">
    * Share with team (if public)
    * Gather feedback
    * Make revisions
    * Track changes
  </Step>

  <Step title="Finalization">
    * Review final content
    * Validate required fields
    * Get approvals if needed
    * Prepare for submission
  </Step>

  <Step title="Submission">
    * Convert to actual ticket
    * Assign appropriate team
    * Set initial status
    * Begin ticket lifecycle
  </Step>
</Steps>

## Draft management

### Core capabilities

<AccordionGroup>
  <Accordion title="Creation and editing" icon="pen-to-square">
    * Start from scratch
    * Save progress
    * Rich text editing
  </Accordion>

  <Accordion title="Collaboration" icon="users">
    * Share with team
    * Track changes (coming soon)
    * Mention colleagues (coming soon)
    * Request reviews (coming soon)
  </Accordion>

  <Accordion title="Organization" icon="folder-tree">
    * Categorize drafts (coming soon)
    * Set priorities (coming soon)
    * Add labels (coming soon)
    * Group related drafts (coming soon)
    * Archive old drafts (coming soon)
  </Accordion>
</AccordionGroup>

## API endpoints

### Draft ticket

```json theme={null}
{
  "title": "Customer reported login issue",
  "description": "User unable to access mobile app",
  "isPrivate": true,
  "draftScope": "personal",
  "teamId": "team_123",
  "requestorEmail": "customer@example.com",
  "submitterEmail": "agent@thena.ai",
  "statusId": "status_new",
  "priorityId": "priority_high",
  "typeId": "type_bug",
  "accountId": "account_456",
  "assignedAgentId": "agent_789",
  "customFieldValues": [
    {
      "fieldId": "field_123",
      "value": "iOS 15.0"
    }
  ],
  "metadata": {
    "browserVersion": "Chrome 120",
    "deviceType": "Mobile"
  }
}
```

<Note>
  When creating a draft, use `isPrivate: true` and `draftScope: "personal"` for private drafts visible only to the creator. For team-wide visibility, set `isPrivate: false`.
</Note>

### Available operations

<Accordion title="Draft management" icon="file-pen">
  ```bash theme={null}
  # Create a new ticket draft
  POST /v1/tickets/draft
  Content-Type: application/json

  # Get all draft tickets
  GET /v1/tickets/draft

  # Get draft ticket by UID
  GET /v1/tickets/draft/{uid}

  # Update draft ticket
  PUT /v1/tickets/draft/{uid}
  Content-Type: application/json

  # Delete draft ticket
  DELETE /v1/tickets/draft/{uid}

  # Publish draft ticket
  POST /v1/tickets/draft/{uid}/submit
  Content-Type: application/json
  ```

  <Note>
    All endpoints require authentication with Bearer token, API key, and Organization ID in the headers.
  </Note>

  For detailed API specifications, see <a href="/api-reference/platform/tickets/drafts" target="_blank">Draft Management</a>
</Accordion>

## Best practices

<CardGroup cols={2}>
  <Card title="Draft creation" icon="square-plus">
    • Use clear titles <br />
    • Include key details <br />
    • Set appropriate visibility <br />
    • Use templates when available
  </Card>

  <Card title="Collaboration" icon="people-group">
    • Share early for feedback <br />
    • Use clear comments <br />
    • Track major changes <br />
    • Set review expectations
  </Card>
</CardGroup>

### Tips for effective draft management

<Steps>
  <Step title="Organization">
    * Use consistent naming
    * Categorize appropriately
    * Clean up old drafts
    * Document decisions
  </Step>

  <Step title="Collaboration">
    * Share context early
    * Request specific feedback
    * Set review timelines
    * Track feedback status
  </Step>

  <Step title="Quality control">
    * Review required fields
    * Validate information
    * Check attachments
    * Test links and references
  </Step>
</Steps>

## Related resources

<CardGroup cols={2}>
  <Card title="Ticket overview" icon="ticket" href="/platform/core-concepts/tickets/overview">
    Learn about ticket management
  </Card>

  <Card title="Fields" icon="rectangle-list" href="/platform/core-concepts/tickets/fields">
    Understand ticket fields
  </Card>

  <Card title="Teams" icon="users" href="/platform/core-concepts/teams/overview">
    Team collaboration
  </Card>

  <Card title="Best practices" icon="book" href="/platform/core-concepts/tickets/best-practices">
    Ticket management guidelines
  </Card>
</CardGroup>
