Zendesk Uploads API

The Zendesk Uploads API lets you upload files to Zendesk Support so they can be attached to tickets or embedded inline in ticket comments. When you POST a file, the API creates an upload and returns metadata plus a short-lived token. You then include one or more of these tokens when creating or updating a ticket to add the files as attachments. The API supports single-shot and chunked uploads (for large files), and provides endpoints to check an uploads details or delete it.

OpenAPI Specification

uploads-openapi-original.yml Raw ↑
openapi: 3.1.0
info:
  version: "1.0"
  title: Zendesk Uploads
  description: Needs a description.
paths:
  /api/v2/uploads:
    post:
      operationId: UploadFiles
      tags:
        - Attachments
      summary: Zendesk Post  Api V2 Uploads
      description: >
        Uploads a file that can be attached to a ticket comment. It doesn't
        attach the file to the comment. For details and examples, see [Attaching
        ticket comments with the
        API](/documentation/ticketing/using-the-zendesk-api/adding-ticket-attachments-with-the-api).


        The endpoint has a required `filename` query parameter. The parameter
        specifies what the file will be named when attached to the ticket
        comment (to give the agent more context about the file). The parameter
        does not specify the file on the local system to be uploaded. While the
        two names can be different, their file extensions must be the same. If
        they don't match, the agent's browser or file reader could give an error
        when attempting to open the attachment.


        The `Content-Type` header must contain a recognized MIME type that
        correctly describes the type of the uploaded file. Failing to send a
        recognized, correct type may cause undesired behavior. For example,
        in-browser audio playback may be interrupted by the browser's security
        mechanisms for MP3s uploaded with an incorrect type.


        Adding multiple files to the same upload is handled by splitting
        requests and passing the API token received from the first request to
        each subsequent request. The token is valid for 60 minutes.


        **Note**: Even if [private
        attachments](https://support.zendesk.com/hc/en-us/articles/204265396)
        are enabled in the Zendesk Support instance, uploaded files are visible
        to any authenticated user at the `content_URL` specified in the [JSON
        response](#json-format) until the upload token is consumed. Once a file
        is associated with a ticket or post, visibility is restricted to users
        with access to the ticket or post with the attachment.


        #### Allowed For


        * End users
      responses:
        '201':
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentUploadResponse'
              examples:
                default:
                  $ref: '#/components/examples/AttachmentUploadResponseExample'
  /api/v2/uploads/{token}:
    delete:
      operationId: DeleteUpload
      tags:
        - Attachments
      summary: Zendesk Delete  Api V2 Uploads Token
      description: |
        #### Allowed for

        * End Users
      parameters:
        - name: token
          in: path
          description: The token of the uploaded attachment
          required: true
          schema:
            type: string
          example: 6bk3gql82em5nmf
      responses:
        '204':
          description: No Content response
components:
  schemas: {}
tags:
  - name: Attachments