Endpoint

Overview

Stores a file in your media library and returns it with its id. Nothing is put on any phone yet: pass the id as mediaId to Import Media, Push File or Install App to use it. Send the file in one of two ways:
  • The file itself. A multipart/form-data body with the file in a part named file. This is the one request in the API whose body is not JSON.
  • A link. A JSON body with the url of the file, which Phones Inc downloads.
The request returns once the file is stored and ready to use. It takes no phoneIds and needs no session. Limits: up to 1 GiB per file. A login in several organizations, or an administrator, must select the upload’s organization with X-Phonesinc-Organization. This header works for both JSON URLs and multipart files.

Request Body

Provide exactly one of file or url.
file
The file, as a part of a multipart/form-data body.
string
A public HTTPS URL of the file.
string
File name to store the file under, including its extension. Defaults to the name of the uploaded file, or the last part of the url.

Response

boolean
true when the file is stored.
Media
The new Media object.

Errors