There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Tickets API Overview

There's a new version of the Tickets API. We've redesigned our tickets API and it is out now in developer preview. Check out the new API

In HubSpot, a ticket represents a customer request for help or support. The Tickets API allows you to manage this data and sync it between HubSpot and other systems.

Tickets, along with companies, contacts, deals, line items, products, and quotes, are objects in the HubSpot CRM. For a more detailed look at all HubSpot record types, you can use our Guide to Records.

Ticket properties

Details for ticket records are stored in default and custom properties. Custom properties store specialized information and can be managed through the CRM Object Properties API.

Three properties must be set when creating a new ticket:

  • source_type - The original submission channel for the ticket, such as email, chat, or phone.
  • stage - The stage of the ticket within a pipeline, such as new, waiting, or closed.
  • created_by - The contact record that created the ticket, identified by the contact vID.

Tickets must have have a value for hs_pipeline_id. If hs_pipeline_id isn't specified when creating a ticket, the default pipeline will be used.

Associations

Tickets can be associated with contacts, companies, deals, or engagements. Ticket associations are managed through the CRM Associations API.

Response details

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 API 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
    },
    "hs_pipeline_stage": {
      "versions": [
        {
          "name": "hs_pipeline_stage",
          "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..
}

Docs for this section or API