> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Docmosis

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.

**Authentication:** API Key
**Categories:** Files & Documents, Automation
**Tools:** 15: 11 read, 2 write, 2 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=DOCMOSIS)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Docmosis connection

   In **AgentKit > Connections**, create a Docmosis connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   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.actions

   const connector = 'docmosis'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { 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 call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'docmosis_environment_ready',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_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.actions

   connection_name = "docmosis"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_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 call
   result = actions.execute_tool(
       tool_input={},
       tool_name="docmosis_environment_ready",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Docmosis credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'docmosis_environment_ready',
  toolInput: {},
  connector: 'docmosis',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="docmosis_environment_ready",
    tool_input={},
    connection_name="docmosis",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `docmosis_environment_ready`

Check Environment Ready · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `docmosis_environment_summary`

Get Environment Summary · Read-only

Get details of your Docmosis environment.
Returns the plan, status, page quota and usage so far this period.
Use this to check remaining quota.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `docmosis_images_list`

List Images · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `folder` (`string`, optional): Folder path to start from. Omit to list all images. Example: logos.
- `include_sub_folders` (`string`, optional): y (default) to include images in sub-folders. Example: y. One of: `y`, `n`.

Example input: `{}`

### `docmosis_ping`

Ping Docmosis · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `docmosis_render_queue_get`

Get Render Queue · Read-only

Get the current state of your environment's render queue.
Returns queue length and processing details.
Use this to diagnose slow renders.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `docmosis_render_tags_get`

Get Render Tag Statistics · Read-only

Get monthly page and document counts for renders recorded with tags.
Returns counts per tag per month.
Use this for usage reporting by customer or document type.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `tags` (`string`, required): Tag, or semicolon-separated tags, to report on. Example: invoices;customer-acme.
- `month` (`string`, optional): Month to report on, 1 to 12. Defaults to the current month. Example: 1.
- `n_months` (`string`, optional): Number of months to report, ending at year and month. Defaults to 1. Example: 3.
- `pad_blanks` (`string`, optional): y to include zero values where there is no data. Example: y. One of: `y`, `n`.
- `year` (`string`, optional): Year to report on. Defaults to the current year. Example: 2026.

Example input: `{"tags":"<tags>"}`

### `docmosis_template_batch_upload_status_get`

Get Template Batch Upload Status · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `user_job_id` (`string`, required): Identifier of the batch upload job. Example: batch-2026-01-15.

Example input: `{"user_job_id":"<user_job_id>"}`

### `docmosis_template_details_get`

Get Template Details · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `template_name` (`string`, required): Name of the uploaded template, including any folder path, from docmosis_templates_list. Example: samples/WelcomeTemplate.docx.

Example input: `{"template_name":"<template_name>"}`

### `docmosis_template_sample_data_get`

Get Template Sample Data · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `template_name` (`string`, required): Name of the uploaded template, including any folder path, from docmosis_templates_list. Example: samples/WelcomeTemplate.docx.
- `format` (`string`, optional): json (default) or xml. Example: json. One of: `json`, `xml`.

Example input: `{"template_name":"<template_name>"}`

### `docmosis_template_structure_get`

Get Template Structure · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `template_name` (`string`, required): Name of the uploaded template, including any folder path, from docmosis_templates_list. Example: samples/WelcomeTemplate.docx.

Example input: `{"template_name":"<template_name>"}`

### `docmosis_templates_list`

List Templates · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `folder` (`string`, optional): Folder path to start from. Omit to list all templates. Example: samples.
- `include_detail` (`string`, optional): y to include extra detail such as template errors (much slower). Example: n. One of: `y`, `n`.
- `include_sub_folders` (`string`, optional): y (default) to include templates in sub-folders. Example: y. One of: `y`, `n`.
- `page_size` (`string`, optional): Page size when paging, up to 1000. Example: 100.
- `page_token` (`string`, optional): Token from the previous page's response, to get the next page. Example: eyJwYWdlIjoyfQ.
- `paging` (`string`, optional): y to return results in pages. Example: y. One of: `y`, `n`.

Example input: `{}`

### `docmosis_document_render`

Render Document · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `output_name` (`string`, required): File name of the result. Its extension sets the format unless output_format is given. Example: welcome-letter.pdf.
- `template_name` (`string`, required): Template to merge into, including any folder path, from docmosis_templates_list. Separate several with ; to concatenate them. Example: samples/WelcomeTemplate.docx.
- `data` (`object`, optional): Data to merge: a JSON object whose keys match the template's fields and sections. Example: {"firstName": "Jane", "items": [{"name": "Widget", "qty": 2}]}
- `dev_mode` (`string`, optional): y to render in developer mode, where template and data errors are written into the document instead of failing. Example: y. One of: `y`, `n`.
- `mail_body_text` (`string`, optional): Plain-text email body when store_to is mailto. Example: Please find your document attached.
- `mail_subject` (`string`, optional): Email subject when store_to is mailto. Example: Your welcome pack.
- `output_format` (`string`, optional): Output format, for example pdf, docx, odt, html or txt. Separate several with ; to get a zip. Example: pdf.
- `password_protect` (`string`, optional): Password needed to open the resulting PDF or DOCX. Example: s3cret.
- `pdf_watermark` (`string`, optional): Watermark text across PDF pages. Example: DRAFT.
- `request_id` (`string`, optional): Your own identifier for the job, echoed in the response. Example: order-1042.
- `store_to` (`string`, optional): 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.
- `tags` (`string`, optional): Semicolon-separated tags to record against this render, for usage reports from docmosis_render_tags_get. Example: invoices;customer-acme.

Example input: `{"output_name":"<output_name>","template_name":"<template_name>"}`

### `docmosis_template_batch_upload_cancel`

Cancel Template Batch Upload · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `user_job_id` (`string`, required): Identifier of the batch upload job. Example: batch-2026-01-15.

Example input: `{"user_job_id":"<user_job_id>"}`

### `docmosis_image_delete`

Delete Images · Destructive

Delete one or more uploaded stock images.
Returns success or an error.
Get image names from docmosis_images_list.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `image_name` (`array`, required): Names of the images to delete, including folder paths. Example: ["logos/old-logo.png"]

Example input: `{"image_name":["logos/old-logo.png"]}`

### `docmosis_template_delete`

Delete Templates · Destructive

Delete one or more uploaded templates.
Returns success or an error.
Get template names from docmosis_templates_list. This cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `template_name` (`array`, required): Names of the templates to delete, including folder paths. Example: ["samples/OldTemplate.docx"]

Example input: `{"template_name":["samples/OldTemplate.docx"]}`

## Related

Other Files & Documents connectors ([all 76](/agentkit/connectors/?category=files-documents)):

- [Notion](/agentkit/connectors/notion/): Scalekit connector, OAuth, 51 tools
- [Google Sheets](/agentkit/connectors/googlesheets/): Scalekit connector, OAuth, 48 tools
- [Google Drive](/agentkit/connectors/googledrive/): Scalekit connector, OAuth, 47 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
