Media
Add media
POST
With contentType and size (up to 4 GB), the answer says where to send the file: PUT each part, then call complete if there is one, and the media is ready. With url, Rizamo downloads the file and the media is ready in the answer. Media not used by a post within 7 days is deleted.
apiKeyheader
AuthorizationBearer <token>An API key from the web app, under Developers. It starts with rz_live_.
application/json- body
contentType*stringValue in
"image/jpeg""image/png""image/webp""video/mp4""video/quicktime"size*integerBytes. Up to 4 GB.
Range
-9007199254740991 <= value <= 4294967296alt?stringDescribes the image for people who cannot see it.
Length
length <= 1000Default
""OK
application/json- response
media*upload*|nullcurl -X POST 'https://api.rizamo.com/v1/media' \ -H 'Content-Type: application/json' \ -d '{ "contentType": "image/jpeg", "size": -9007199254740991}'Example Response201
{ "media": { "id": "string", "type": "image", "url": "string", "alt": "string", "status": "uploading", "contentType": "string", "size": -9007199254740991, "width": -9007199254740991, "height": -9007199254740991, "duration": 0 }, "upload": { "parts": [ { "url": "string", "method": "PUT", "headers": { "property1": "string", "property2": "string" }, "size": -9007199254740991 } ], "complete": { "url": "string", "method": "POST" }, "expiresAt": "2019-08-24T14:15:22Z" }}