cURL
curl --request POST \ --url https://api.g2cplatform.com/v2/files/upload \ --header 'Content-Type: multipart/form-data' \ --header 'X-API-Key: <api-key>' \ --form file='@example-file' \ --form 'metadata=<string>'
{ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "filename": "<string>", "size": 123, "mimeType": "<string>", "url": "<string>", "createdAt": "2023-11-07T05:31:56Z" }
Upload a file to the system
API key for authenticating requests. Include in X-API-Key header.
The file to upload
Optional JSON string with metadata about the file
File uploaded successfully
Unique identifier for the uploaded file
Name of the uploaded file
Size of the file in bytes
MIME type of the file
URL to access the file
Timestamp when the file was uploaded