Uploads

Endpoints associated with uploading media files.

Languages
Servers
https://rest.clicksend.com/

Upload Media File

Request

The upload endpoint provides a method for converting files from an unsupported format to a format that one of our endpoints can handle.

Files can be submitted two ways: 1. Using base64 encoding in an application/json request. In this case, submit the base64-encoded file contents in the content field of the request body, and convert can be specified either also in the body or as part of the query string. 2. Using multipart/form-data encoding, in the same way it would be submitted using a HTML form. You may find cURL useful for this. For an example of how to do this, see one of our SDKs. In this case, specify convert in the query string.

Note that convert specifies the conversion to take place. That is, what the result should be compatible with and can be any of the following:

  • fax
  • mms
  • csv
  • post
  • postcard

All files will expire 10 minutes after being uploaded.

Parameters

ParameterInTypeRequiredDescription
convertquerystringtruenone
contentbodystringtrueBase64-encoded file contents

Refer to Status Codes for definitions of HTTP status code responses.

This endpoint requires authentication, more info...

Headers
Content-Typestring
Example: application/json
Bodyapplication/json
object
curl --include \
     --header "Authorization: Basic YXBpLXVzZXJuYW1lOmFwaS1wYXNzd29yZA=="  \
     --request POST \

     --header "Content-Type: application/json" \
     --data-binary "{
    \"content\": \"PGh0bWw+PGhlYWQ+PHN0eWxlIHR5cGU9InRleHQvY3NzIj5ib2R5IHsgZm9udC1mYW1pbHk6J0FyaWFsJzsgfTwvc3R5bGU+PHRpdGxlPkhpPC90aXRsZT48L2hlYWQ+PGJvZHk+PGgxPkhlbGxvIHRoZXJlPC9oMT48aDI+SG93IGFyZSB5b3UgdG9kYXk/PC9oMj48L2JvZHk+PC9odG1sPg==\"
}" \
'https://rest.clicksend.com/v3/uploads?convert={convert}'

Responses

Successful response

Bodyapplication/json
Response
application/json
null