Text Utilities
Clean, compare, format, validate, and transform text strings
27 endpoints in this category. All require X-API-Key header.
Clean Text
/api/CleanText
1 token
Clean and normalize text (trim, collapse whitespace, remove control chars).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Text to clean |
options |
object | optional | {removeExtraSpaces, removeHtml, removeControlChars, removeSpecialChars} |
Request Example
{"text": " Hello World ", "options": {"removeExtraSpaces": true, "removeControlChars": true}}
Response Example
{"result": "Hello World"}
Code Examples
curl -X POST "https://docbutterfly.com/api/CleanText" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": " Hello World ", "options": {"removeExtraSpaces": true, "removeControlChars": true}}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": "" Hello World "", ""options"": {""removeExtraSpaces"": true, ""removeControlChars"": true}}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/CleanText", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/CleanText"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": " Hello World ", "options": {"removeExtraSpaces": true, "removeControlChars": true}}')
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/CleanText
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": " Hello World ",
│ "options": {
│ "removeExtraSpaces": true,
│ "removeControlChars": true
│ }
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/CleanText"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededCompare Text
/api/CompareText
1 token
Compare two text strings and return differences.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text1 |
string | required | First text |
text2 |
string | required | Second text |
options.caseSensitive |
boolean | optional |
Case-sensitive comparison
(default: true)
|
options.trimWhitespace |
boolean | optional |
Trim before comparing
(default: false)
|
Request Example
{"text1": "Hello World", "text2": "Hello world", "options": {"caseSensitive": true}}
Code Examples
curl -X POST "https://docbutterfly.com/api/CompareText" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text1": "Hello World", "text2": "Hello world", "options": {"caseSensitive": true}}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text1"": ""Hello World"", ""text2"": ""Hello world"", ""options"": {""caseSensitive"": true}}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/CompareText", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/CompareText"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text1": "Hello World", "text2": "Hello world", "options": {"caseSensitive": true}}')
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/CompareText
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text1": "Hello World",
│ "text2": "Hello world",
│ "options": {
│ "caseSensitive": true
│ }
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/CompareText"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededConcatenate Text
/api/ConcatenateText
1 token
Concatenate multiple strings with separator.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
texts |
array | required | Array of strings |
separator |
string | optional | Separator |
Request Example
{"texts": ["Hello", "World"], "separator": " "}
Response Example
{"result": "Hello World"}
Code Examples
curl -X POST "https://docbutterfly.com/api/ConcatenateText" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"texts": ["Hello", "World"], "separator": " "}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""texts"": [""Hello"", ""World""], ""separator"": "" ""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ConcatenateText", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ConcatenateText"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"texts": ["Hello", "World"], "separator": " "}')
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/ConcatenateText
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "texts": [
│ "Hello",
│ "World"
│ ],
│ "separator": " "
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ConcatenateText"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededConvert JSON to XML
/api/ConvertJsonToXml
1 token
Convert JSON to XML format.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
json |
object | required | JSON object |
options.rootName |
string | optional |
Root element name
(default: root)
|
options.indentation |
number | optional |
Indentation spaces
(default: 2)
|
Request Example
{"json": {"name": "John", "age": 30}, "options": {"rootName": "person"}}
Code Examples
curl -X POST "https://docbutterfly.com/api/ConvertJsonToXml" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"json": {"name": "John", "age": 30}, "options": {"rootName": "person"}}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""json"": {""name"": ""John"", ""age"": 30}, ""options"": {""rootName"": ""person""}}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ConvertJsonToXml", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ConvertJsonToXml"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"json": {"name": "John", "age": 30}, "options": {"rootName": "person"}}')
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/ConvertJsonToXml
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "json": {
│ "name": "John",
│ "age": 30
│ },
│ "options": {
│ "rootName": "person"
│ }
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ConvertJsonToXml"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededConvert XML to JSON
/api/ConvertXmlToJson
1 token
Convert XML to JSON format.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
xml |
string | required | XML string |
Request Example
{"xml": "<person><name>John</name><age>30</age></person>"}
Code Examples
curl -X POST "https://docbutterfly.com/api/ConvertXmlToJson" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"xml": "<person><name>John</name><age>30</age></person>"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""xml"": ""<person><name>John</name><age>30</age></person>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ConvertXmlToJson", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ConvertXmlToJson"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"xml": "<person><name>John</name><age>30</age></person>"}')
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/ConvertXmlToJson
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "xml": "\u003Cperson\u003E\u003Cname\u003EJohn\u003C/name\u003E\u003Cage\u003E30\u003C/age\u003E\u003C/person\u003E"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ConvertXmlToJson"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExtract Email Addresses
/api/ExtractEmailAddresses
1 token
Extract all email addresses from text.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Text to search |
Request Example
{"text": "Contact john@example.com or jane@test.com"}
Response Example
{"emails": ["john@example.com", "jane@test.com"], "count": 2}
Code Examples
curl -X POST "https://docbutterfly.com/api/ExtractEmailAddresses" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "Contact john@example.com or jane@test.com"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""Contact john@example.com or jane@test.com""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExtractEmailAddresses", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ExtractEmailAddresses"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "Contact john@example.com or jane@test.com"}')
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/ExtractEmailAddresses
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "Contact john@example.com or jane@test.com"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ExtractEmailAddresses"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExtract Text Between
/api/ExtractTextBetween
1 token
Extract text between two markers.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Source text |
startDelimiter |
string | required | Start marker |
endDelimiter |
string | required | End marker |
Request Example
{"text": "Hello [World] Goodbye", "startDelimiter": "[", "endDelimiter": "]"}
Response Example
{"result": "World"}
Code Examples
curl -X POST "https://docbutterfly.com/api/ExtractTextBetween" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "Hello [World] Goodbye", "startDelimiter": "[", "endDelimiter": "]"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""Hello [World] Goodbye"", ""startDelimiter"": ""["", ""endDelimiter"": ""]""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExtractTextBetween", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ExtractTextBetween"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "Hello [World] Goodbye", "startDelimiter": "[", "endDelimiter": "]"}')
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/ExtractTextBetween
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "Hello [World] Goodbye",
│ "startDelimiter": "[",
│ "endDelimiter": "]"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ExtractTextBetween"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExtract URLs
/api/ExtractUrls
1 token
Extract all URLs from text.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Text to search |
Request Example
{"text": "Visit https://example.com or http://test.com"}
Code Examples
curl -X POST "https://docbutterfly.com/api/ExtractUrls" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "Visit https://example.com or http://test.com"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""Visit https://example.com or http://test.com""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExtractUrls", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ExtractUrls"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "Visit https://example.com or http://test.com"}')
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/ExtractUrls
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "Visit https://example.com or http://test.com"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ExtractUrls"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededFormat Date
/api/FormatDate
1 token
Format a date to a specified pattern.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date |
string | required | Date string or ISO date |
format |
string | required | Output format: YYYY-MM-DD, DD/MM/YYYY, etc |
inputFormat |
string | optional | Input format if ambiguous |
Request Example
{"date": "2026-01-15T10:30:00Z", "format": "DD/MM/YYYY HH:mm"}
Code Examples
curl -X POST "https://docbutterfly.com/api/FormatDate" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"date": "2026-01-15T10:30:00Z", "format": "DD/MM/YYYY HH:mm"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""date"": ""2026-01-15T10:30:00Z"", ""format"": ""DD/MM/YYYY HH:mm""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/FormatDate", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/FormatDate"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"date": "2026-01-15T10:30:00Z", "format": "DD/MM/YYYY HH:mm"}')
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/FormatDate
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "date": "2026-01-15T10:30:00Z",
│ "format": "DD/MM/YYYY HH:mm"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/FormatDate"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededGenerate GUID
/api/GenerateGuid
1 token
Generate a UUID/GUID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
format |
string | optional |
standard, noDashes, uppercase
(default: standard)
|
Request Example
{"format": "standard"}
Response Example
{"guid": "550e8400-e29b-41d4-a716-446655440000"}
Code Examples
curl -X POST "https://docbutterfly.com/api/GenerateGuid" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"format": "standard"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""format"": ""standard""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/GenerateGuid", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/GenerateGuid"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"format": "standard"}')
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/GenerateGuid
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "format": "standard"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/GenerateGuid"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededGenerate Password
/api/GeneratePassword
1 token
Generate a secure random password.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
length |
number | optional |
Password length
(default: 16)
|
options.uppercase |
boolean | optional |
Include uppercase
(default: true)
|
options.numbers |
boolean | optional |
Include numbers
(default: true)
|
options.symbols |
boolean | optional |
Include symbols
(default: true)
|
Request Example
{"length": 20, "options": {"uppercase": true, "numbers": true, "symbols": true}}
Response Example
{"password": "Kx9#mP2&vL5@nR8!jQ4w"}
Code Examples
curl -X POST "https://docbutterfly.com/api/GeneratePassword" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"length": 20, "options": {"uppercase": true, "numbers": true, "symbols": true}}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""length"": 20, ""options"": {""uppercase"": true, ""numbers"": true, ""symbols"": true}}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/GeneratePassword", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/GeneratePassword"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"length": 20, "options": {"uppercase": true, "numbers": true, "symbols": true}}')
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/GeneratePassword
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "length": 20,
│ "options": {
│ "uppercase": true,
│ "numbers": true,
│ "symbols": true
│ }
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/GeneratePassword"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededGenerate Random Number
/api/GenerateRandomNumber
1 token
Generate random number in a range.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
min |
number | optional |
Minimum value
(default: 0)
|
max |
number | optional |
Maximum value
(default: 100)
|
Request Example
{"min": 1, "max": 1000}
Response Example
{"number": 427}
Code Examples
curl -X POST "https://docbutterfly.com/api/GenerateRandomNumber" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"min": 1, "max": 1000}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""min"": 1, ""max"": 1000}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/GenerateRandomNumber", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/GenerateRandomNumber"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"min": 1, "max": 1000}')
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/GenerateRandomNumber
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "min": 1,
│ "max": 1000
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/GenerateRandomNumber"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededGet Date Difference
/api/GetDateDifference
1 token
Calculate difference between two dates.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date1 |
string | required | First date |
date2 |
string | required | Second date |
unit |
string | optional |
days, hours, minutes, seconds
(default: days)
|
Request Example
{"date1": "2026-01-01", "date2": "2026-12-31", "unit": "days"}
Response Example
{"difference": 364, "unit": "days"}
Code Examples
curl -X POST "https://docbutterfly.com/api/GetDateDifference" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"date1": "2026-01-01", "date2": "2026-12-31", "unit": "days"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""date1"": ""2026-01-01"", ""date2"": ""2026-12-31"", ""unit"": ""days""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/GetDateDifference", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/GetDateDifference"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"date1": "2026-01-01", "date2": "2026-12-31", "unit": "days"}')
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/GetDateDifference
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "date1": "2026-01-01",
│ "date2": "2026-12-31",
│ "unit": "days"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/GetDateDifference"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededGet File Extension
/api/GetFileExtension
1 token
Get file extension from a filename.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
filename |
string | required | Filename or path |
Request Example
{"filename": "document.pdf"}
Response Example
{"extension": ".pdf", "extensionNoDot": "pdf"}
Code Examples
curl -X POST "https://docbutterfly.com/api/GetFileExtension" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"filename": "document.pdf"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""filename"": ""document.pdf""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/GetFileExtension", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/GetFileExtension"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"filename": "document.pdf"}')
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/GetFileExtension
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "filename": "document.pdf"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/GetFileExtension"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededHTML Escape
/api/HtmlEscape
1 token
Escape HTML special characters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Text to escape |
Request Example
{"text": "<script>alert('XSS')</script>"}
Code Examples
curl -X POST "https://docbutterfly.com/api/HtmlEscape" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "<script>alert('\''XSS'\'')</script>"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""<script>alert('XSS')</script>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/HtmlEscape", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/HtmlEscape"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "<script>alert(\'XSS\')</script>"}')
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/HtmlEscape
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "\u003Cscript\u003Ealert(\u0027XSS\u0027)\u003C/script\u003E"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/HtmlEscape"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededHTML Unescape
/api/HtmlUnescape
1 token
Unescape HTML entities.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Text with HTML entities |
Request Example
{"text": "<p>Hello & World</p>"}
Code Examples
curl -X POST "https://docbutterfly.com/api/HtmlUnescape" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "<p>Hello & World</p>"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""<p>Hello & World</p>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/HtmlUnescape", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/HtmlUnescape"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "<p>Hello & World</p>"}')
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/HtmlUnescape
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "\u0026lt;p\u0026gt;Hello \u0026amp; World\u0026lt;/p\u0026gt;"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/HtmlUnescape"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededParse HTML Table
/api/ParseHtmlTable
1 token
Parse HTML table to JSON rows.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
html |
string | required | HTML containing a table |
hasHeaders |
boolean | optional |
First row is headers
(default: true)
|
Request Example
{"html": "<table><tr><th>Name</th></tr><tr><td>John</td></tr></table>"}
Code Examples
curl -X POST "https://docbutterfly.com/api/ParseHtmlTable" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"html": "<table><tr><th>Name</th></tr><tr><td>John</td></tr></table>"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""html"": ""<table><tr><th>Name</th></tr><tr><td>John</td></tr></table>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ParseHtmlTable", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ParseHtmlTable"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"html": "<table><tr><th>Name</th></tr><tr><td>John</td></tr></table>"}')
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/ParseHtmlTable
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "html": "\u003Ctable\u003E\u003Ctr\u003E\u003Cth\u003EName\u003C/th\u003E\u003C/tr\u003E\u003Ctr\u003E\u003Ctd\u003EJohn\u003C/td\u003E\u003C/tr\u003E\u003C/table\u003E"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ParseHtmlTable"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededRemove Diacritics
/api/RemoveDiacritics
1 token
Remove accent marks from text.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Text with diacritics |
Request Example
{"text": "Hello World cafe resume"}
Response Example
{"result": "Hello World cafe resume"}
Code Examples
curl -X POST "https://docbutterfly.com/api/RemoveDiacritics" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "Hello World cafe resume"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""Hello World cafe resume""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/RemoveDiacritics", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/RemoveDiacritics"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "Hello World cafe resume"}')
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/RemoveDiacritics
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "Hello World cafe resume"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/RemoveDiacritics"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededRegex Replace
/api/RegexReplace
1 token
Replace text using regular expression.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Source text |
pattern |
string | required | Regex pattern |
replacement |
string | required | Replacement string |
flags |
string | optional |
g, i, m
(default: g)
|
Request Example
{"text": "Hello 123 World 456", "pattern": "\\d+", "replacement": "#", "flags": "g"}
Code Examples
curl -X POST "https://docbutterfly.com/api/RegexReplace" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "Hello 123 World 456", "pattern": "\\d+", "replacement": "#", "flags": "g"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""Hello 123 World 456"", ""pattern"": ""\\d+"", ""replacement"": ""#"", ""flags"": ""g""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/RegexReplace", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/RegexReplace"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "Hello 123 World 456", "pattern": "\\d+", "replacement": "#", "flags": "g"}')
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/RegexReplace
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "Hello 123 World 456",
│ "pattern": "\\d\u002B",
│ "replacement": "#",
│ "flags": "g"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/RegexReplace"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededSplit Text
/api/SplitText
1 token
Split text by delimiter.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Text to split |
delimiter |
string | required | Delimiter |
Request Example
{"text": "apple,banana,cherry", "delimiter": ","}
Response Example
{"parts": ["apple", "banana", "cherry"], "count": 3}
Code Examples
curl -X POST "https://docbutterfly.com/api/SplitText" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "apple,banana,cherry", "delimiter": ","}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""apple,banana,cherry"", ""delimiter"": "",""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/SplitText", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/SplitText"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "apple,banana,cherry", "delimiter": ","}')
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/SplitText
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "apple,banana,cherry",
│ "delimiter": ","
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/SplitText"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededSplit Text by Regex
/api/SplitTextRegex
1 token
Split text using a regular expression.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Text to split |
pattern |
string | required | Regex pattern |
Request Example
{"text": "apple123banana456cherry", "pattern": "\\d+"}
Code Examples
curl -X POST "https://docbutterfly.com/api/SplitTextRegex" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "apple123banana456cherry", "pattern": "\\d+"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""apple123banana456cherry"", ""pattern"": ""\\d+""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/SplitTextRegex", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/SplitTextRegex"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "apple123banana456cherry", "pattern": "\\d+"}')
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/SplitTextRegex
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "apple123banana456cherry",
│ "pattern": "\\d\u002B"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/SplitTextRegex"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededChange Text Case
/api/TextChangeCase
1 token
Change text case (upper, lower, title, camel, etc).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | required | Text to transform |
caseType |
string | required | upper, lower, title, sentence, camel, pascal, snake, kebab |
Request Example
{"text": "hello world example", "caseType": "title"}
Response Example
{"result": "Hello World Example"}
Code Examples
curl -X POST "https://docbutterfly.com/api/TextChangeCase" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "hello world example", "caseType": "title"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""text"": ""hello world example"", ""caseType"": ""title""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/TextChangeCase", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/TextChangeCase"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"text": "hello world example", "caseType": "title"}')
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/TextChangeCase
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "text": "hello world example",
│ "caseType": "title"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/TextChangeCase"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededValidate Email
/api/ValidateEmail
1 token
Validate an email address format.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email |
string | required | Email to validate |
Request Example
{"email": "user@example.com"}
Response Example
{"valid": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/ValidateEmail" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""email"": ""user@example.com""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ValidateEmail", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ValidateEmail"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"email": "user@example.com"}')
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/ValidateEmail
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "email": "user@example.com"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ValidateEmail"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededValidate GUID
/api/ValidateGuid
1 token
Validate a GUID/UUID format.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
guid |
string | required | GUID to validate |
Request Example
{"guid": "550e8400-e29b-41d4-a716-446655440000"}
Code Examples
curl -X POST "https://docbutterfly.com/api/ValidateGuid" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"guid": "550e8400-e29b-41d4-a716-446655440000"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""guid"": ""550e8400-e29b-41d4-a716-446655440000""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ValidateGuid", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ValidateGuid"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"guid": "550e8400-e29b-41d4-a716-446655440000"}')
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/ValidateGuid
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "guid": "550e8400-e29b-41d4-a716-446655440000"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ValidateGuid"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededValidate JSON
/api/ValidateJson
1 token
Validate a JSON string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
json |
string | required | JSON string to validate |
Request Example
{"json": "{\"name\":\"John\",\"age\":30}"}
Code Examples
curl -X POST "https://docbutterfly.com/api/ValidateJson" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"json": "{\"name\":\"John\",\"age\":30}"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""json"": ""{\""name\"":\""John\"",\""age\"":30}""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ValidateJson", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ValidateJson"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"json": "{\"name\":\"John\",\"age\":30}"}')
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/ValidateJson
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "json": "{\u0022name\u0022:\u0022John\u0022,\u0022age\u0022:30}"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ValidateJson"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededValidate URL
/api/ValidateUrl
1 token
Validate a URL format.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url |
string | required | URL to validate |
Request Example
{"url": "https://example.com/path?query=value"}
Code Examples
curl -X POST "https://docbutterfly.com/api/ValidateUrl" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/path?query=value"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""url"": ""https://example.com/path?query=value""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ValidateUrl", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ValidateUrl"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"url": "https://example.com/path?query=value"}')
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/ValidateUrl
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "url": "https://example.com/path?query=value"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/ValidateUrl"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededVerify URL Available
/api/VerifyUrlAvailable
1 token
Check if a URL is reachable.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url |
string | required | URL to check |
timeout |
number | optional |
Timeout in ms
(default: 10000)
|
Request Example
{"url": "https://example.com", "timeout": 5000}
Response Example
{"available": true, "statusCode": 200, "responseTime": 245}
Code Examples
curl -X POST "https://docbutterfly.com/api/VerifyUrlAvailable" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "timeout": 5000}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""url"": ""https://example.com"", ""timeout"": 5000}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/VerifyUrlAvailable", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/VerifyUrlAvailable"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"url": "https://example.com", "timeout": 5000}')
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/VerifyUrlAvailable
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "url": "https://example.com",
│ "timeout": 5000
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://docbutterfly.com/api/VerifyUrlAvailable"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed