POST https://api.slide-tailor.com/tailor

Tailor a PowerPoint (.pptx) template according to instructions defined in JSON.

Request Headers

X-API-Key: {apiKey}
Your API key authorizing you to call Slide Tailor.
Content-Type: application/json
Create a new .pptx presentation by modifying an existing .pptx template according to the JSON instructions in the request body.
Content-Type: multipart/form
Bundle tailoring instructions, a .pptx template to modify, and/or image assets in a single POST operation.
Accept: application/vnd.openxmlformats-officedocument.presentationml.presentation (.pptx file)
Return the modified .pptx directly in the POST response. Although this is the default return type, we recommend always providing an explicit Accept header, as query tools may otherwise slip in their own.
Content-Disposition: attachment; filename="<newfilename>"
Assign a specific name for the newly created file. Optional.

Request Body

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

If you send Content-Type:multipart/form, your request body should contain these named parts:

  • "instructions": An application/json part containing tailoring instructions. Required.
  • "template": A .pptx file to modify. You must either bundle the template here or provide a link to an external template in the tailoring instructions.
  • image1, image2.png, etc.: image files to insert via InsertImage instructions. You may name these as you please and pass a name instead of a URL in the instructions.

Response

On success, the response will contain either a .pptx or a .pdf file, depending on the Accept header in the request.

On failure, the response will be a JSON object with an errors array containing one or more error messages.

{
    "errors": [
      "Cannot resolve image 'image1.png'"
    ]
}