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:
The ID of your Workspace/Organization
The extension of your document, e.g.
pdf, docx, pptThe file you wish to upload
Remember to replace
<token> with your own bearer token.