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

# Partially updates a ticket. Send only the fields you want to change.

> Each supplied field is applied exactly as when it is changed in the app, so the same
notifications and timeline entries are produced.
Changing `clientId` resets the ticket's contact, cc contacts and billing override and
unlinks its assets; supply those fields in the same request to set them to new values.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/tickets/{ticketId}
openapi: 3.0.4
info:
  title: Public API
  description: Gorelo Public API documentation.
  version: 1.0.0
servers:
  - url: https://api.usw.gorelo.io
    description: US
  - url: https://api.aue.gorelo.io
    description: Australia
security:
  - ApiKeyAuth: []
tags:
  - name: Attachments
    description: "Uploading a file, for anything that can carry one. One endpoint rather than one per record\r\ntype, because the upload itself is identical - only the record it is checked against differs."
  - name: Alerts
    description: Alerts management operations
  - name: Assets
    description: Assets management operations
  - name: Billing
    description: Billing management operations
  - name: Tickets
    description: Tickets management operations
  - name: Clients
    description: Clients management operations
  - name: Contacts
    description: Contacts management operations
  - name: Deletions
    description: Deletions management operations
  - name: Documents
    description: Documents management operations
  - name: Forms
    description: Forms management operations
  - name: Organization
    description: Organization management operations
  - name: Projects
    description: Projects management operations
paths:
  /v1/tickets/{ticketId}:
    patch:
      tags:
        - Tickets
      summary: Partially updates a ticket. Send only the fields you want to change.
      description: "Each supplied field is applied exactly as when it is changed in the app, so the same\r\nnotifications and timeline entries are produced.\r\nChanging `clientId` resets the ticket's contact, cc contacts and billing override and\r\nunlinks its assets; supply those fields in the same request to set them to new values."
      operationId: patch_v1_tickets_ticketId
      parameters:
        - name: ticketId
          in: path
          description: Ticket to update.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Fields to change.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/UpdateTicketCommand'
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTicketCommand'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateTicketCommand'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateTicketCommand'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/UpdateTicketResultBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTicketResultBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/UpdateTicketResultBaseResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
components:
  schemas:
    UpdateTicketCommand:
      type: object
      properties:
        Title:
          type: string
          description: Ticket title. Maximum 250 characters.
          nullable: true
        UpdatedByName:
          type: string
          description: >-
            Display name recorded as the author of this update. Source is always
            stamped as Public API. Omitted or blank, it is recorded as `API`.
          nullable: true
        ClosedOn:
          type: string
          description: "The date the ticket was closed, for correcting the close date of a ticket migrated from\r\nanother system. The ticket must already be in a closed status, or be moved into one by this\r\nsame request. Must not be in the future or earlier than the ticket's CreatedOn. Omit to leave\r\nan already-closed ticket's close date untouched. Sending null is the same as omitting it -\r\nthe close date is not clearable here, since a closed ticket always has one. A close that\r\ncarries ClosedOn is treated as history: it is recorded on the timeline but sends no\r\nstatus-changed email to the contact and triggers no automation rules."
          format: date-time
          nullable: true
        UpdatedOn:
          type: string
          description: "Timestamp to record as the ticket's last activity instead of the current time, for a\r\ncaller replaying historical changes. Must not be in the future or earlier than the\r\nticket's CreatedOn. Applies to whichever fields this request changes; it is not an\r\nupdate on its own. Defaults to the ClosedOn supplied by the same request, otherwise to the\r\ncurrent time. A caller migrating a ticket sends CreatedOn on create, and ClosedOn and\r\nUpdatedOn together here, so the ticket keeps the dates it had in the other system. Sending\r\nnull is the same as omitting it."
          format: date-time
          nullable: true
        ClientId:
          type: integer
          description: >-
            Client the ticket belongs to. Changing it clears the ticket's
            contact, assets, uptime checks and billing override.
          format: int64
          nullable: true
        LocationId:
          type: integer
          description: >-
            Client location the ticket belongs to. Requires the ticket to have a
            client.
          format: int64
          nullable: true
        ContactId:
          type: integer
          description: "Primary contact on the ticket. A ticket with a client (the ClientId sent, otherwise the one\r\nthe ticket has) takes a contact of any client; a ticket with no client takes a temporary\r\ncontact (IsTemporaryContact true)."
          format: int64
          nullable: true
        CcContactIds:
          type: array
          items:
            type: integer
            format: int64
          description: "Cc contacts on the ticket. At most 100. Same rule as ContactId: contacts of any client, or\r\ntemporary contacts when the ticket has no client. Replaces the list; [] clears\r\nit; omit to leave unchanged."
          nullable: true
        StatusId:
          type: integer
          description: Ticket status id.
          format: int64
          nullable: true
        GroupIds:
          type: array
          items:
            type: integer
            format: int64
          description: >-
            Technician groups subscribed to the ticket. Replaces the list; []
            clears it; omit to leave unchanged.
          nullable: true
        PriorityId:
          $ref: '#/components/schemas/TicketPriority'
        TypeId:
          type: integer
          description: Ticket type id.
          format: int64
          nullable: true
        LeadAssigneeId:
          type: integer
          description: >-
            Lead assignee technician id. Send 0 to unassign; omit to leave
            unchanged.
          format: int64
          nullable: true
        AssistingAssigneeIds:
          type: array
          items:
            type: integer
            format: int64
          description: >-
            Assisting assignee technician ids. Replaces the list; [] clears it;
            omit to leave unchanged.
          nullable: true
        WatcherIds:
          type: array
          items:
            type: integer
            format: int64
          description: >-
            Watcher technician ids. Replaces the list; [] clears it; omit to
            leave unchanged.
          nullable: true
        TagIds:
          type: array
          items:
            type: integer
            format: int64
          description: >-
            Tag ids on the ticket. Replaces the list; [] clears it; omit to
            leave unchanged.
          nullable: true
        AgentAssetIds:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Agent (managed device) asset ids to link. Replaces the current set;
            omit to leave unchanged.
          nullable: true
        CustomAssetIds:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Custom asset ids to link. Replaces the current set; omit to leave
            unchanged.
          nullable: true
        UptimeIds:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Uptime check ids to link. Replaces the current set; omit to leave
            unchanged.
          nullable: true
        BillingOverride:
          $ref: '#/components/schemas/TicketBillingOverride'
      additionalProperties: false
      description: "Unified partial update for a ticket. Every field is optional; only the fields present in the\r\nrequest body are applied. Each change has the same effects (notifications, timeline entries)\r\nas making it in the app."
    UpdateTicketResultBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          $ref: '#/components/schemas/UpdateTicketResult'
        DataContext:
          type: object
          additionalProperties: false
          nullable: true
          example: null
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    ObjectBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          nullable: true
        DataContext:
          $ref: '#/components/schemas/ErrorDataContext'
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    TicketPriority:
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
      type: integer
      format: int32
    TicketBillingOverride:
      type: object
      properties:
        ServiceLineId:
          type: integer
          description: "Contract service line to bill time against. The owning contract is resolved from this\r\nautomatically.\r\n            \r\nOmit it and the override keeps the service line it has. Send it as null to clear the\r\ncontract override outright."
          format: int64
          nullable: true
        BillingRoleId:
          type: integer
          description: Default billing role for time entries created against the ticket.
          format: int64
          nullable: true
        WorkTypeId:
          type: integer
          description: Default work type for time entries created against the ticket.
          format: int64
          nullable: true
        BillableStatusId:
          type: integer
          description: Default billable status for time entries created against the ticket.
          format: int32
          nullable: true
      additionalProperties: false
      description: "Ticket-level billing defaults. These are stored on the ticket and applied when a time entry is\r\ncreated against it — they are not posted to Billing by this endpoint."
    HttpStatusCode:
      enum:
        - 100
        - 101
        - 102
        - 103
        - 200
        - 201
        - 202
        - 203
        - 204
        - 205
        - 206
        - 207
        - 208
        - 226
        - 300
        - 301
        - 302
        - 303
        - 304
        - 305
        - 306
        - 307
        - 308
        - 400
        - 401
        - 402
        - 403
        - 404
        - 405
        - 406
        - 407
        - 408
        - 409
        - 410
        - 411
        - 412
        - 413
        - 414
        - 415
        - 416
        - 417
        - 421
        - 422
        - 423
        - 424
        - 426
        - 428
        - 429
        - 431
        - 451
        - 500
        - 501
        - 502
        - 503
        - 504
        - 505
        - 506
        - 507
        - 508
        - 510
        - 511
      type: integer
      format: int32
    UpdateTicketResult:
      type: object
      properties:
        Id:
          type: string
          description: Identifier of the updated ticket.
          format: uuid
          nullable: true
      additionalProperties: false
    Error:
      type: object
      properties:
        Code:
          pattern: ^[0-9]{6}$
          type: string
          description: 6-digit MMTTNN error code. See the Public API error-code registry.
          example: '070101'
        Message:
          type: string
        PropertyName:
          type: string
          nullable: true
        ActionHint:
          type: string
          nullable: true
        DocUrl:
          type: string
          nullable: true
      additionalProperties: false
    ErrorDataContext:
      type: object
      properties:
        TraceId:
          type: string
          description: Request correlation id. Quote this when reporting a problem.
          nullable: true
      additionalProperties: false
      description: "The `DataContext` of an error response: carries the correlation id for the failed\r\nrequest."
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        Your Gorelo API key. See [Generate API key](/generate-api-key). If your
        data is hosted in Australia, click the base URL at the top of this page
        and select `https://api.aue.gorelo.io`.
      name: X-API-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.