Ticket Import

You can use the imports API to move tickets in bulk from legacy systems into Zendesk Support.

In addition to setting normal ticket properties, you can set the following time stamps on the tickets: solved_at, updated_at, and created_at.

Attachments are handled the same way as in the tickets API. You upload the files then supply the token in the comment parameters. See Attaching files.

No triggers are run on the imported tickets. As a result, there won't be any detailed ticket metrics for the tickets. We recommend setting a tag to signify that these tickets were added to Zendesk Support using import.

Ticket Import

POST /api/v2/imports/tickets.json

Allowed For
  • Admins
POST data
  • ticket an object describing the ticket
{
  "ticket": {
    "requester_id": 827,
    "assignee_id": 19,
    "subject": "Some subject",
    "description": "A description",
    "tags": [ "foo", "bar" ],
    "comments": [
      { "author_id": 827, "value": "This is a comment", "created_at": "2009-06-25T10:15:18Z" },
      { "author_id": 19, "value": "This is a private comment", "public": false }
    ]
  }
}
Using curl
curl https://{subdomain}.zendesk.com/api/v2/imports/tickets.json \
  -v -u {email_address}:{password} -X POST \
  -d '{"ticket": {"subject": "Help", "comments": [{ "author_id": 19, "value": "This is a comment" }]}}' \
  -H "Content-Type: application/json"
Example Response
Status: 201 Created
Location: https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json

{
  "ticket": {
    {
      "id":      35436,
      "subject": "Help",
      ...
    }
  }
}

Ticket Bulk Import

POST /api/v2/imports/tickets/create_many.json

Accepts an array of up to 100 ticket objects.

Allowed For
  • Admins
POST data

The POST request takes a data object consisting of one array named tickets containing up to 100 ticket objects.

{
  "tickets": [
    {
      "requester_id": 827,
      "assignee_id": 19,
      "subject": "Some subject",
      "description": "A description",
      "tags": [ "foo", "bar" ],
      "comments": [
        { "author_id": 827, "value": "This is a comment", "created_at": "2009-06-25T10:15:18Z" },
        { "author_id": 19, "value": "This is a private comment", "public": false }
      ]
    },
    {
      "requester_id": 830,
      "assignee_id": 21,
      "subject": "Some subject",
      "description": "A description",
      "tags": [ "foo", "bar" ],
      "comments": [
        { "author_id": 830, "value": "This is a comment", "created_at": "2009-06-25T10:15:18Z" },
        { "author_id": 21, "value": "This is a private comment", "public": false }
      ]
    }
  ]
}
Using curl
curl https://{subdomain}.zendesk.com/api/v2/imports/tickets/create_many.json \
  -v -u {email_address}:{password} -X POST \
  -d '{"tickets": [{"subject": "Help!", "comments": [{ "author_id": 19, "value": "This is a comment" }]}, {"subject": "Help!!", "comments": [{ "author_id": 21, "value": "This is a comment" }]}]}' \
  -H "Content-Type: application/json"
Example Response

This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job's completion.