Generate a Presigned URL for an Attachment Upload

Generate a presigned URL to upload the file of a new attachment. This is step 1 of 3 to add an attachment. In step 2, upload the file to the presigned URL with an HTTP PUT request. In step 3, call POST /attachments with the path and generatedFileName of this response. For a service record, you must have the permission to edit the service record.

Body Params

The metadata of the attachment file to upload.

string
required

The file extension of the attachment, for example "png" or "jpg".

string
required
length between 1 and 20

The identifier of the source of the attachment, for example "service_request".

integer
required

The unique identifier of the resource that the attachment belongs to, for example the ID of a service record.

string
enum
required

The type of the resource that the attachment belongs to.

Allowed:
integer
required

The unique identifier of the sub-resource, such as a note, that the attachment belongs to.

string
enum
required

The type of the sub-resource that the attachment belongs to.

integer
required

The size of the attachment file in bytes.

string
required

The SHA-256 checksum of the attachment file. If the resource already has an attachment with the same checksum, POST /attachments/presigned-url returns 400.

Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json