I'm trying to create a side conversation email with attachments from an earlier step. I've tried passing both tokens from uploads as well as audit.event.attachment.ids.
In the documentation, JSON look like ""attachment_ids": ["s3-d2a3111e-26d9-4e1c-88b4-cf7c0649d81d"]. However I am unsure how or where to find that identifier:
- In the upload call, I get a token that looks like “9JKFuWB6keUmEciyMGqkcPGNe”
- In the ticket comment audit I get an integer that looks like "39944015826583"
- In an actual ticket, the file URL looks like “https://domain.zendesk.com/attachments/token/8f4pmH0EsE5utiGwwYlJ9rIlY/?name=file.txt”
Also, based on the documentation, it looks like I would pass an array of strings. Is that correct?
Thanks for sharing the details of your issue.
To create a side conversation with attachments via the API, you will indeed need to provide an array of attachment tokens in the attachment_ids field. These tokens are typically the upload tokens you receive when you first upload the files using the Uploads API endpoint, not the integer IDs from ticket audits or the URL strings.
Here’s a brief overview of the process:
- Upload your attachment file(s) via the Upload API. The response will include an upload token (a string like "9JKFuWB6keUmEciyMGqkcPGNe").
- Use this token in your side conversation creation call inside the attachment_ids array.
For example:Make sure you’re passing the upload tokens, not the audit IDs or URLs, as those aren’t accepted in this field.
Hope this helps clarify things!