The Docmosis connector lets your AI agent act in each user's Docmosis account. Each user connects their own Docmosis API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 15 tools.
- Tools
- 15
- What they doRead · write · destructive
- 11 · 2 · 211 read2 write2 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Docmosis connection
In AgentKit > Connections, create a Docmosis connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'docmosis'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Docmosis:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'docmosis_environment_ready',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "docmosis"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Docmosis:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="docmosis_environment_ready",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Docmosis credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_tooldocmosis_environment_readyCheck whether your Docmosis environment is active and within quota, ready to render.Read-onlyCheck Environment Ready
Check whether your Docmosis environment is active and within quota, ready to render. Returns 200 when ready and an error status otherwise. Use this before rendering in automated flows. Use docmosis_environment_summary for plan and quota details.
Inputs
This tool takes no inputs.
docmosis_environment_summaryGet details of your Docmosis environment.Read-onlyGet Environment Summary
Get details of your Docmosis environment. Returns the plan, status, page quota and usage so far this period. Use this to check remaining quota.
Inputs
This tool takes no inputs.
docmosis_images_listList the stock images uploaded to your environment for use in templates.Read-onlyList Images
List the stock images uploaded to your environment for use in templates. Returns each image's name, folder and size. Use this to find an image name.
Inputs
folderstring- Folder path to start from. Omit to list all images. Example: logos.
include_sub_foldersstring- y (default) to include images in sub-folders. Example: y.one of
yn
docmosis_pingCheck that Docmosis Cloud is online in your region.Read-onlyPing Docmosis
Check that Docmosis Cloud is online in your region. Returns a short status text. Use docmosis_environment_ready to check your own environment and quota.
Inputs
This tool takes no inputs.
docmosis_render_queue_getGet the current state of your environment's render queue.Read-onlyGet Render Queue
Get the current state of your environment's render queue. Returns queue length and processing details. Use this to diagnose slow renders.
Inputs
This tool takes no inputs.
docmosis_template_batch_upload_status_getGet the status of a batch template upload job started in the Cloud Console or API.Read-onlyGet Template Batch Upload Status
Get the status of a batch template upload job started in the Cloud Console or API. Returns jobStatus with isEnded, error counts and progress. Use this to monitor a running batch upload.
Inputs
user_job_idstringrequired- Identifier of the batch upload job. Example: batch-2026-01-15.
docmosis_template_details_getGet the details of an uploaded template, without the file itself.Read-onlyGet Template Details
Get the details of an uploaded template, without the file itself. Returns its name, size, description, upload time and any template errors. Use docmosis_template_structure_get for its fields and sections.
Inputs
template_namestringrequired- Name of the uploaded template, including any folder path, from docmosis_templates_list. Example: samples/WelcomeTemplate.docx.
docmosis_template_sample_data_getGenerate sample data for an uploaded template, based on its fields and sections.Read-onlyGet Template Sample Data
Generate sample data for an uploaded template, based on its fields and sections. Returns sample JSON (or XML) with placeholder values. Use the result as a starting point for the data in docmosis_document_render.
Inputs
template_namestringrequired- Name of the uploaded template, including any folder path, from docmosis_templates_list. Example: samples/WelcomeTemplate.docx.
formatstring- json (default) or xml. Example: json.one of
jsonxml
docmosis_template_structure_getGet the structure of an uploaded template: its fields, repeating sections, conditional sections and images.Read-onlyGet Template Structure
Get the structure of an uploaded template: its fields, repeating sections, conditional sections and images. Returns the structure as JSON. Use this to work out what data a template needs. Use docmosis_template_sample_data_get for ready-made sample data.
Inputs
template_namestringrequired- Name of the uploaded template, including any folder path, from docmosis_templates_list. Example: samples/WelcomeTemplate.docx.
docmosis_templates_listList the templates uploaded to your environment, optionally under one folder.Read-onlyList Templates
List the templates uploaded to your environment, optionally under one folder. Returns each template's name, folder, size and last-modified time, and errors when include_detail is true. Use this to find a template name for docmosis_document_render.
Inputs
folderstring- Folder path to start from. Omit to list all templates. Example: samples.
include_detailstring- y to include extra detail such as template errors (much slower). Example: n.one of
yn include_sub_foldersstring- y (default) to include templates in sub-folders. Example: y.one of
yn page_sizestring- Page size when paging, up to 1000. Example: 100.
page_tokenstring- Token from the previous page's response, to get the next page. Example: eyJwYWdlIjoyfQ.
pagingstring- y to return results in pages. Example: y.one of
yn
docmosis_document_renderGenerate a document (PDF, DOCX, ODT, HTML and more) by merging JSON data into an uploaded template.WriteRender Document
Generate a document (PDF, DOCX, ODT, HTML and more) by merging JSON data into an uploaded template. Returns JSON with succeeded, the document as base64 in resultFile when it is returned to you, and page and size details. With store_to set to mailto:, the file is emailed instead. Use docmosis_template_sample_data_get to see the data shape a template expects. Each render counts against your page quota.
Inputs
output_namestringrequired- File name of the result. Its extension sets the format unless output_format is given. Example: welcome-letter.pdf.
template_namestringrequired- Template to merge into, including any folder path, from docmosis_templates_list. Separate several with ; to concatenate them. Example: samples/WelcomeTemplate.docx.
dataobject- Data to merge: a JSON object whose keys match the template's fields and sections. Example: {"firstName": "Jane", "items": [{"name": "Widget", "qty": 2}]}
dev_modestring- y to render in developer mode, where template and data errors are written into the document instead of failing. Example: y.one of
yn mail_body_textstring- Plain-text email body when store_to is mailto. Example: Please find your document attached.
mail_subjectstring- Email subject when store_to is mailto. Example: Your welcome pack.
output_formatstring- Output format, for example pdf, docx, odt, html or txt. Separate several with ; to get a zip. Example: pdf.
password_protectstring- Password needed to open the resulting PDF or DOCX. Example: s3cret.
pdf_watermarkstring- Watermark text across PDF pages. Example: DRAFT.
request_idstring- Your own identifier for the job, echoed in the response. Example: order-1042.
store_tostring- Where to send the result instead of returning it: mailto:address (several destinations separated by ;). Omit to return the file in the response. Example: mailto:jane@example.com.
tagsstring- Semicolon-separated tags to record against this render, for usage reports from docmosis_render_tags_get. Example: invoices;customer-acme.
docmosis_template_batch_upload_cancelCancel a running batch template upload job.WriteCancel Template Batch Upload
Cancel a running batch template upload job. Returns success, also when the job had already finished. Use docmosis_template_batch_upload_status_get to check the job first.
- Idempotent
Inputs
user_job_idstringrequired- Identifier of the batch upload job. Example: batch-2026-01-15.
docmosis_image_deleteDelete one or more uploaded stock images.DestructiveDelete Images
Delete one or more uploaded stock images. Returns success or an error. Get image names from docmosis_images_list.
- Idempotent
Inputs
image_namearrayrequired- Names of the images to delete, including folder paths. Example: ["logos/old-logo.png"]
docmosis_template_deleteDelete one or more uploaded templates.DestructiveDelete Templates
Delete one or more uploaded templates. Returns success or an error. Get template names from docmosis_templates_list. This cannot be undone.
- Idempotent
Inputs
template_namearrayrequired- Names of the templates to delete, including folder paths. Example: ["samples/OldTemplate.docx"]
No tools match.