Tickets overview

This API is part of our developer preview program, and should be considered as a non-stable release that will be subject to bugs and breaking changes while under development. Please take this into account as you build against a release. Please subscribe to our changelog for updates.

Tickets, along with contacts, companies and deals, are a foundational object in HubSpot CRM. A ticket represents a customer request for help, support, service, or a response, and the responses generated in reply to this request.

Ticket Properties

As with other CRM objects, tickets support custom properties. The properties for tickets are managed through the CRM Object Properties API.

Tickets have three properties that must be set when creating a new ticket:

  • source_type - The channel where ticket was originally submitted, such as email, chat, or phone.
  • status - The current status of the ticket, such as new, waiting, or closed
  • created_by - The contact record that originally created the ticket, identified by the contact vid.

Please see the CRM Object Properties API for getting further details for those properties.

Associations

Tickets can be associated with contacts, companies, or engagements. Any associations for tickets are managed through the CRM Associations API.

Tickets will have the following data. Note that the specific properties included for your tickets may vary depending on which properties are actually set (properties with no value will never be included in a response) and which properties you are requesting. See the Contacts overview for more details about the property change source.

{
  "objectType": "TICKET",
  // String; The object type of this object, will always be 'TICKET' for tickets.
  "portalId": 62515,
  // Integer; The Portal or Hub ID that this object belongs to.
  "objectId": 176602,
  // Integer; The internal ID for this ticket
  "properties": {
  // A dictionary of properties for the ticket, keyed by the internal name of the property
    "subject": {
    // String; The name of the property
      "versions": [
      // A list of historical values for the property. The current version is included in this list.
        {
          "name": "subject",
          // String; The name of the property.
          "value": "This is an example ticket",
          // String; The value of the property for this version.
          "timestamp": 1522870759430,
          // Integer; A Unix timestamp in milliseconds representing when the property was updated.
          "source": "API",
          // String; The change source of the API. See the Contacts API overview for a list of possible sources
          "sourceVid": []
          // A list of integers representing contact VIDs. This will be populated if the property was updated as a result of a change to a contact record.
        }
      ],
      "value": "This is an example ticket",
      // String; The current value of the property.
      "timestamp": 1522870759430,
      // Integer; A Unix timestamp in milliseconds representing when the property was updated.
      "source": "API",
      // String; The change source of the API. See the Contacts API overview for a list of possible sources
      "sourceId": null
      // String or null; Additional details about the change source, may be null depending on the specific source.
    },
    "created_by": {
      "versions": [
        {
          "name": "created_by",
          "value": "496346",
          "timestamp": 1522870759430,
          "source": "API",
          "sourceVid": []
        }
      ],
      "value": "496346",
      "timestamp": 1522870759430,
      "source": "API",
      "sourceId": null
    },
    "content": {
      "versions": [
        {
          "name": "content",
          "value": "These are the details of the ticket.",
          "timestamp": 1522872562016,
          "source": "API",
          "sourceVid": []
        }
      ],
      "value": "These are the details of the ticket.",
      "timestamp": 1522872562016,
      "source": "API",
      "sourceId": null
    },
    "status": {
      "versions": [
        {
          "name": "status",
          "value": "OPEN",
          "timestamp": 1522870759430,
          "source": "API",
          "sourceVid": []
        }
      ],
      "value": "OPEN",
      "timestamp": 1522870759430,
      "source": "API",
      "sourceId": null
    }
  },
  "isDeleted": false
  // Boolean; whether or not the ticket is deleted. Deleted records will not be included unless you specifically request that deleted records be included..
}

Tickets API docs

Get all tickets
Get a ticket by ID
Get a group of tickets by ID
Create a ticket
Create a group of tickets
Update a ticket
Update a group of tickets
Delete a ticket
Delete a group of tickets
Get a log of changes for tickets

Docs for this section or API