Skip to main content

Upload media

POST 

/api/v1/media/upload

Get a media ID for an image. You then use the ID in Send RCS instead of sending the image again. For a PDF, use Start a PDF upload.

Give the image in one of two ways, one per call:

  • A file. Send it as a multipart/form-data request with the image in a part named file.
  • A link. Send a JSON body with a url member. The url is a public https address of the image, and the answer is the same as for a file.

Send a file or a link, not both. Only a top-level url member in a JSON body is read; a form field or query parameter named url is ignored.

The image has to be a JPEG, PNG or GIF of at most 2 MB, at most 10000 pixels on each side and 40 megapixels in all. HelloSMS judges the image by its content, so the file name and the type you send are not used.

The media ID lasts 24 hours from the upload, and you can use it as many times as you like until then. After that you have to upload the image again.

Three limits apply to each account. A refused call stores nothing.

  • Uploads at once: 5. A refused call answers 429 with a Retry-After header of 10 seconds.
  • Uploads per hour: 500, counting every upload that got as far as being stored. A refused call answers 429 with a Retry-After header: the number of seconds until there is room for one more.
  • Storage: 10 GB, or 100 GB on Premium and Gold plans, and 1 GB for test accounts. It counts the images that haven't expired yet, plus the one you are uploading. A refused call answers 400, since room only frees up as images expire.

HelloSMS can raise or lower a limit for your account on request. The error text then shows your own number. A limit set to 0 refuses every upload, with no Retry-After.

Like Send RCS, the call needs RCS enabled for your account and an approved RCS sender: contact support.

Request​

Bodyrequired

The image, as a file or as a link.

    filestring<binary>required

    The image: a JPEG, PNG or GIF of at most 2 MB. Send exactly one file part.

Responses​

The image was stored. Use mediaId in Send RCS within 24 hours.