rizamodocs
Media

Add media

POST
/media

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.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the web app, under Developers. It starts with rz_live_.

Request Body

application/json
  1. body
contentType*string
Value in"image/jpeg""image/png""image/webp""video/mp4""video/quicktime"
size*integer

Bytes. Up to 4 GB.

Range-9007199254740991 <= value <= 4294967296
alt?string

Describes the image for people who cannot see it.

Lengthlength <= 1000
Default""

Response Body

OK

application/json
  1. response
media*
upload*|null
Example Request
curl -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"  }}