API Reference version 2

Share file with user

POST/v2/user/{id_or_email}/share/file

Share a file with another user.

Format the request as multipart/related with a single part of content-type application/json and a second part containing your file.

NOTE:
  • The part containing the file must include name="file" in the part's Content-Disposition header.
  • The application/json part containing a message is optional and can be excluded, but a file part is required
Example Request:
Headers:
  Content-Type: multipart/related; boundary=boundary123456

Body:
  --boundary123456
  Content-Type: application/json; charset=UTF-8
  Content-Disposition: attachment; name="metadata"

  {"message": "Check out this file upload!"}
  --boundary123456
  Content-Type: image/png
  Content-Disposition: attachment; name="file"; filename="upload.png"

  <file content goes here>
  --boundary123456--
Authentication required, with scope send_message.
Accessible by users.

Path parameters

Type Parameter Description Required?
string id_or_name

The id or email of user to send the file to

Valid length range: 1 - 100.

Required

Request body

Type Property Description Required?
string message

The message

Valid length range: 0 - 1000.

204 No content