Ticket Import

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

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 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

Allowed For
  • Admins
POST data
  • tickets an array of 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

See Job Status