Sample Use Cases
Document Creation
How to upload your file to Petal
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 is https://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
, ppt
The file you wish to upload
Below is an example of a Document creation POST request.
Remember to replace
<token>
with your own bearer token.