Skip to main content
All CollectionsAPI DocumentationHow Tos
File uploads and downloads
File uploads and downloads
Updated over a week ago

File uploads and downloads are handled through REST APIs in SuperOps.ai.

Below, you’ll find all the information you need to create upload and download requests using these APIs.

File uploads

Here’s a sample template of a file upload request:

Request:

HTTP Method: POST

URL: /upload

Content-Type: multipart/form-data

Parameters:

  • module: This parameter specifies the entity to which the files are going to be uploaded.

  • files: The list of files that need to be uploaded

  • details: json, extra details required for the upload

Response:

{ "data": [ { "fileName": "aaa.png", "originalFileName": "aaa.png", "fileSize": 78492 } ], "errors": null }


📝 Note:
The fileName, originalFileName, and fileSize attributes in the response should be used in CreateAttachmentInput for the respective GraphQL APIs to store the attachments.


Ticket Conversation File upload:

For new tickets:

  • module:

    TICKET_CONVERSATION_ATTACHMENT

(Details are not required.)

For the existing ticket:

module:

TICKET_CONVERSATION_ATTACHMENT

details:

{ "ticketId": "<identifier of the ticket>" }

File downloads

Here’s a sample template of a file download request:

Request:

HTTP Method: GET

URL: /download

Query Parameters:

  • module: It specifies the entity from which the files will be downloaded

  • details: json, and any additional details required for the download. The fileName should be specified so that it can be obtained from the respective GraphQL APIs through the Attachment type.

Ticket Conversation Attachment download:

module: TICKET_CONVERSATION_ATTACHMENT

details:

{ "ticketId": "<identifier of the ticket>", 
"conversationId": "<identifier of the conversation>",
"fileName": "<name of the file to be downloaded>" }

Did this answer your question?