Answered

Create a Ticket with Attachments

  • 13 December 2023
  • 1 reply
  • 255 views

Hello!
I’m trying to create, using Intercom API, a ticket with one or more attachments.

I’ve created a Ticket Type that contains one Ticket Type Attribute (named Files) of data_type ‘files’.

Then, following the API documentation for the POST request to create a ticket, I’ve created this payload:

That, as long as the Files are an empty array ([]) works out.

If I try to add the files data, I always receive this kind of error:

 

Couple of details:

  • I’ve read the other similar question here with no luck
    • I have tried all the combinations for Files, like, a list of objects with one entry, an object containing a files property that is a list of objects and so on and so forth. Nothing.
  • I’ve checked the API documentation and this entry https://developers.intercom.com/docs/references/2.9/rest-api/api.intercom.io/Models/file_attribute/ is aligned with what I did, but still not working
  • I wasn’t able to find anywhere a specifics for the files data_type
  • I checked the github repos but I always find info related to conversation attachments, not ticket.

I have no other ideas...anyone could please help me?

One other question:

I have to provide an URL for the file(s). This URL will be referenced in the ticket (meaning that the URL must point to a persistent item) or will be somehow ingested by intercom and this means that the URL can be a temporary one, valid for the time requested by intercom to fetch it and upload internally?

 

Many thanks

icon

Best answer by Jacob Cox 24 December 2023, 23:43

View original

1 reply

Userlevel 4
Badge +5

Hi @Marcello !

Currently, it is not possible to add attachments to a ticket via the API. The feature is under consideration by the Product Team and it may be added to the API in the future.

For now, you’ll need to host that file in a content management system of some kind and then store the URL of that link in a custom attribute with a String/Text datatype.

Reply