In most cases, when an end user submits a support request by email, the email becomes a new ticket or adds a comment to an existing ticket. However, in certain cases, the email becomes a suspended ticket. It remains suspended until someone reviews the email and decides whether to accept or reject it. If no one reviews it, the email is deleted after 14 days.

You can use this API to list, recover, or delete suspended tickets. For more information about suspended tickets, see Understanding and managing suspended tickets and spam and Guidelines for reviewing suspended tickets in Zendesk help.

JSON format

Suspended Tickets are represented as JSON objects with the following properties:

NameTypeRead-onlyMandatoryDescription
attachmentsarraytruefalseThe attachments, if any associated to this suspended ticket. See Attachments
authorobjecttruefalseThe author id (if available), name and email
brand_idintegertruefalseThe id of the brand this ticket is associated with. Only applicable for Enterprise accounts
causestringtruefalseWhy the ticket was suspended
cause_idintegertruefalseThe ID of the cause
contentstringtruefalseThe content that was flagged
created_atstringtruefalseThe ticket ID this suspended email is associated with, if available
error_messagesarraytruefalseThe error messages if any associated to this suspended ticket
idintegertruefalseAutomatically assigned
message_idstringtruefalseThe ID of the email, if available
recipientstringtruefalseThe original recipient e-mail address of the ticket
subjectstringtruefalseThe value of the subject field for this ticket
ticket_idintegertruefalseThe ticket ID this suspended email is associated with, if available
updated_atstringtruefalseWhen the ticket was assigned
urlstringtruefalseThe API url of this ticket
viaobjecttruefalseAn object explaining how the ticket was created. See the Via object reference

Example

{  "attachments": [],  "author": {    "email": "[email protected]",    "id": 1111,    "name": "Mr. Roboto"  },  "brand_id": 123,  "cause": "Detected as spam",  "cause_id": 0,  "content": "Out Of Office Reply",  "created_at": "2009-07-20T22:55:29Z",  "error_messages": null,  "id": 435,  "message_id": "[email protected]",  "recipient": "[email protected]",  "subject": "Help, my printer is on fire!",  "ticket_id": 67321,  "updated_at": "2011-05-05T10:38:52Z",  "url": "https://example.zendesk.com/api/v2/tickets/35436.json",  "via": {    "channel": "email",    "source": {      "from": {        "address": "[email protected]",        "name": "TotallyLegit"      },      "rel": null,      "to": {        "address": "[email protected]",        "name": "Example Account"      }    }  }}

List Suspended Tickets

  • GET /api/v2/suspended_tickets

Allowed For

Sorting

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

Pagination

  • Cursor pagination

See Pagination.

Parameters

NameTypeInRequiredDescription
sort_bystringQueryfalseThe field to sort the suspended tickets by. One of "author_email", "cause", "created_at", or "subject"
sort_orderstringQueryfalseThe order in which to sort the suspended tickets. This can take value asc or desc.

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets.json \  -v -u {email_address}/token:{api_token}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/suspended_tickets?sort_by=author_email&sort_order=asc"	method := "GET"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/suspended_tickets")		.newBuilder()		.addQueryParameter("sort_by", "author_email")		.addQueryParameter("sort_order", "asc");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("GET", null)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", basicAuth)		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'GET',  url: 'https://example.zendesk.com/api/v2/suspended_tickets',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"  },  params: {    'sort_by': 'author_email',    'sort_order': 'asc',  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuth
url = "https://example.zendesk.com/api/v2/suspended_tickets?sort_by=author_email&sort_order=asc"headers = {	"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(	"GET",	url,	auth=auth,	headers=headers)
print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/suspended_tickets")uri.query = URI.encode_www_form("sort_by": "author_email", "sort_order": "asc")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "suspended_tickets": [    {      "attachments": [],      "author": {        "email": "[email protected]",        "id": 1,        "name": "Mr. Roboto"      },      "brand_id": 123,      "cause": "Detected as spam",      "cause_id": 0,      "content": "Out Of Office Reply",      "created_at": "2009-07-20T22:55:29Z",      "error_messages": null,      "id": 435,      "message_id": "[email protected]",      "recipient": "[email protected]",      "subject": "Help, my printer is on fire!",      "ticket_id": 67321,      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://example.zendesk.com/api/v2/tickets/35436.json",      "via": {        "channel": "email",        "source": {          "from": {            "address": "[email protected]",            "name": "TotallyLegit"          },          "rel": null,          "to": {            "address": "[email protected]",            "name": "Example Account"          }        }      }    },    {      "attachments": [],      "author": {        "email": "[email protected]",        "id": 1,        "name": "Mr. Roboto"      },      "brand_id": 123,      "cause": "Automated response mail",      "cause_id": 0,      "content": "Out Of Office Reply",      "created_at": "2009-07-20T22:55:29Z",      "error_messages": null,      "id": 207623,      "message_id": "[email protected]",      "recipient": "[email protected]",      "subject": "Not just anybody!",      "ticket_id": 67321,      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://example.zendesk.com/api/v2/tickets/35436.json",      "via": {        "channel": "email",        "source": {          "from": {            "address": "[email protected]",            "name": "TotallyLegit"          },          "rel": null,          "to": {            "address": "[email protected]",            "name": "Example Account"          }        }      }    }  ]}

Show Suspended Ticket

  • GET /api/v2/suspended_tickets/{id}

Allowed For

Parameters

NameTypeInRequiredDescription
idnumberPathtrueid of the suspended ticket

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/{id}.json \  -v -u {email_address}/token:{api_token}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/suspended_tickets/35436"	method := "GET"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/suspended_tickets/35436")		.newBuilder();String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("GET", null)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", basicAuth)		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'GET',  url: 'https://example.zendesk.com/api/v2/suspended_tickets/35436',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuth
url = "https://example.zendesk.com/api/v2/suspended_tickets/35436"headers = {	"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(	"GET",	url,	auth=auth,	headers=headers)
print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/suspended_tickets/35436")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "suspended_tickets": [    {      "attachments": [],      "author": {        "email": "[email protected]",        "id": 1,        "name": "Mr. Roboto"      },      "brand_id": 123,      "cause": "Detected as spam",      "cause_id": 0,      "content": "Out Of Office Reply",      "created_at": "2009-07-20T22:55:29Z",      "error_messages": null,      "id": 435,      "message_id": "[email protected]",      "recipient": "[email protected]",      "subject": "Help, my printer is on fire!",      "ticket_id": 67321,      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://example.zendesk.com/api/v2/tickets/35436.json",      "via": {        "channel": "email",        "source": {          "from": {            "address": "[email protected]",            "name": "TotallyLegit"          },          "rel": null,          "to": {            "address": "[email protected]",            "name": "Example Account"          }        }      }    },    {      "attachments": [],      "author": {        "email": "[email protected]",        "id": 1,        "name": "Mr. Roboto"      },      "brand_id": 123,      "cause": "Automated response mail",      "cause_id": 0,      "content": "Out Of Office Reply",      "created_at": "2009-07-20T22:55:29Z",      "error_messages": null,      "id": 207623,      "message_id": "[email protected]",      "recipient": "[email protected]",      "subject": "Not just anybody!",      "ticket_id": 67321,      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://example.zendesk.com/api/v2/tickets/35436.json",      "via": {        "channel": "email",        "source": {          "from": {            "address": "[email protected]",            "name": "TotallyLegit"          },          "rel": null,          "to": {            "address": "[email protected]",            "name": "Example Account"          }        }      }    }  ]}

Recover Suspended Ticket

  • PUT /api/v2/suspended_tickets/{id}/recover

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.

This endpoint does not queue an asynchronous job that can be tracked from Job Statuses. Instead, it processes the request with a synchronous response.

  • If all recoveries are successful, it returns a 200 with a tickets array in the response.
  • If all recoveries fail, it returns a 422 with a suspended_tickets array in the response.
  • If there is a mixture of successes and failures in a single call, it returns a 422 with a suspended_tickets array of the failures in the response.

Allowed For

Parameters

NameTypeInRequiredDescription
idnumberPathtrueid of the suspended ticket

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/{id}/recover.json \  -v -u {email_address}/token:{api_token} -X PUT
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/suspended_tickets/35436/recover"	method := "PUT"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/suspended_tickets/35436/recover")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""""");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("PUT", body)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", basicAuth)		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'PUT',  url: 'https://example.zendesk.com/api/v2/suspended_tickets/35436/recover',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuth
url = "https://example.zendesk.com/api/v2/suspended_tickets/35436/recover"headers = {	"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(	"PUT",	url,	auth=auth,	headers=headers)
print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/suspended_tickets/35436/recover")request = Net::HTTP::Put.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "ticket": [    {      "author": {        "email": "[email protected]",        "id": 66,        "name": "Spammer"      },      "brand_id": 123,      "cause": "Detected as spam",      "cause_id": 0,      "content": "Visit http://casino.spam.com",      "created_at": "2009-07-20T22:55:29Z",      "id": 3436,      "recipient": "[email protected]",      "subject": "Free Casino Money!",      "ticket_id": 67321,      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://example.zendesk.com/api/v2/tickets/67321.json",      "via": {        "channel": "web"      }    }  ]}
422 Unprocessable Entity
// Status 422 Unprocessable Entity
{  "ticket": [    {      "author": {        "email": "[email protected]",        "id": 1,        "name": "Help"      },      "brand_id": 123,      "cause": "Received from support address",      "cause_id": 22,      "content": "Your request has been received and is being reviewed by our support staff.",      "created_at": "2023-04-06T20:51:31Z",      "error_messages": null,      "id": 14668816692628,      "message_id": "<[email protected]>",      "recipient": "[email protected]",      "subject": "Received from support address",      "ticket_id": 14668816692628,      "updated_at": "2023-04-06T20:51:31Z",      "url": "https://example.zendesk.com/api/v2/tickets/14668816692628.json",      "via": {        "channel": "email",        "source": {          "from": {            "address": "[email protected],",            "name": "Help"          },          "rel": null,          "to": {            "address": "[email protected]",            "name": "Support,"          }        }      }    }  ]}

Recover Multiple Suspended Tickets

  • PUT /api/v2/suspended_tickets/recover_many?ids={ids}

Accepts up to 100 ids (the auto-generated id, not the ticket id.) Note that suspended tickets that fail to be recovered are still included in the response.

Allowed For

Parameters

NameTypeInRequiredDescription
idsstringQuerytrueA comma separated list of ids of suspended tickets to recover.

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/recover_many.json?ids={id1},{id2} \  -v -u {email_address}/token:{api_token} -X PUT
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/suspended_tickets/recover_many?ids=14%2C77"	method := "PUT"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/suspended_tickets/recover_many")		.newBuilder()		.addQueryParameter("ids", "14,77");RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""""");String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("PUT", body)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", basicAuth)		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'PUT',  url: 'https://example.zendesk.com/api/v2/suspended_tickets/recover_many',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"  },  params: {    'ids': '14%2C77',  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuth
url = "https://example.zendesk.com/api/v2/suspended_tickets/recover_many?ids=14%2C77"headers = {	"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)
response = requests.request(	"PUT",	url,	auth=auth,	headers=headers)
print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://example.zendesk.com/api/v2/suspended_tickets/recover_many")uri.query = URI.encode_www_form("ids": "14,77")request = Net::HTTP::Put.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "tickets": [    {      "author": {        "email": "[email protected]",        "id": 1,        "name": "Mr. Roboto"      },      "brand_id": 123,      "cause": "Detected as spam",      "content": "Out Of Office Reply",      "created_at": "2009-07-20T22:55:29Z",      "id": 3436,      "recipient": "[email protected]",      "subject": "Help I need somebody!",      "ticket_id": 67321,      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://example.zendesk.com/api/v2/tickets/35436.json",      "via": {        "channel": "web"      }    },    {      "author": {        "email": "[email protected]",        "id": 1,        "name": "Mr. Roboto"      },      "brand_id": 123,      "cause": "Detected as spam",      "content": "Out Of Office Reply",      "created_at": "2009-07-20T22:55:29Z",      "id": 3437,      "recipient": "[email protected]",      "subject": "Not just anybody!",      "ticket_id": 67321,      "updated_at": "2011-05-05T10:38:52Z",      "url": "https://example.zendesk.com/api/v2/tickets/35436.json",      "via": {        "channel": "web"      }    }  ]}

Delete Suspended Ticket

  • DELETE /api/v2/suspended_tickets/{id}

Allowed For

  • Unrestricted agents

Parameters

NameTypeInRequiredDescription
idnumberPathtrueid of the suspended ticket

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/suspended_tickets/{id}.json \  -v -u {email_address}/token:{api_token} -X DELETE
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/suspended_tickets/35436"	method := "DELETE"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add(