REST API Endpoints (action=
)
All REST calls are POSTed to api.php
with an action
parameter. Authentication can be via API key (Bearer), logged-in session, or anonymous widget session for specific endpoints.
Access levels
- Anonymous widget allowed:
messageNew
,againOptions
,chatStream
,getMessageFiles
,userRegister
,lostPassword
- Authenticated only: all others listed below
Endpoint list and purpose
Each item links to an anchor for quick navigation. Responses are JSON.
action=messageNew
action=chatStream
action=againOptions
action=messageAgain
action=snippetTranslate
action=docSum
action=ragUpload
action=promptLoad|promptUpdate|deletePrompt|getPromptDetails
action=getMessageFiles|getFileGroups|changeGroupOfFile
action=getProfile
action=loadChatHistory
action=getWidgets|saveWidget|deleteWidget
action=getApiKeys|createApiKey|setApiKeyStatus|deleteApiKey
action=userRegister|lostPassword
action=getMailhandler|saveMailhandler|mailOAuthStart|mailOAuthCallback|mailOAuthStatus|mailOAuthDisconnect|mailTestConnection
action=messageNew – Post a user message
- Anonymous widget or authenticated
- Body:
message
(text). Optional files viafiles[]
form field
curl -sS -X POST -F "action=messageNew" -F "message=Hello" https://app.synaplan.com/api.php
action=chatStream – Stream AI response (SSE)
- Anonymous widget or authenticated
- Body:
lastIds
(comma-separated IDs returned bymessageNew
) oragain=1
within_id
curl -N -X POST -F "action=chatStream" -F "lastIds=123" https://app.synaplan.com/api.php
action=againOptions – Get model options for re-run
action=messageAgain – Trigger context-aware rerun
action=snippetTranslate – Translate short text
- Authenticated
- Body:
source_text
,source_lang
(defaulten
),dest_lang
Example (Bearer API key):
curl -sS -H "Authorization: Bearer $SYNAPLAN_API_KEY" -X POST \
-F action=snippetTranslate \
-F source_text="Hello, how are you?" \
-F source_lang=en \
-F dest_lang=de \
https://app.synaplan.com/api.php
action=docSum – Summarize a document
action=ragUpload – Upload files for RAG
- Authenticated, files via
files[]
Prompt endpoints
promptLoad
,promptUpdate
,deletePrompt
,getPromptDetails
File endpoints
getMessageFiles
(anon allowed),getFileGroups
,changeGroupOfFile
action=getProfile – Get profile JSON
action=loadChatHistory – Recent chat messages
- Body:
amount
in {10,20,30}
Widget endpoints
getWidgets
,saveWidget
,deleteWidget
(authenticated)
API key endpoints
getApiKeys
,createApiKey
,setApiKeyStatus
,deleteApiKey
(authenticated)
User endpoints
userRegister
,lostPassword
(public)
Mail handler endpoints
getMailhandler
,saveMailhandler
,mailOAuthStart
,mailOAuthCallback
,mailOAuthStatus
,mailOAuthDisconnect
,mailTestConnection