The copy-paste.online API provides a simple way to send and retrieve text or files. The API is structured around RESTful principles and uses standard HTTP response codes and verbs.
All API requests should be made to:
https://copy-paste.online/api/v1/
Purpose: Send text or files to the copy-paste.online service.
Parameters:
text: The text content you want to send.file: The file you want to upload.Response:
A JSON object containing:
status: Indicates the success or failure of the request.message: Contains a unique identifier for the text or file sent.filepath: (Optional) If a file was uploaded, this field contains the path to the uploaded file.Usage:
To send text:
curl -X POST -d "text=YourTextHere" https://copy-paste.online/api/v1/copy
To send a file:
curl -X POST -F "file=@/path/to/your/file.txt" https://copy-paste.online/api/v1/copy
Purpose: Retrieve previously sent text or files using the unique identifier returned from /copy.
Parameters:
code: The unique identifier of the paste you want to retrieve.Response:
A JSON object containing:
status: Indicates the success or failure of the request.text: The text content (if it was a text paste).filepath: The file path (if it was a file upload).Usage:
curl "https://copy-paste.online/api/v1/paste?code=YourUniqueCode"
If an error occurs during the request, the API will return a standard HTTP error code along with a message describing the error.