Media Uploads
Contents
Models
Media Upload
Mandatory Fields
Field | Type | Description |
---|---|---|
id | String | The Media Upload’s unique identifier. |
accountId | String | The Media Upload’s owning Centrapay Account id. |
mimeType | String | The media (MIME) type of the upload. |
fileName | String | The file name of the upload. |
createdAt | Timestamp | When the Media Upload was created. |
updatedAt | Timestamp | When the Media Upload was updated. |
createdBy | CRN | The User or API Key that created the Media Upload. |
updatedBy | CRN | The User or API Key that updated the Media Upload. |
Optional Fields
Field | Type | Description |
---|---|---|
uploadUrl | String | A presigned URL that gives users time-limited permission to upload media. |
Operations
Create a presigned URL for Media Upload EXPERIMENTAL
POST /
curl -X POST https://service.centrapay.com/api/media-uploads \
-H "X-Api-Key: $api_key" \
-H "Content-Type: application/json" \
-d '{
"accountId": "Jaim1Cu1Q55uooxSens6yk",
"mimeType": "image/png",
"fileName": "image.png"
}'
Required Fields
Field | Type | Description |
---|---|---|
accountId | String | The Media Upload’s owning Centrapay Account id. |
mimeType | String | The media (MIME) type of the upload. |
fileName | String | The file name of the upload. |
Example response payload
{
"id": "DKTs3U38hdhfEqwF1JKoT2",
"uploadUrl": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743"
}
Get Media Upload Location EXPERIMENTAL
GET /
curl https://service.centrapay.com/api/media-uploads/DKTs3U38hdhfEqwF1JKoT2/location \
-H "X-Api-Key: $api_key"
Example response payload
{
"url": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743"
}