Prerequisites
Before you can upload a file to Petal, you will need:- Your bearer token and desired Workspace ID. They can be obtained as described here.
- Software that can use APIs, such as cURL or Python.
Upload a Document
The API endpoint for creating a Document ishttps://cite.petal.org/api/document/create. You will need to send a POST request to the endpoint with a multipart/form-data body containing three fields:
Below is an example of a Document creation POST request.
Remember to replace
<token> with your own bearer token.