Beta environment - not production
You are viewing the DocButterfly beta at beta.docbutterfly.com. Endpoints, data and templates here are for evaluation only, and may be reset or changed without notice. The documentation shows https://docbutterfly.com as the base URL - point your calls at the beta host while you are testing here. Do not use production data or production API keys.
PowerPoint
Merge, split, delete slides, and replace text in PPTX presentations
5 endpoints in this category. All require X-API-Key header.
PPTX Merge
POST
/api/PptxMerge
1 token
Combine multiple PPTX presentations into one.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
files |
array | required | Array of base64-encoded PPTX files |
Request Example
JSON
{"files": ["<base64-pptx-1>", "<base64-pptx-2>"]}
Response Example
JSON
{"file": "UEsDBBQAAAA...", "slideCount": 8}
Code Examples
curl -X POST "https://docbutterfly.com/api/PptxMerge" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"files": ["<base64-pptx-1>", "<base64-pptx-2>"]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""files"": [""<base64-pptx-1>"", ""<base64-pptx-2>""]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/PptxMerge", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/PptxMerge"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"files": ["<base64-pptx-1>", "<base64-pptx-2>"]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/PptxMerge
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "files": [
│ "\u003Cbase64-pptx-1\u003E",
│ "\u003Cbase64-pptx-2\u003E"
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/PptxMerge"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededPPTX Delete Slides
POST
/api/PptxDeleteSlides
1 token
Remove specific slides from a PPTX presentation.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64-encoded PPTX file |
slides |
string | required | Slides to delete: "2,4-6" or array [2,4,5,6] |
Request Example
JSON
{"file": "<base64-pptx>", "slides": "2,4"}
Response Example
JSON
{"file": "UEsDBBQAAAA...", "remainingSlides": 3}
Code Examples
curl -X POST "https://docbutterfly.com/api/PptxDeleteSlides" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-pptx>", "slides": "2,4"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-pptx>"", ""slides"": ""2,4""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/PptxDeleteSlides", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/PptxDeleteSlides"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-pptx>", "slides": "2,4"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/PptxDeleteSlides
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-pptx\u003E",
│ "slides": "2,4"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/PptxDeleteSlides"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededPPTX Replace Text
POST
/api/PptxReplaceText
1 token
Find and replace text across all slides in a PPTX.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64-encoded PPTX file |
replacements |
array | required | Array of {find, replace} or object {find: replace} |
Request Example
JSON
{"file": "<base64-pptx>", "replacements": [{"find": "{{title}}", "replace": "Q1 Report"}]}
Response Example
JSON
{"file": "UEsDBBQAAAA...", "replacementCount": 5}
Code Examples
curl -X POST "https://docbutterfly.com/api/PptxReplaceText" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-pptx>", "replacements": [{"find": "{{title}}", "replace": "Q1 Report"}]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-pptx>"", ""replacements"": [{""find"": ""{{title}}"", ""replace"": ""Q1 Report""}]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/PptxReplaceText", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/PptxReplaceText"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-pptx>", "replacements": [{"find": "{{title}}", "replace": "Q1 Report"}]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/PptxReplaceText
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-pptx\u003E",
│ "replacements": [
│ {
│ "find": "{{title}}",
│ "replace": "Q1 Report"
│ }
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/PptxReplaceText"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededPPTX Split
POST
/api/PptxSplit
1 token
Split a PPTX into individual slide files.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64-encoded PPTX file |
Request Example
JSON
{"file": "<base64-pptx>"}
Response Example
JSON
{"slides": [{"index": 1, "file": "UEsDBBQ..."}], "count": 5}
Code Examples
curl -X POST "https://docbutterfly.com/api/PptxSplit" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-pptx>"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-pptx>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/PptxSplit", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/PptxSplit"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-pptx>"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/PptxSplit
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-pptx\u003E"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/PptxSplit"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededPPTX Populate Template
POST
/api/PptxPopulateTemplate
1 token
Fill a PPTX template with data, resolving {tokens} even when PowerPoint splits them across text runs.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64-encoded PPTX template |
data |
object | required | Key-value pairs; {key} tokens in the slides are replaced |
Request Example
JSON
{"file": "<base64-pptx>", "data": {"name": "Jamie", "status": "Open"}}
Response Example
JSON
{"file": "UEsDBBQAAAA...", "replacementCount": 3, "slidesModified": 1}
Code Examples
curl -X POST "https://docbutterfly.com/api/PptxPopulateTemplate" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-pptx>", "data": {"name": "Jamie", "status": "Open"}}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-pptx>"", ""data"": {""name"": ""Jamie"", ""status"": ""Open""}}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/PptxPopulateTemplate", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/PptxPopulateTemplate"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-pptx>", "data": {"name": "Jamie", "status": "Open"}}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://docbutterfly.com/api/PptxPopulateTemplate
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-pptx\u003E",
│ "data": {
│ "name": "Jamie",
│ "status": "Open"
│ }
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/PptxPopulateTemplate"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed