File attachments can be included on a side conversation.

Admins can also permanently redact side conversation attachments with dedicated redact endpoint.

JSON format

Side Conversation Attachments are represented as JSON objects with the following properties:

NameTypeRead-onlyMandatoryDescription
content_typestringtruefalseThe content type of the attachment
heightintegertruefalseThe height of the attachment image
idstringtruefalseThe id of the side conversation attachment
namestringfalsefalseThe name of the attachment
sizeintegertruefalseThe size of the attachment
widthintegertruefalseThe width of the attachment image

Example

{  "content_type": "image/png",  "height": 214,  "id": "s3-d2a3111e-26d9-4e1c-88b4-cf7c0649d81d",  "name": "image.png",  "size": 50645,  "width": 406}

Create Side Conversation Attachments

  • POST /api/v2/tickets/side_conversations/attachments

Creates a new side conversation attachment.

Allowed For

  • Agents

Request Body

Takes a file object as multipart/form-data for the uploaded attachment.

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/tickets/side_conversations/attachments.json \  -F '[email protected]' \  -H "Content-Type: multipart/form-data" -v -u {email_address}/token:{api_token} -X POST
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://support.zendesk.com/api/v2/tickets/side_conversations/attachments"	method := "POST"	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://support.zendesk.com/api/v2/tickets/side_conversations/attachments")		.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("POST", body)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", basicAuth)		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'POST',  url: 'https://support.zendesk.com/api/v2/tickets/side_conversations/attachments',  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://support.zendesk.com/api/v2/tickets/side_conversations/attachments"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(	"POST",	url,	auth=auth,	headers=headers)
print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://support.zendesk.com/api/v2/tickets/side_conversations/attachments")request = Net::HTTP::Post.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)

201 Created
// Status 201 Created
{  "content_type": "image/png",  "height": 214,  "id": "s3-d2a3111e-26d9-4e1c-88b4-cf7c0649d81d",  "name": "image.png",  "size": 50645,  "width": 406}

Redact Side Conversation Attachment

  • PUT /api/v2/tickets/{ticket_id}/side_conversations/{side_conversation_id}/attachments/{attachment_id}/redact

Permanently removes the content of a side conversation attachment. Once removed, image attachments are replaced with a redacted.png placeholder and all other file types are replaced with an empty redacted.txt file. The attachment entry remains visible in the message.

The redaction is permanent. It is not possible to undo redaction or recover what was removed.

Use List Side Conversation Events to find attachment ids before calling this endpoint.

This endpoint works for email, Slack, and Microsoft Teams side conversations. Side conversations that spawned child tickets are not supported — use the Redact Comment Attachment endpoint instead.

Allowed For

  • Admins

Request Body

No request body required.

Notes

  • Redaction keeps the attachment id and download URL stable, but serves the replacement file instead of the original
  • If attachment was already redacted, endpoint returns 422 Unprocessable Entity
  • If side conversation spawned child ticket, endpoint returns 422 Unprocessable Entity

Parameters

NameTypeInRequiredDescription
attachment_idstringPathtrueThe id of side conversation attachment
side_conversation_idstringPathtrueThe id of the side conversation
ticket_idintegerPathtrueThe id of the ticket

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/tickets/{ticket_id}/side_conversations/{side_conversation_id}/attachments/{attachment_id}/redact.json \  -H "Content-Type: application/json" -v -u {email_address}/token:{api_token} -X PUT
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://support.zendesk.com/api/v2/tickets/1/side_conversations/e9ad3991-35e8-445e-a8cc-3d56862cb1f7/attachments/s3-79cf3e8b-910c-4f1c-bc18-266543524816/redact"	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://support.zendesk.com/api/v2/tickets/1/side_conversations/e9ad3991-35e8-445e-a8cc-3d56862cb1f7/attachments/s3-79cf3e8b-910c-4f1c-bc18-266543524816/redact")		.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://support.zendesk.com/api/v2/tickets/1/side_conversations/e9ad3991-35e8-445e-a8cc-3d56862cb1f7/attachments/s3-79cf3e8b-910c-4f1c-bc18-266543524816/redact',  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://support.zendesk.com/api/v2/tickets/1/side_conversations/e9ad3991-35e8-445e-a8cc-3d56862cb1f7/attachments/s3-79cf3e8b-910c-4f1c-bc18-266543524816/redact"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://support.zendesk.com/api/v2/tickets/1/side_conversations/e9ad3991-35e8-445e-a8cc-3d56862cb1f7/attachments/s3-79cf3e8b-910c-4f1c-bc18-266543524816/redact")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
{  "attachment": {    "id": "s3-79cf3e8b-910c-4f1c-bc18-266543524816",    "redacted": true  }}
403 Forbidden
// Status 403 Forbidden
null
404 Not Found
// Status 404 Not Found
null
422 Unprocessable Entity
// Status 422 Unprocessable Entity
{  "error": "Attachment has already been redacted"}
429 Too Many Requests
// Status 429 Too Many Requests
null