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

# Unassign ticket

> Removes the current assignee from the ticket (sets assignee to null) and returns updated ticket details.



## OpenAPI

````yaml https://api.initdesk.com/schema.yaml post /organizations/{organization_id}/tickets/{ticket_id}/unassign/
openapi: 3.0.3
info:
  title: initdesk Customer API
  version: 1.19.0
  description: OpenAPI documentation for the customer-facing API served by the gateway.
servers:
  - url: https://api.initdesk.com
    description: Customer API gateway
security:
  - IntegrationToken: []
tags:
  - name: Organizations
    description: Organization metadata and context for all other resources.
  - name: Customers
    description: >-
      End users (requesters) scoped to the organization. Tickets reference
      customers by ID.
  - name: Tickets
    description: >-
      Tickets, messages, attachments, search, and statuses. A ticket is the
      conversation container; messages are nested under
      `/tickets/{pk}/messages/`.
  - name: Custom Preset Filters
    description: >-
      Saved ticket search filters scoped to the organization. Integration tokens
      receive organization-shared filters only.
  - name: Inboxes
    description: >-
      Organization mailboxes for routing tickets. Each inbox has an email prefix
      and optional default-inbox flag (is_default: true). On ticket create,
      inbox_id is optional: omit to use the default inbox, or provide an inbox
      ID to target a specific mailbox.
  - name: Tags
    description: Organization-scoped ticket tags with id, name, and optional color.
  - name: Help Center
    description: >-
      Support portal settings, knowledge base collections, articles, and article
      search.
paths:
  /organizations/{organization_id}/tickets/{ticket_id}/unassign/:
    post:
      tags:
        - Tickets
      summary: Unassign ticket
      description: >-
        Removes the current assignee from the ticket (sets assignee to null) and
        returns updated ticket details.
      operationId: unassign_ticket
      parameters:
        - in: path
          name: ticket_id
          schema:
            type: integer
          description: A unique integer value identifying this ticket.
          required: true
        - in: path
          name: organization_id
          schema:
            type: string
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketDetail'
          description: ''
      security:
        - IntegrationToken: []
components:
  schemas:
    TicketDetail:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        inbox:
          allOf:
            - $ref: '#/components/schemas/TicketInbox'
          readOnly: true
        channel:
          allOf:
            - $ref: '#/components/schemas/TicketChannel'
          readOnly: true
          nullable: true
        customer:
          allOf:
            - $ref: '#/components/schemas/Customer'
          readOnly: true
        assignee:
          allOf:
            - $ref: '#/components/schemas/User'
          readOnly: true
          nullable: true
        public_id:
          type: string
          readOnly: true
        subject:
          type: string
          maxLength: 255
        description:
          type: string
        description_html:
          type: string
        summary:
          type: string
          readOnly: true
          description: AI generated summary of the ticket
        sentiment_analysis_class:
          enum:
            - positive
            - negative
            - neutral
            - pending
          type: string
          x-spec-enum-id: fead30f480c5a929
          title: Sentiment class
          description: |-
            Sentiment class of the ticket (positive, negative, neutral)

            * `positive` - Positive
            * `negative` - Negative
            * `neutral` - Neutral
            * `pending` - Pending
        customer_visible_reply_count:
          type: integer
          readOnly: true
        status:
          enum:
            - created
            - active
            - closed
          type: string
          description: |-
            * `created` - Created
            * `active` - Active
            * `closed` - Closed
          x-spec-enum-id: 786352f031cd9dcc
          readOnly: true
        classification:
          enum:
            - ''
            - no_response
            - customer_inactivity
            - resolved
            - invalid
            - other
          type: string
          description: |-
            * `` - (pending)
            * `no_response` - No Response
            * `customer_inactivity` - Customer Inactivity
            * `resolved` - Resolved
            * `invalid` - Invalid
            * `other` - Other
          x-spec-enum-id: 4fafa904badf8649
          readOnly: true
        waiting_on:
          enum:
            - ''
            - customer
            - associate
          type: string
          description: |-
            * `` - (none)
            * `customer` - Customer
            * `associate` - Associate
          x-spec-enum-id: 1b01ac3e125d3656
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        csat_response:
          allOf:
            - $ref: '#/components/schemas/CSATResponseSerializerForTicket'
          readOnly: true
          nullable: true
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
          readOnly: true
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TicketTag'
        language:
          type: string
          description: Detected language code of the message content
          maxLength: 2
        origin:
          enum:
            - email
            - api
            - telegram
            - whatsapp
          type: string
          x-spec-enum-id: 739143dc01e2ece6
          readOnly: true
          description: >-
            How the ticket entered the system (email, api, telegram). Not the
            conversation medium; use `channel.type` for that.


            * `email` - Email

            * `api` - api

            * `telegram` - Telegram

            * `whatsapp` - WhatsApp
        has_attachments:
          type: boolean
          readOnly: true
        is_spam:
          type: boolean
        created_by:
          allOf:
            - $ref: '#/components/schemas/TicketCreatedBy'
          readOnly: true
        external_recipient_emails:
          readOnly: true
          description: >-
            Non-inbox recipient addresses from the original email (CC routing);
            used when sending agent replies.
      required:
        - assignee
        - attachments
        - channel
        - classification
        - created_at
        - created_by
        - csat_response
        - customer
        - customer_visible_reply_count
        - external_recipient_emails
        - has_attachments
        - id
        - inbox
        - origin
        - public_id
        - status
        - subject
        - summary
        - updated_at
        - waiting_on
    TicketInbox:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
          title: Inbox Name
        email_prefix:
          type: string
          readOnly: true
        customer_interaction_style:
          enum:
            - helpdesk
            - conversational
          type: string
          x-spec-enum-id: b8814c0c94798024
          readOnly: true
          description: >-
            Helpdesk exposes ticket numbers in customer emails and messages;
            conversational keeps interactions natural without ticket references.


            * `helpdesk` - Helpdesk

            * `conversational` - Conversational
      required:
        - customer_interaction_style
        - email_prefix
        - id
        - name
    TicketChannel:
      type: object
      properties:
        type:
          type: string
          readOnly: true
        connection_id:
          type: integer
          readOnly: true
      required:
        - connection_id
        - type
    Customer:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 255
        email:
          type: string
          format: email
          nullable: true
          maxLength: 254
        is_spam:
          type: boolean
          description: If true, emails from this customer are marked as spam
      required:
        - id
        - name
    User:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        email:
          type: string
          format: email
          title: Email address
          maxLength: 254
        name:
          type: string
          title: Name of User
          maxLength: 255
      required:
        - email
        - id
    CSATResponseSerializerForTicket:
      type: object
      properties:
        rating:
          type: integer
          readOnly: true
        comment:
          type: string
          readOnly: true
      required:
        - comment
        - rating
    Attachment:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          nullable: true
          readOnly: true
        size:
          type: integer
          readOnly: true
          description: Attachment file size in bytes.
        download_url:
          type: string
          readOnly: true
      required:
        - download_url
        - id
        - name
        - size
    TicketTag:
      type: object
      description: Read-only tag payload embedded on ticket list/detail/search responses.
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
        color:
          type: string
          readOnly: true
      required:
        - color
        - id
        - name
    TicketCreatedBy:
      type: object
      properties:
        role:
          type: string
        user:
          allOf:
            - $ref: '#/components/schemas/User'
          readOnly: true
          nullable: true
      required:
        - role
        - user
  securitySchemes:
    IntegrationToken:
      type: apiKey
      in: header
      name: X-Initdesk-Token

````