Zendesk Attachments API

The Attachments API from Zendesk — 4 operation(s) for attachments.

Documentation

📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/introduction/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/targets/targets/
📖
Documentation
https://developer.zendesk.com/api-reference/sales-crm/resources/account/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/activity_stream/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/channel_framework/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/audit_logs/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/automations/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/bookmarks/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/brand_agents/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/brands/
📖
Documentation
https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/
📖
Documentation
https://developer.zendesk.com/api-reference/custom-data/introduction/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/custom_roles/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/custom_ticket_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/users/users/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/deletion_schedules/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/dynamic_content/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/email_notifications/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/group_sla_policies/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/groups/groups/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_import/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/job_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/locales/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/macros/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/oauth/oauth_tokens/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_fields/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_memberships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_subscriptions/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/push_notification_devices/
📖
Documentation
https://developer.zendesk.com/api-reference/agent-availability/omnichannel_routing_queues/omnichannel_routing_queues/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/support_addresses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/lookup_relationships/lookup_relationships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-requests/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/resource_collections/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/skill_based_routing/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_ratings/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_reasons/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/sessions/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/sharing_agreements/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_skips/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/sla_policies/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/suspended_tickets/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_audits/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_fields/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_form_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_forms/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_metrics/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/triggers/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/views/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/workspaces/

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

zendesk-attachments-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: '1.0'
  title: Zendesk Account Account Settings Attachments API
  description: Needs a description.
tags:
- name: Attachments
paths:
  /api/v2/attachments/{attachment_id}:
    get:
      operationId: ShowAttachment
      tags:
      - Attachments
      summary: Zendesk Get  Api V2 Attachments Attachment_id
      description: "Shows attachment details. You can get the value of the `attachment_id` parameter by listing the ticket's comments.\nSee [List Comments](/api-reference/ticketing/tickets/ticket_comments/#list-comments). Each comment\nin the list has an `attachments` list that specifies an `id` for each attachment.\n\n\n #### Allowed for\n\n * Agents\n"
      parameters:
      - $ref: '#/components/parameters/AttachmentId'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/AttachmentResponseExample'
    put:
      operationId: UpdateAttachment
      tags:
      - Attachments
      summary: Zendesk Put  Api V2 Attachments Attachment_id
      description: 'Toggles enabling or restricting agent access to attachments with detected malware.


        #### Allowed For


        * Admins

        '
      parameters:
      - $ref: '#/components/parameters/AttachmentId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachmentUpdateRequest'
            examples:
              default:
                $ref: '#/components/examples/AttachmentUpdateRequestExample'
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/AttachmentResponseExample'
  /api/v2/tickets/{ticket_id}/comments/{comment_id}/attachments/{attachment_id}/redact:
    parameters:
    - $ref: '#/components/parameters/TicketId'
    - $ref: '#/components/parameters/CommentId'
    - $ref: '#/components/parameters/AttachmentId'
    put:
      operationId: RedactCommentAttachment
      tags:
      - Attachments
      summary: Zendesk Put  Api V2 Tickets Ticket_id Comments Comment_id Attachments Attachment_id Redact
      description: 'Redaction allows you to permanently remove attachments from an existing comment on a ticket. Once removed from a comment, the attachment is replaced with an empty "redacted.txt" file.


        The redaction is permanent. It is not possible to undo redaction or see what was removed. Once a ticket is closed, redacting its attachments is no longer possible.


        Also, if you want to redact an inline attachment, you can use the `include_inline_images` parameter in the [List Comments](/api-reference/ticketing/tickets/ticket_comments/#list-comments) operation to obtain the inline attachment ID, and use it in the request URL.


        #### Allowed For


        * Admins

        * Agents when [deleting tickets is enabled for agents on professional accounts](https://support.zendesk.com/hc/en-us/articles/360002128107)

        * Agents assigned to a custom role with permissions to redact ticket content (Enterprise only)

        '
      responses:
        '200':
          description: OK response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/AttachmentResponseExample'
  /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:
    AttachmentResponse:
      type: object
      properties:
        attachment:
          $ref: '#/components/schemas/AttachmentObject'