APIs & Integrations

tripg
Member

Including HTML content via Tickets API

I am working on a potential integration with the Tickets API with the goal of being able to embed HTML inside a ticket.  From what I can see in the API docs, only plain text strings are supported.

 

In the API docs sample:

 

[
  {
    "name": "subject",
    "value": "This is an example ticket"
  },
  {
    "name": "content",
    "value": "Here are the details of the ticket."
  },
  {
    "name": "hs_pipeline",
    "value": "0"
  },
  {
    "name": "hs_pipeline_stage",
    "value": "1"
  }
]

"value" is always a plain text string.  Is there support for HTML, as well, in the "value" field and I just missed that in the documentation somewhere?

 

In the Engagements API, for instance, there are fields for both html and text:

 

"html": "<div>This is the body of the email</div><div><br></div><div>-Me</div>",
"text": "This is the body of the email\n\n-Me"

Will "value" except both plain text and HTML, or is it the equivalent of "text" in the Engagements API?

 

Thanks.

 

 

0 Upvotes
4 Replies 4
cbarley
HubSpot Alumni
HubSpot Alumni

Including HTML content via Tickets API

Hi @tripg , at this time the Tickets API only accepts plaintext and not HTML

0 Upvotes
tripg
Member

Including HTML content via Tickets API

Thanks @cbarley .  That is good to know.

 

I’m sure you can’t answer this as it is probably an unknown, but are there any plans to support HTML in the future?

 

Also, how about the inclusion of hyperlinks?  Would they become active/clickable or are they stripped of their link nature and remain plain text?

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Including HTML content via Tickets API

Hi @tripg , I can check on that but I'm not sure. Hyperlinks seem to work if I use an href tag as you can can see from this screenshot. I can click on the button to open it in a new window: http://prntscr.com/mv91yf

 

You can use HTML in multiline text fields, but it will just show up as HTML in the CRM. If you use that property somewhere as a token within a marketing email, for example, the HTML will actually be rendered. In the CRM, however, HTML markup won't actually get rendered.

0 Upvotes
tripg
Member

Including HTML content via Tickets API

Thanks for looking into that @cbarley .  The information is very helpful.

0 Upvotes