Web Service Endpoint

Authorizing an Attachment for Upload

Get the URL needed to upload the file by authorizing the attachment for upload to Business Chat.


GET https://mspgw.push.apple.com/v1/preUpload

HTTP Headers

The request body is empty. The request header must include the following keys:


A string of credentials used to authenticate the request.


An integer representing the size, in bytes, of the encrypted attachment.


A string that identifies the message sender.

Response Codes


The request was successful. See below for more information.

400 Bad Request
Bad Request

The request lacks required field or was malformed.

401 Unauthorized

The request lacks the Authorization header.

403 Forbidden

The request failed to validate the Authorization header field.

404 Not Found
Not Found

The request failed to recognize the destination-id value.

500 Internal Server Error
Internal Server Error

A server error occurred.


Before uploading an attachment to Business Chat, authorize the file for upload by sending a GET request to /preUpload, passing the header fields listed in the HTTP Headers section. This call returns the URL that you use to upload the encrypted file to Business Chat.

Sample preUpload

GET https://mspgw.push.apple.com/v1/preUpload HTTP/1.1Authorization: Bearer signed-web-tokensource-id: business-idsize: SizeInBytes
HTTP/1.1 200 OK Content-Type: application/json { "upload-url": "url-to-upload-to", "mmcs-url": "https://content.example.com/", "mmcs-owner": "owner-id"}

See Also

Message Attachments

Sending Messages with Attachments

Send a text message with attachments from the business to a customer.

Encrypting an Attachment

Secure the contents of the attachment.

object preUploadResponseBody

The JSON dictionary keys contained in the /preUpload body.

Uploading an Attachment

Upload the encrypted file to Business Chat.

Adding Attachment Metadata to a Message

Include an attachment in a text message to a customer.