Ask API
Ask a question and get an answer written from the Stacksync docs, over HTTP
The Ask API answers a question in plain language using the Stacksync documentation. It's the same assistant as Ask AI on this site: it searches the docs, answers only from what it finds, and links to the pages it used. Use it from scripts, support bots or agents that don't support MCP.
Request
Send a POST request with the question as JSON (3 to 2,000 characters). No API key is needed.
curl -X POST https://docs.stacksync.com/api/ask \
-H "Content-Type: application/json" \
-d '{"question": "How do I connect Salesforce?"}'Response
The answer is returned as Markdown (text/markdown), with absolute links to the docs pages it's based on:
To connect Salesforce, you authorize it from the Create Sync page. This follows [Authorize Salesforce](https://docs.stacksync.com/connectors/salesforce/authorize-salesforce).
1. In Stacksync, open the **Create Sync** page and select **Salesforce**.
2. ...To get JSON instead, send Accept: application/json:
curl -X POST https://docs.stacksync.com/api/ask \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"question": "How do I connect Salesforce?"}'{
"question": "How do I connect Salesforce?",
"answer": "To connect Salesforce, you authorize it from the Create Sync page..."
}Errors
| Status | Meaning |
|---|---|
400 | The body isn't {"question": "..."}, or the question is shorter than 3 or longer than 2,000 characters |
503 | The assistant is temporarily unavailable. Use the MCP server's search and get_page tools, or the Markdown pages, instead |
Answers are generated by AI from the documentation and can be incomplete. For anything critical, check the linked pages, or contact Stacksync support.