curl --request POST \ --url https://api.sully.ai/v1/macros/detect \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --header 'X-Account-Id: <api-key>' \ --data '{ "text": "The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.", "macros": [ { "id": "brief_exam_note", "examples": [ "quickcheck", "quick check", "quick-check" ], "expansion_text": "General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally." } ]}'
import requests
url = "https://api.sully.ai/v1/macros/detect"
payload = {
"text": "The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.",
"macros": [
{
"id": "brief_exam_note",
"examples": ["quickcheck", "quick check", "quick-check"],
"expansion_text": "General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally."
}
]
}
headers = {
"X-API-Key": "<api-key>",
"X-Account-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'X-Account-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.',
macros: [
{
id: 'brief_exam_note',
examples: ['quickcheck', 'quick check', 'quick-check'],
expansion_text: 'General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.'
}
]
})
};
fetch('https://api.sully.ai/v1/macros/detect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sully.ai/v1/macros/detect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => 'The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.',
'macros' => [
[
'id' => 'brief_exam_note',
'examples' => [
'quickcheck',
'quick check',
'quick-check'
],
'expansion_text' => 'General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Account-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sully.ai/v1/macros/detect"
payload := strings.NewReader("{\n \"text\": \"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.\",\n \"macros\": [\n {\n \"id\": \"brief_exam_note\",\n \"examples\": [\n \"quickcheck\",\n \"quick check\",\n \"quick-check\"\n ],\n \"expansion_text\": \"General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-Account-Id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.sully.ai/v1/macros/detect")
.header("X-API-Key", "<api-key>")
.header("X-Account-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.\",\n \"macros\": [\n {\n \"id\": \"brief_exam_note\",\n \"examples\": [\n \"quickcheck\",\n \"quick check\",\n \"quick-check\"\n ],\n \"expansion_text\": \"General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.sully.ai/v1/macros/detect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-Account-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.\",\n \"macros\": [\n {\n \"id\": \"brief_exam_note\",\n \"examples\": [\n \"quickcheck\",\n \"quick check\",\n \"quick-check\"\n ],\n \"expansion_text\": \"General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
{ "data": { "detections": [ { "macro_id": "brief_exam_note", "text_span": { "start_char": 94, "end_char": 104, "text": "Quickcheck" }, "confidence": 0.98 } ], "expanded_text": "The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Plan: Continue current medications. Reassess in 6 months or as needed. Patient advised to follow up for any new or worsening symptoms. applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months." }}
Detects macros in text and provides expanded text with the macros replaced by their expansions
POST
/
v1
/
macros
/
detect
Detect and expand text macros
curl --request POST \ --url https://api.sully.ai/v1/macros/detect \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --header 'X-Account-Id: <api-key>' \ --data '{ "text": "The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.", "macros": [ { "id": "brief_exam_note", "examples": [ "quickcheck", "quick check", "quick-check" ], "expansion_text": "General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally." } ]}'
import requests
url = "https://api.sully.ai/v1/macros/detect"
payload = {
"text": "The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.",
"macros": [
{
"id": "brief_exam_note",
"examples": ["quickcheck", "quick check", "quick-check"],
"expansion_text": "General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally."
}
]
}
headers = {
"X-API-Key": "<api-key>",
"X-Account-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'X-Account-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.',
macros: [
{
id: 'brief_exam_note',
examples: ['quickcheck', 'quick check', 'quick-check'],
expansion_text: 'General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.'
}
]
})
};
fetch('https://api.sully.ai/v1/macros/detect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sully.ai/v1/macros/detect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => 'The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.',
'macros' => [
[
'id' => 'brief_exam_note',
'examples' => [
'quickcheck',
'quick check',
'quick-check'
],
'expansion_text' => 'General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Account-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sully.ai/v1/macros/detect"
payload := strings.NewReader("{\n \"text\": \"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.\",\n \"macros\": [\n {\n \"id\": \"brief_exam_note\",\n \"examples\": [\n \"quickcheck\",\n \"quick check\",\n \"quick-check\"\n ],\n \"expansion_text\": \"General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-Account-Id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.sully.ai/v1/macros/detect")
.header("X-API-Key", "<api-key>")
.header("X-Account-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.\",\n \"macros\": [\n {\n \"id\": \"brief_exam_note\",\n \"examples\": [\n \"quickcheck\",\n \"quick check\",\n \"quick-check\"\n ],\n \"expansion_text\": \"General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.sully.ai/v1/macros/detect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-Account-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.\",\n \"macros\": [\n {\n \"id\": \"brief_exam_note\",\n \"examples\": [\n \"quickcheck\",\n \"quick check\",\n \"quick-check\"\n ],\n \"expansion_text\": \"General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
{ "data": { "detections": [ { "macro_id": "brief_exam_note", "text_span": { "start_char": 94, "end_char": 104, "text": "Quickcheck" }, "confidence": 0.98 } ], "expanded_text": "The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Plan: Continue current medications. Reassess in 6 months or as needed. Patient advised to follow up for any new or worsening symptoms. applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months." }}
"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months."
Result data object containing detections and expanded text
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Sully.ai","colors":{"primary":"#0C57F5","light":"#0C57F5","dark":"#0C57F5"},"logo":{"light":"https://mintcdn.com/sullyai/iu6JSWm5cfUXJ8Dp/logo/light.svg?fit=max\u0026auto=format\u0026n=iu6JSWm5cfUXJ8Dp\u0026q=85\u0026s=cc287bf354e0b5f9f004943a6dbd9d6c","dark":"https://mintcdn.com/sullyai/iu6JSWm5cfUXJ8Dp/logo/dark.svg?fit=max\u0026auto=format\u0026n=iu6JSWm5cfUXJ8Dp\u0026q=85\u0026s=3542c5f336adc966d143a089fffbc7c8"},"favicon":"https://mintcdn.com/sullyai/k9LCta3B7EaqR6aD/favicon.png?fit=max\u0026auto=format\u0026n=k9LCta3B7EaqR6aD\u0026q=85\u0026s=875bcecb98aca7532bf4e628c5cb9440","api":{"openapi":"https://raw.githubusercontent.com/Odiggo/sullyai-openapi/refs/heads/main/openapi.yaml"},"navbar":{"links":[{"href":"mailto:support@sully.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.api.sully.ai"}},"footer":{"socials":{"x":"https://x.com/sully_the_ai","linkedin":"https://www.linkedin.com/company/sully-ai"}},"banner":{"content":"This documentation is for the legacy Sully APIs. [View the new documentation here](https://docs.sully.ai).","dismissible":false},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://dashboard.api.sully.ai"},{"anchor":"Demo","icon":"github","href":"https://github.com/Odiggo/sully-api-demo"},{"anchor":"Blog","icon":"newspaper","href":"https://www.sully.ai/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"sullyai","hasAudioNarration":false,"actualSubdomain":"sullyai","customDomains":["legacy.docs.sully.ai"],"gitSource":{"type":"github","owner":"odiggo","repo":"sully-api-docs","deployBranch":"legacy","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6acd71e523f2b32522536eb3","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API Reference","count":19},{"language":"default","tag":"Alpha","count":10},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Alpha API Reference","count":7},{"language":"default","tag":"Audio Transcriptions","count":6},{"language":"default","tag":"Get Started","count":5},{"language":"default","tag":"Core Workflows","count":4},{"language":"default","tag":"Integrations","count":4},{"language":"default","tag":"Codings","count":3},{"language":"default","tag":"Introduction","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/macros/detect","slug":"/api-reference/macros/detect","pageMetadata":{"title":"Detect Macros","openapi":"POST /v1/macros/detect","description":"Detects macros in text and provides expanded text with the macros replaced by their expansions","href":"/api-reference/macros/detect"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Detects macros in text and provides expanded text with the macros replaced by their expansions\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Detect Macros","openapi":"POST /v1/macros/detect","description":"Detects macros in text and provides expanded text with the macros replaced by their expansions","href":"/api-reference/macros/detect"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Macros"],"summary":"Detect and expand text macros","operationId":"detectAndExpandMacros","description":"Detects macros in text and provides expanded text with the macros replaced by their expansions","requestBody":"22b58c49-e457-4e95-a30b-78635c79c343","responses":{"200":"1dcee47b-e5cd-48d3-8516-362e9439a12e","400":"88b1cd30-b942-4f0a-b9f0-798067d45943","401":"8954a143-af2f-40fd-ad08-a70a2bd85ce3","default":"28b34d5f-a886-4157-93d2-7789c7688b4b"},"method":"post","type":"path","servers":["185f13fb-bd43-4a8d-9ecd-d94743b6c9d7","f898028e-0f67-4bb5-94a7-e28d075d72ed"],"security":["2bcf9f74-f91d-4d5d-813e-0235da713236"],"path":"/v1/macros/detect","baseUrlOptions":["https://api.sully.ai","https://api-testing.sully.ai"],"title":"Detect and expand text macros","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"description":"Text to analyze for macros","content":{"application/json":{"schema":{"type":"object","description":"Request payload for detecting and expanding macros in medical text","required":["text","macros"],"properties":{"text":{"type":"string","description":"The text to analyze for macros","example":"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.","isRequired":true,"uniqueKey":"text","typeLabel":"string"},"macros":{"type":"array","description":"An array of macro objects to detect in the text","items":{"type":"object","description":"A macro definition with examples and expansion text","required":["id","examples","expansion_text"],"properties":{"id":{"type":"string","description":"A unique identifier for the macro","example":"brief_exam_note","isRequired":true,"uniqueKey":"macros.items.[INDEX].id","typeLabel":"string"},"examples":{"type":"array","description":"An array of example strings that represent the macro in text","items":{"type":"string","description":"An example text string representing the macro","uniqueKey":"macros.items.[INDEX].examples.items.[INDEX]","typeLabel":"string"},"example":["quickcheck","quick check","quick-check"],"isRequired":true,"uniqueKey":"macros.items.[INDEX].examples","typeLabel":"string[]"},"expansion_text":{"type":"string","description":"The text that should replace the macro when expanded","example":"General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.","isRequired":true,"uniqueKey":"macros.items.[INDEX].expansion_text","typeLabel":"string"}},"uniqueKey":"macros.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"macros","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"text":"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.","macros":[{"id":"brief_exam_note","examples":["quickcheck","quick check","quick-check"],"expansion_text":"General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally."}]}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"1dcee47b-e5cd-48d3-8516-362e9439a12e":{"description":"Macro detection result","content":{"application/json":{"schema":{"type":"object","description":"Response containing detected macros and expanded text","properties":{"data":{"type":"object","description":"Result data object containing detections and expanded text","properties":{"detections":{"type":"array","description":"Array of detected macros in the text","items":{"type":"object","description":"A single macro detection result","properties":{"macro_id":{"type":"string","description":"The ID of the detected macro","example":"brief_exam_note","uniqueKey":"data.detections.items.[INDEX].macro_id","typeLabel":"string"},"text_span":{"type":"object","description":"Position information about the detected macro in the original text","properties":{"start_char":{"type":"integer","description":"The starting character position of the detected macro in the original text","example":94,"uniqueKey":"data.detections.items.[INDEX].text_span.start_char","typeLabel":"integer"},"end_char":{"type":"integer","description":"The ending character position of the detected macro in the original text","example":104,"uniqueKey":"data.detections.items.[INDEX].text_span.end_char","typeLabel":"integer"},"text":{"type":"string","description":"The text of the detected macro","example":"Quickcheck","uniqueKey":"data.detections.items.[INDEX].text_span.text","typeLabel":"string"}},"uniqueKey":"data.detections.items.[INDEX].text_span","typeLabel":"object"},"confidence":{"type":"number","description":"A confidence score between 0 and 1 indicating the system's confidence in the detection","example":0.98,"minimum":0,"maximum":1,"uniqueKey":"data.detections.items.[INDEX].confidence","typeLabel":"number"}},"uniqueKey":"data.detections.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data.detections","typeLabel":"object[]"},"expanded_text":{"type":"string","description":"The original text with all detected macros expanded","example":"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Plan: Continue current medications. Reassess in 6 months or as needed. Patient advised to follow up for any new or worsening symptoms. applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.","uniqueKey":"data.expanded_text","typeLabel":"string"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"detections":[{"macro_id":"brief_exam_note","text_span":{"start_char":94,"end_char":104,"text":"Quickcheck"},"confidence":0.98}],"expanded_text":"The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Plan: Continue current medications. Reassess in 6 months or as needed. Patient advised to follow up for any new or worsening symptoms. applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months."}}}},"exampleType":"generated"}},"exampleType":"generated"},"88b1cd30-b942-4f0a-b9f0-798067d45943":{"description":"Invalid request","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Legacy route error, shared middleware error, or credential failure.","required":["status","data","date"],"properties":{"status":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"oneOf.0.status","typeLabel":"enum\u003cstring>"},"data":{"type":"object","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.data.message","typeLabel":"string"},"code":{"type":"string","uniqueKey":"oneOf.0.data.code","typeLabel":"string"},"validationErrors":{"type":"object","additionalProperties":true,"uniqueKey":"oneOf.0.data.validationErrors","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.0.data","typeLabel":"object"},"date":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.0.date","typeLabel":"string\u003cdate-time>"},"errorType":{"type":"string","uniqueKey":"oneOf.0.errorType","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"Legacy route error, shared middleware error, or credential failure.","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"object","description":"Legacy route error, shared middleware error, or credential failure.","required":["error"],"properties":{"error":{"type":"string","description":"Error message","example":"Invalid request data","isRequired":true,"uniqueKey":"oneOf.2.error","typeLabel":"string"},"details":{"type":"object","description":"Additional error details (for validation errors)","additionalProperties":true,"uniqueKey":"oneOf.2.details","typeLabel":"object"}},"uniqueKey":"oneOf.2","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","data":{"message":"\u003cstring>","code":"\u003cstring>","validationErrors":{}},"date":"2023-11-07T05:31:56Z","errorType":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"8954a143-af2f-40fd-ad08-a70a2bd85ce3":{"description":"Missing or invalid API key/account ID","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"28b34d5f-a886-4157-93d2-7789c7688b4b":{"description":"Request or service error","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Legacy route error, shared middleware error, or credential failure.","required":["status","data","date"],"properties":{"status":{"type":"string","enum":["error"],"isRequired":true,"uniqueKey":"oneOf.0.status","typeLabel":"enum\u003cstring>"},"data":{"type":"object","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.0.data.message","typeLabel":"string"},"code":{"type":"string","uniqueKey":"oneOf.0.data.code","typeLabel":"string"},"validationErrors":{"type":"object","additionalProperties":true,"uniqueKey":"oneOf.0.data.validationErrors","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.0.data","typeLabel":"object"},"date":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.0.date","typeLabel":"string\u003cdate-time>"},"errorType":{"type":"string","uniqueKey":"oneOf.0.errorType","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"Legacy route error, shared middleware error, or credential failure.","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"object","description":"Legacy route error, shared middleware error, or credential failure.","required":["error"],"properties":{"error":{"type":"string","description":"Error message","example":"Invalid request data","isRequired":true,"uniqueKey":"oneOf.2.error","typeLabel":"string"},"details":{"type":"object","description":"Additional error details (for validation errors)","additionalProperties":true,"uniqueKey":"oneOf.2.details","typeLabel":"object"}},"uniqueKey":"oneOf.2","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"status":"error","data":{"message":"\u003cstring>","code":"\u003cstring>","validationErrors":{}},"date":"2023-11-07T05:31:56Z","errorType":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"2bcf9f74-f91d-4d5d-813e-0235da713236":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Required together with the other Sully authentication header.","scopes":[]},"accountIdAuth":{"type":"apiKey","in":"header","name":"X-Account-Id","description":"Required together with the other Sully authentication header.","scopes":[]}}},"servers":{"185f13fb-bd43-4a8d-9ecd-d94743b6c9d7":{"url":"https://api.sully.ai","description":"Sully Production API"},"f898028e-0f67-4bb5-94a7-e28d075d72ed":{"url":"https://api-testing.sully.ai","description":"Sully Testing API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Required together with the other Sully authentication header.","scopes":[]},"schema":{"title":"X-API-Key","type":"string","description":"Required together with the other Sully authentication header.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKeyAuth","name":"X-API-Key"},{"scheme":{"type":"apiKey","in":"header","name":"X-Account-Id","description":"Required together with the other Sully authentication header.","scopes":[]},"schema":{"title":"X-Account-Id","type":"string","description":"Required together with the other Sully authentication header.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"accountIdAuth","name":"X-Account-Id"}],"title":"apiKeyAuth \u0026 accountIdAuth"}]},"originalFileLocation":"https://raw.githubusercontent.com/Odiggo/sullyai-openapi/refs/heads/main/openapi.yaml"},"subdomain":"sullyai","siteName":"Sully.ai","title":"Detect Macros - Sully.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-28T01:50:27.067Z","originalFileLocation":"api-reference/macros/detect.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Detects macros in text and provides expanded text with the macros replaced by their expansions\">\u003cmeta data-mint-head name=\"application-name\" content=\"Sully.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Detect Macros - Sully.ai\">\u003cmeta data-mint-head property=\"og:description\" content=\"Detects macros in text and provides expanded text with the macros replaced by their expansions\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Sully.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://legacy.docs.sully.ai/api-reference/macros/detect\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://sullyai.mintlify.site/_mintlify/api/og/v2?division=Macros\u0026amp;title=Detect+Macros\u0026amp;description=Detects+macros+in+text+and+provides+expanded+text+with+the+macros+replaced+by+their+expansions\u0026amp;theme=87364d29b2464379fde1a8a3\u0026amp;signature=8a2ed19b1d87bcfd133770160e3b87274bf1822e1e94c36518e6fe5268de08e6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Detect Macros - Sully.ai\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Detects macros in text and provides expanded text with the macros replaced by their expansions\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://sullyai.mintlify.site/_mintlify/api/og/v2?division=Macros\u0026amp;title=Detect+Macros\u0026amp;description=Detects+macros+in+text+and+provides+expanded+text+with+the+macros+replaced+by+their+expansions\u0026amp;theme=87364d29b2464379fde1a8a3\u0026amp;signature=8a2ed19b1d87bcfd133770160e3b87274bf1822e1e94c36518e6fe5268de08e6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/sullyai/rqSi2O2n-U8PK3lG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Sully.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0C57F5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://legacy.docs.sully.ai/api-reference/macros/detect\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/macros/detect.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://legacy.docs.sully.ai/#organization\",\"name\":\"Sully.ai\",\"url\":\"https://legacy.docs.sully.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/sullyai/iu6JSWm5cfUXJ8Dp/logo/light.svg?fit=max\u0026auto=format\u0026n=iu6JSWm5cfUXJ8Dp\u0026q=85\u0026s=cc287bf354e0b5f9f004943a6dbd9d6c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://legacy.docs.sully.ai#website\",\"name\":\"Sully.ai\",\"url\":\"https://legacy.docs.sully.ai\",\"publisher\":{\"@id\":\"https://legacy.docs.sully.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://legacy.docs.sully.ai/api-reference/macros/detect#webpage\",\"url\":\"https://legacy.docs.sully.ai/api-reference/macros/detect\",\"name\":\"Detect Macros\",\"description\":\"Detects macros in text and provides expanded text with the macros replaced by their expansions\",\"dateModified\":\"2026-01-28T01:50:27.067Z\",\"isPartOf\":{\"@id\":\"https://legacy.docs.sully.ai#website\"},\"breadcrumb\":{\"@id\":\"https://legacy.docs.sully.ai/api-reference/macros/detect#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://legacy.docs.sully.ai/api-reference/macros/detect#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Sully.ai\",\"item\":\"https://legacy.docs.sully.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Detect Macros\",\"item\":\"https://legacy.docs.sully.ai/api-reference/macros/detect\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://legacy.docs.sully.ai/api-reference/macros/detect#apireference\",\"headline\":\"Detect Macros\",\"name\":\"Detect Macros\",\"description\":\"Detects macros in text and provides expanded text with the macros replaced by their expansions\",\"url\":\"https://legacy.docs.sully.ai/api-reference/macros/detect\",\"mainEntityOfPage\":{\"@id\":\"https://legacy.docs.sully.ai/api-reference/macros/detect#webpage\"},\"dateModified\":\"2026-01-28T01:50:27.067Z\",\"publisher\":{\"@id\":\"https://legacy.docs.sully.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://legacy.docs.sully.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Sully.ai\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Sully.ai","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://dashboard.api.sully.ai"},{"anchor":"Demo","icon":"github","href":"https://github.com/Odiggo/sully-api-demo"},{"anchor":"Blog","icon":"newspaper","href":"https://www.sully.ai/blog"}]},"tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":"/documentation/overview"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/documentation/guides/transcription"}]},{"tab":"API Reference","groups":[{"group":"Audio Transcriptions","pages":[{"title":"Create Audio Transcription","openapi":"POST /v2/audio/transcriptions","version":"v2","href":"/api-reference-v2/audio-transcriptions/create"},{"title":"Get Audio Transcription","openapi":"GET /v2/audio/transcriptions/{id}","version":"v2","href":"/api-reference-v2/audio-transcriptions/get"},{"title":"Delete Audio Transcription","openapi":"DELETE /v2/audio/transcriptions/{id}","version":"v2","href":"/api-reference-v2/audio-transcriptions/delete"},{"title":"Streaming","icon":"comments","href":"/api-reference/audio-transcriptions/streaming"},{"title":"Create Streaming Token","openapi":"POST /v1/audio/transcriptions/stream/token","href":"/api-reference/audio-transcriptions/stream-token"},{"title":"Supported Languages","icon":"globe","href":"/api-reference/audio-transcriptions/languages"}]},{"group":"Notes","pages":[{"title":"Create Note","openapi":"POST /v1/notes","href":"/api-reference/notes/create"},{"title":"Get Note","openapi":"GET /v1/notes/{noteId}","href":"/api-reference/notes/get"},{"title":"Delete Note","openapi":"DELETE /v1/notes/{noteId}","href":"/api-reference/notes/delete"}]},{"group":"Note Styles","pages":[{"title":"Create Note Style","openapi":"POST /v1/note-styles","href":"/api-reference/note-styles/create"}]},{"group":"Codings","pages":[{"title":"Create Coding","openapi":"POST /v1/codings","href":"/api-reference/codings/create"},{"title":"Get Coding","openapi":"GET /v1/codings/{codingId}","href":"/api-reference/codings/get"},{"title":"Delete Coding","openapi":"DELETE /v1/codings/{codingId}","description":"Deletes a coding analysis by ID","href":"/api-reference/codings/delete"}]},{"group":"Macros","pages":[{"title":"Detect Macros","openapi":"POST /v1/macros/detect","href":"/api-reference/macros/detect"}]},{"group":"Utils","pages":[{"title":"Transform Text to JSON","openapi":"POST /v1/utils/text-to-json","description":"Transforms unstructured text into structured JSON according to a provided schema. This utility endpoint extracts specific data patterns from free-form content.","href":"/api-reference/utils/text-to-json"}]},{"group":"Events","pages":[{"title":"Overview","href":"/api-reference/events/overview"},{"title":"Webhooks","href":"/api-reference/events/webhooks"}]},{"group":"Schemas","pages":[{"title":"SOAP Note","href":"/api-reference/schemas/soap-note"},{"title":"Note Template","href":"/api-reference/schemas/note-template"}]}]},{"tab":"Alpha","pages":[{"title":"Alpha","href":"/documentation/alpha/overview"}]}]},"basePath":"","title":"Detect Macros - Sully.ai","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-C79IUEr8.js","dist-DE3EVdvd.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-DK3K4Z1S.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js","Markdown-D_k0dg6k.js","AssistantPageLink-fN9H9n9g.js"]}