Upload Attachments
This document contains details for the /api/v1/envelope/attachment endpoint, including headers, request body, response fields, and status codes.
Endpoint
POST
/api/v1/envelope/attachment
Headers
Authorization
Yes
Bearer authorization token
Content-Type
Yes
multipart/form-data
Mailbox
No
UUID of the current mailbox context
Query parameters
type
string
No
File category: all, document, file, image, or archive
Request
Send the file as multipart/form-data in the required file field.
file
binary
Yes
File to upload
Request example
curl --request POST \
"https://{baseUrl}/api/v1/envelope/attachment?type=document" \
--header "Authorization: Bearer {token}" \
--header "Mailbox: {mailboxUuid}" \
--form "file=@contract.pdf"Let the HTTP client generate the multipart boundary automatically.
Response
The endpoint returns 201 Created with the uploaded attachment details.
filename
string
Name of the uploaded file
attachmentId
UUID
Identifier of the uploaded attachment
filesize
integer
Uploaded file size in bytes
contentType
string
MIME type of the uploaded file
updatedPdf
byte string
Updated PDF data when included in the response
Attachment references
Set attachmentUuid to the returned attachmentId.
External document
Use the attachment as an external envelope document:
File field
Use the attachment as a file field value:
Status codes
201
Attachment uploaded successfully
400
Invalid request body, query parameter, or headers
401
Missing, invalid, or expired authorization token
403
No access to the specified mailbox
413
Uploaded file exceeds the allowed size
Related topics
Last updated
Was this helpful?
