Skip to main content

Send file by email

A request to export file.

POST /api/v1/files/{fileId}/email HTTP/1.1
  1. Path parameters
ParameterDescription
fileIdThe ID of the file.
  1. Request parameters
ParameterDescription
recipientArray with recipient emails
userMessageUser message to add in email.
attachFileAttach file itself or send link to the file instead.
mediaTypeAttachment mediaType ( See exportFormats[].targets[] array at Authenticate user through FS service for mobile ) [Since 2018.01]
  1. Example request
curl 'http://localhost:8080/api/v1/files/189409595/email' -i -X POST \
-H 'X-co-auth-token: 157eb0031e3b1954ea3d73dca0e96964' \
-d 'recipient=%5B%22testsrvdocs2%40tacos.devoffice.ru%22%5D&userMessage=Here%27s+the+file+you+asked+for&attachFile=true&mediaType=application%2Fvnd.oasis.opendocument.text'
  1. Example response
HTTP/1.1 204 No Content
X-co-request-id: 67664574556351394872585153513930