APIs & Integrations

DerekHub
Member

How to add dropdown property during ticket creation

Howdy,

 

I'm currently using https://legacydocs.hubspot.com/docs/methods/tickets/create-ticket to create a ticket into Hubspot.

 

Everything works fine. I'm currently working on being able to add in custom properties, which I have working.

 

[
  {
    "name": "subject",
    "value": "test"
  },
  {
    "name": "content",
    "value": "test content"
  },
  {
    "name": "CustomProperty1",
    "value": "Value1"
  },
  {
    "name": "CustomProperty2",
    "value": "Property2"
  },
  {
    "name": "hs_pipeline",
    "value": "0"
  },
  {
    "name": "hs_pipeline_stage",
    "value": "1"
  }
]

The above works just fine for custom properties that are a single line text.

 

However, I'm getting a 400 (bad request) when I try to insert a value for the property Category which is a 'Hubspot' created checkboxes.  

 

How do I set the property for a checkbox type when creating a ticket?

 

0 Upvotes
2 Replies 2
himanshurauthan
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

How to add dropdown property during ticket creation

Hii @DerekHub 

 

For Checkboxes (multiple options), we need to send value in this way: Value1;Value2;.....ValueN. You need to implode your list with semi-colon (;) . That's it.

 

Thanks

Digital Marketing & Inbound Expert In Growth Hacking Technology
DerekHub
Member

How to add dropdown property during ticket creation

[
  {
    "name": "subject",
    "value": "test"
  },
  {
    "name": "content",
    "value": "test content"
  },
  {
    "name": "CustProp1",
    "value": "Value1"
  },
  {
    "name": "CustProp2",
    "value": "VALUE2;"
  },
  {
    "name": "hs_pipeline",
    "value": "0"
  },
  {
    "name": "hs_pipeline_stage",
    "value": "1"
  }
]

This what I tried and it gave back a 400 error.
Is this correct with the semi-colon after?

0 Upvotes