Importing conversations via API

<div class="article-banners">
<div id="docs-wmp-link"><a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" target="_blank" rel="noopener noreferrer">What's my plan?</a></div>
<div class="article-banner" id="addon_zqa"><figure class="wysiwyg-table wysiwyg-table-align-left"><table style="margin-left: 0px; margin-right: auto;"><tbody><tr>
<td><strong>Add-on</strong></td>
<td>Quality Assurance (QA) or Workforce Engagement Management (WEM)</td>
</tr></tbody></table></figure></div>
</div><p>This article explains how to import conversations into Zendesk QA using the API. By following these steps, you can seamlessly integrate your customer interactions into Zendesk QA for review and analysis.</p><p>This article contains the following sections:</p><ul>
<li data-list-item-id="e77b75a4704cb2b8b50a7ec9058cee386"><a href="#setting-up-api-connection">Setting up the API connection</a></li>
<li data-list-item-id="e45ea84bcd568a6981f993672f30fc74f"><a href="#importing-conversations">Importing conversations</a></li>
<li data-list-item-id="ec94fd3cc71ddbe3a794c6c2179ff5b86"><a href="#example-payload">Example payload</a></li>
<li data-list-item-id="e0b54702a0025808b9917451392a8cd72"><a href="#sending-request">Sending the request</a></li>
</ul><h2 id="setting-up-api-connection">Setting up the API connection</h2><p>Before you can import conversations, you need to set up an <a href="https://support.zendesk.com/hc/en-us/articles/7043669282714" target="_blank" rel="noopener noreferrer">API connection</a> in your Zendesk QA account. You will need the API token from that step to continue.</p><h2 id="importing-conversations">Importing conversations</h2><p>To import conversations, you need to make a POST request to <code>{yoursubdomain}.zendesk.com/qa/api/import/</code> and set the API token as a Bearer token in the <strong>Authorization</strong> header.</p><h3 id="h_01J446XSEW39AWHVBP3P8R80RZ">Payload properties</h3><p>Here are the properties you need to include in your payload:</p><ul>
<li data-list-item-id="e9c9f226d4df5796512890db4046ebaf1">
<code>id</code>: A unique identifier, preferably the same as in your system. You can later update a conversation or a comment via this ID.</li>
<li data-list-item-id="ed31e508012b5c50027f5dd365db3f98b">
<code>subject</code>, <code>description</code>, and <code>assigneeName</code>: Simple strings displayed to the user.</li>
<li data-list-item-id="e45f510f2505994095826c1282cddc018">
<code>created</code>: A timestamp in the format <code>yyyy-mm-ddThh:mm:ss</code>.</li>
<li data-list-item-id="e643fbcec26fbb07757bd4fb790bafb8e">
<code>updated</code>: An optional field that can be provided later to enhance filtering capabilities in Zendesk QA (the expected format is the same as for the <code>created</code> field).</li>
<li data-list-item-id="ec6a08811d1372d5e97424e978f686f9d">
<code>assigneeEmail</code>: Must match an internal user's email on Zendesk QA for the conversation to be reviewable. Alternatively, a comment's <code>authorEmail</code> must match an internal user's email for a specific comment to be reviewed.</li>
<li data-list-item-id="ed25770f3ae0b5861fb956f9ebb7b3c3c">
<code>ticketFields</code>: Optional fields that can help when filtering for specific conversations.</li>
<li data-list-item-id="ec22e92e19c7fec2b6c1cfc6f054240f3">
<code>comments</code>: Represents the replies under a conversation. You can send in Markdown or HTML in the reply's <code>comment</code> field. If you set <code>authorIsNotClient</code> to <code>true</code>, the <code>authorEmail</code> will be added as an external user, allowing you to connect or invite them.</li>
</ul><h2 id="example-payload">Example payload</h2><p>Here is an example payload for a conversation:</p><pre class="wysiwyg-code-block"><code class="language-auto">{
"data": [
{
"id": "c4t-syst3m-335",
"subject": "My fish bowl looks fishy",
"description": "Hi, I just received my fish bowl. But it is fishless, which makes the situation quite fishy",
"created": "2020-04-16T11:24:51",
"updated": "2020-04-17T13:48:26",
"assigneeEmail": "jane@example.com",
"assigneeName": "Jane",
"ticketFields": [
{
"id": "channel",
"label": "Channel",
"values": [
{
"label": "Chat",
"value": "chat"
}
]
}
],
"comments": [
{
"authorEmail": "klaus@cat.design",
"authorIsNotClient": false,
"authorName": "Zendesk QA",
"comment": "Hi, I just received my fish bowl. But it is fishless, which makes the situation quite fishy. Please get back to me ASAP on this.\n\nBest, Zendesk QA",
"created": "2020-04-16T11:24:51",
"id": "c4t-syst3m-335-1"
},
{
"authorEmail": "robert@example.com",
"authorIsNotClient": true,
"authorName": "Robert",
"comment": "Hi, Zendesk QA!\n\nI looked into your order and it seems you ordered our fishless fish bowl. I will loop in Jane who handles our orders to get this sorted out. We will get back to you shortly.\n\nBest, Robert",
"created": "2020-04-16T11:29:16",
"id": "c4t-syst3m-335-2"
},
{
"authorEmail": "klaus@cat.design",
"authorIsNotClient": false,
"authorName": "Zendesk QA",
"comment": "Thank you Robert. If I would cover the difference in costs and ship back the fishless bowl, could you please send out the fishy fish bowl?",
"created": "2020-04-16T11:24:51",
"id": "c4t-syst3m-335-3"
},
{
"authorEmail": "jane@example.com",
"authorIsNotClient": true,
"authorName": "Jane",
"comment": "Hey Zendesk QA, Jane here\n\nIt seems that our system had not marked the fishy fish bowl as out of stock and that is why you were able to pay for one. Sorry for this mistake, we will cover the shipping costs and send out a fishy bowl. Is the address still valid?\n\nBest, Jane",
"created": "2020-04-17T10:04:29",
"id": "c4t-syst3m-335-4"
},
{
"authorEmail": "klaus@cat.design",
"authorIsNotClient": false,
"authorName": "Zendesk QA",
"comment": "That is wonderful news, Jane! Yes, feel free to use the same address. I'll be eagerly waiting\n-Zendesk QA",
"created": "2020-04-17T12:09:43",
"id": "c4t-syst3m-335-5"
}
]
}
]
}</code></pre><h2 id="sending-request">Sending the request</h2><p>To send the request, use the following <code>curl</code> command:</p><pre class="wysiwyg-code-block"><code class="language-auto">curl ' {yoursubdomain}.zendesk.com/qa/api/import/tickets' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer &lt;api_token&gt;' \
--request POST \
--data '{ "data": [ { "id": "c4t-syst3m-335", "subject": "My fish bowl looks fishy", "description": "Hi, I just received my fish bowl. But it is fishless, which makes the situation quite fishy", "created": "2020-04-16T11:24:51", "updated": "2020-04-17T13:48:26", "assigneeEmail": "jane@example.com", "assigneeName": "Jane", "ticketFields": [ { "id": "channel", "label": "Channel", "values": [ { "label": "Chat", "value": "chat" } ] } ], "comments": [ { "authorEmail": "klaus@cat.design", "authorIsNotClient": false, "authorName": "Zendesk QA", "comment": "Hi, I just received my fish bowl. But it is fishless, which makes the situation quite fishy. Please get back to me ASAP on this.\n\nBest, Zendesk QA", "created": "2020-04-16T11:24:51", "id": "c4t-syst3m-335-1" }, { "authorEmail": "robert@example.com", "authorIsNotClient": true, "authorName": "Robert", "comment": "Hi, Zendesk QA!\n\nI looked into your order and it seems you ordered our fishless fish bowl. I will loop in Jane who handles our orders to get this sorted out. We will get back to you shortly.\n\nBest, Robert", "created": "2020-04-16T11:29:16", "id": "c4t-syst3m-335-2" }, { "authorEmail": "klaus@cat.design", "authorIsNotClient": false, "authorName": "Zendesk QA", "comment": "Thank you Robert. If I would cover the difference in costs and ship back the fishless bowl, could you please send out the fishy fish bowl?", "created": "2020-04-16T11:24:51", "id": "c4t-syst3m-335-3" }, { "authorEmail": "jane@example.com", "authorIsNotClient": true, "authorName": "Jane", "comment": "Hey Zendesk QA, Jane here\n\nIt seems that our system had not marked the fishy fish bowl as out of stock and that is why you were able to pay for one. Sorry for this mistake, we will cover the shipping costs and send out a fishy bowl. Is the address still valid?\n\nBest, Jane", "created": "2020-04-17T10:04:29", "id": "c4t-syst3m-335-4" }, { "authorEmail": "klaus@cat.design", "authorIsNotClient": false, "authorName": "Zendesk QA", "comment": "That is wonderful news, Jane! Yes, feel free to use the same address. I will be eagerly waiting\n-Zendesk QA", "created": "2020-04-17T13:48:26", "id": "c4t-syst3m-335-5" } ] } ] }'</code></pre><p>You can now see your conversation on Zendesk QA and review it.</p><p><img src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/zqa_7043724785178_1.png" width="600"></p><p>Please refer to our <a href="https://pub.klausapp.com/?urls.primaryName=Public%20Import%20API" target="_blank" rel="noopener noreferrer"><strong>public API's specification</strong></a> page for all the available query parameters, including filtering by scorecard tags, comment hashtags, and more.</p><script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/7043724785178",
"url": "https://support.zendesk.com/hc/en-us/articles/7043724785178-Importing-conversations-via-API-non-migrated-accounts",
"headline": "Importing conversations via API (non-migrated accounts)",
"description": "You can import conversations into the Quality Assurance system by setting up an API connection and sending a POST request with a specified payload to include conversation details and comments for review.",
"articleSection": "Integrating Zendesk QA",
"datePublished": "2024-04-10T01:22:45+00:00",
"dateModified": "2026-01-02T18:21:00+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/7043724785178"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"@id": "https://support.zendesk.com/hc/"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk",
"@id": "https://www.zendesk.com",
"softwareAddOn": {
"@type": "SoftwareApplication",
"name": "Quality Assurance",
"@id": "https://support.zendesk.com/hc/en-us/sections/6999625340058"
}
}
}</script>