Attributes
/api/media-uploads
This endpoint allows you to upload a media file to Centrapay. It returns a presigned URL that can be used to download the media file.
Attributes
accountId
mimeType
fileName
Request
curl -X POST \
https://service.centrapay.com/api/media-uploads \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '
{
"accountId": "Jaim1Cu1Q55uooxSens6yk",
"mimeType": "image/png",
"fileName": "image.png"
}
'
Response
{
"id": "DKTs3U38hdhfEqwF1JKoT2",
"uploadUrl": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743"
}
/api/media-uploads/{mediaUploadId}/location
This endpoint allows you to retrieve the upload location of a media file.
Request
curl -X GET \
https://service.centrapay.com/api/media-uploads/DKTs3U38hdhfEqwF1JKoT2/location \
-H 'x-api-key: <TOKEN>'
Response
{
"url": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743"
}