File Upload

Allows authenticated users to attach files to a document in their library. 

URL

https://api-oauth2.mendeley.com/oapi/library/documents/<id>/

For group documents:

https://api-oauth2.mendeley.com/oapi/documents/group/<group id>/<document id>/

Request Method

PUT

Requires Authentication

Yes

Parameters

Required

  • id: Id of the document we want to attach the file to. For new documents, this requires first using the "Create new document" method and using the returned id. For existing documents without a file, simply use the user document id obtained via either the "Library" or "Document details" methods.
The Content-Disposition header must be present in the request including the filename with the extension. See example.

Returns

  • 201 Created
  • 401 Unauthorized
  • 404 Not Found

Rate Limit

Yes.

Current limit is set to 150 files/hr. This is likely to be increased after a short period of load and usage behavior testing.

Request example

PUT https://api-oauth2.mendeley.com/oapi/library/documents/3690294671/ HTTP/1.1
Content-Disposition: attachment; filename="test.pdf"

Data: 54686973206973206120746573742e0a

Request response

A successful request will return a 201 Created header.


Comments

Developer Forum