PUT /{accountId}/{file}

Create or replace a file under your account, either by uploading a PowerPoint or image file, or by sending JSON tailoring instructions to create a new presentation from an existing .pptx template.

Path Parameters

{accountId}
Numeric ID of your account.
{file}
Name of existing file

Request Headers

X-API-Key: {apiKey}
Your API key authorizing you to create the file
Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation (.pptx file)
Content-Type: image/png
Content-Type: image/jpeg
Store a .pptx template or an image under your account for use in future tailoring operations. Your request body must contain the binary contents of the file. The response will be a JSON object containing a URL to the newly created file.
Content-Type: application/json
Create a new .pptx presentation by modifying an existing .pptx template according to the JSON instructions in the request body. The new presentation will be either returned immediately or stored under your account, according to theAccept header.
Content-Type: multipart/form
Bundle tailoring instructions, a .pptx template to modify, and/or image assets in a single POST operation.
Accept: application/json (default)
Store the resulting file under your account, and return a JSON object containing its URL.
Accept: application/vnd.openxmlformats-officedocument.presentationml.presentation (.pptx file)
Return the modified .pptx directly in the POST response.

Request Body

If your Content-Type specifies a .pptx or image file type, your request body should contain the binary contents of the file.

If you send Content-Type:application/json, your request body should contain a JSON object with tailoring instructions.

Response

200
Request succeeded, possibly overwriting an existing file under your account.
201
Request succeeded and created a new file under your account.

If your request included an Accept header identifying a .pptx file type, the response will have a corresponding Content-Type. Otherwise the response will be a JSON object with information about the file that was created or update.

{
    "url": "https://api.slide-tailor.com/{accountId}/acme-sales-preso.pptx",
    "filename": "acme-sales-preso.pptx",
    "mediatype": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
    "length": 241770
}

Error Codes

415
Bad Content-Type. The request included a Content-Type header not on the list above.