Suspended Tickets

Name Type Read-only Mandatory Comment
id integer yes no Automatically assigned
url string yes no The API url of this ticket
author object yes no The author id (if available), name and email
subject string yes no The value of the subject field for this ticket
content string yes no The content that was flagged
cause string yes no Why the ticket was suspended
message_id string yes no The ID of the email, if available
ticket_id integer yes no The ticket ID this suspended email is associated with, if available
recipient string yes no The original recipient e-mail address of the ticket
created_at date yes no When this record was created
updated_at date yes no When this record last got updated
via Via yes no This object explains how the ticket was created
brand_id integer yes no The id of the brand this ticket is associated with - only applicable for enterprise accounts
Example
{
  "id":               435,
  "url":              "https://example.zendesk.com/api/v2/tickets/35436.json",
  "author":           { "id": 1, "name": "Mr. Roboto", "email": "styx@example.com" },
  "subject":          "Help, my printer is on fire!",
  "content":          "Out Of Office Reply",
  "cause":            "Detected as spam",
  "ticket_id":        67321,
  "recipient":        "john@example.com",
  "created_at":       "2009-07-20T22:55:29Z",
  "updated_at":       "2011-05-05T10:38:52Z",
  "brand_id":         123,
  "via": {
    "channel": "web"
  }
}

List Suspended Tickets

GET /api/v2/suspended_tickets.json

Allowed For
  • Unrestricted agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets.json \
  -v -u {email_address}:{password}
Sorting

You can sort the tickets with the sort_by and sort_order query string parameters.

The sort_by parameter accepts one of the following values: author_email, cause, created_at, or subject.

The sort_order parameter accepts one of the following values: asc or desc.

Example Response
Status: 200 OK

{
  "suspended_tickets": [
    {
      "id":      3436,
      "subject": "Help I need somebody!",
      "cause":   "Detected as spam",
      ...
    },
    {
      "id":      207623,
      "subject": "Not just anybody!",
      "cause":   "Automated response mail",
      ...
    },
  ]
}

Show Suspended Ticket

GET /api/v2/suspended_tickets/{id}.json

Allowed For
  • Unrestricted agents
Using curl:
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/{id}.json \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "suspended_ticket": {
    {
      "id":      35436,
      "subject": "My printer is on fire!",
      "cause":   "Automated response mail",
      ...
    }
  }
}

Recover Suspended Ticket

PUT /api/v2/suspended_tickets/{id}/recover.json

Note: During recovery, the API sets the requester to the authenticated agent who called the API, not the original requester. This prevents the ticket from being re-suspended after recovery. To preserve the original requester, use the Recover Multiple Suspended Tickets endpoint with the single ticket.

Allowed For
  • Unrestricted agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/{id}/recover.json \
  -X PUT -v -u {email_address}:{password} -d '{}' -H "Content-Type: application/json"
Example Response
Status: 200 OK

{
  "ticket": {
    {
      "id":      35436,
      "subject": "My printer is on fire!",
      ...
    }
  }
}

Recover Multiple Suspended Tickets

PUT /api/v2/suspended_tickets/recover_many.json?ids={id1},{id2}

Accepts up to 100 ticket ids. Note that suspended tickets that fail to be recovered are still included in the response.

Allowed For
  • Unrestricted agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/recover_many.json?ids={id1},{id2} \
  -H "Content-Type: application/json" -X PUT -d '{}' \
  -v -u {email_address}:{password}
Example Response
Status: 200 OK

{
  "tickets": [
    {
      "id":      35436,
      "subject": "Help I need somebody!",
      ...
    },
    {
      "id":      20057623,
      "subject": "Not just anybody!",
      ...
    }
  ]
}

Delete Suspended Ticket

DELETE /api/v2/suspended_tickets/{id}.json

Allowed For
  • Unrestricted agents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/{id}.json \
  -v -u {email_address}:{password} -X DELETE
Example Response
Status: 204 No Content

Delete Multiple Suspended Tickets

DELETE /api/v2/suspended_tickets/destroy_many.json?ids={id1},{id2}

Accepts up to 100 ticket ids.

Allowed For
  • Unrestricted aAgents
Using curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/destroy_many.json?ids={id1},{id2} \
  -v -u {email_address}:{password} -X DELETE
Example Response
Status: 204 No Content