Upload an Attachment

Uploads an attachment to a Help Desk ticket.
Help Desk
Upload an Attachment
 last updated: 
September 1, 2022

While uploading an attachment, you'll need to pass the sd-api-key and sd-dashboard-user-email in the header.

ENDPOINT

  1. POST /v1/ticket/:id/file

REQUEST

  1. curl --location --request POST 'https://test-api.solidfi.com/v1/ticket/file' \
  2. --header 'sd-api-key;' \
  3. --header 'sd-dashboard-user-email;' \
  4. --form 'attachment=@"/path/to/file"'

RESPONSE

  1. {
  2.     "token": "2GC43itXibOsggnLYID7EP6fA"
  3. }

Now that you have the fileToken, you can pass that In the request body when you Update the Ticket, as follows:

ENDPOINT

  1. PATCH /v1/ticket/:id

REQUEST

  1. {
  2.   "status": "open",
  3.   "comment": {
  4.     "body": "ticket update",
  5.     "fileToken": "2GC43itXibOsggnLYID7EP6fA"
  6.   }
  7. }

RESPONSE

  1. {
  2.     "id": "31766",
  3.     "subject": "Re: Ticket via API",
  4.     "description": "Testing API ticket comments.",
  5.     "status": "open",
  6.     "type": "incidents",
  7.     "priority": "",
  8.     "canBeSolved": false,
  9.     "createdAt": "2022-09-01T19:49:29Z",
  10.     "modifiedAt": "2022-09-01T20:07:01Z",
  11.     "latestComment": null,
  12.     "cc": [],
  13.     "accountId": "",
  14.     "personId": "per-c1df28cb-a889-41ea-9ab3-6b33c8985c0f",
  15.     "mode": "live"
  16. }