API Documentation
Instructions for using Crocodoc in your own applications

A newer version of Crocodoc's API is now available. Go to https://crocodoc.com/docs/ to view the documentation for our new API.

Authentication

All API requests require use of a valid API token. The following request uses an example API token to delete an uploaded document:
https://personal.crocodoc.com/api/v1/document/delete?uuid=a7f1fbb0-24d2-11df-8a39-0800200c9a66&token=

API Methods

/api/v1/document/upload?

Upload and convert a file. This method will try to convert a file that has been referenced by a URL or has been uploaded via a POST request.
Example request: https://personal.crocodoc.com/api/v1/document/upload?url=http://www.dcaa.mil/chap6.pdf&token=

view details
/api/v1/document/status?

Check the conversion status of a document.

view details
/api/v1/document/delete?

Delete an uploaded file.

view details
/api/v1/document/download?

Download an uploaded file with or without annotations.

view details
/api/v1/document/share?

Creates a new "short ID" that can be used to share a document.

view details
/api/v1/document/clone?

Clones an uploaded document. Document annotations are not copied.

view details
/api/v1/session/get?

Creates a session ID for session-based document viewing. Each session ID may only be used once.
The following URL uses an example session ID to grant access to a private document:
https://personal.crocodoc.com/view/?sessionId=fgH9qWEwnsJUeB0.

view details

Embeddable Viewer

http://personal.crocodoc.com/{shortId}?embedded=true

View an embedded document. This URL returns a web page that can be embedded within an iframe.

Example Document

The following iframe is set to this URL: http://personal.crocodoc.com/demo?embedded=true

Tip: Add the following CSS rule to show a spinner while the iframe loads.

iframe { background:url(//personal.crocodoc.com/media/images/docviewer/spinner.gif) no-repeat center; }

https://personal.crocodoc.com/view/?sessionId={sessionId}

View a document using session-based viewing. Session-based viewing enables the embedding of private documents. To obtain session IDs, use the session/get API method.

Example Session

http://personal.crocodoc.com/view/?sessionId=fgH9qWEwnsJUeB0

Arguments

Arguments should be passed in when creating session IDs.