The Documint connector lets your AI agent act in each user's Documint account. Each user connects their own Documint API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 5 tools.
- Tools
- 5
- What they doRead · write · destructive
- 2 · 2 · 12 read2 write1 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 Documint connection
In AgentKit > Connections, create a Documint 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 = 'documint'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Documint:', 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: 'documint_templates_list',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 = "documint"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Documint:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="documint_templates_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Documint credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_tooldocumint_template_getGet one document template by ID.Read-onlyGet Template
Get one document template by ID. Returns the template record. Use select to limit the fields returned.
Inputs
template_idstringrequired- ID of the template, from documint_templates_list. Example: 64f1c2a9e4b0a1b2c3d4e5f6.
selectstring- Comma-separated fields to return; prefix a field with - to exclude it. Example: name,description,createdAt.
documint_templates_listList the document templates in your Documint account, with paging and sorting.Read-onlyList Templates
List the document templates in your Documint account, with paging and sorting. Returns result, an array of template records with id, name and createdAt (or the fields chosen with select). Use this to find a template ID for documint_document_create. Use documint_template_get for one template.
Inputs
limitinteger- Results per page. Default 100, maximum 200. Example: 50.
pageinteger- Page number of results. Default 1. Example: 1.
selectstring- Comma-separated fields to return; prefix a field with - to exclude it. Example: name,description,createdAt.
sortstring- Field to sort by; prefix with - for descending, and separate several with commas. Example: -createdAt.
documint_document_createMerge data into a Documint template to generate a document (usually a PDF).WriteCreate Document from Template
Merge data into a Documint template to generate a document (usually a PDF). Returns url (link to the generated file), name, fileExtension, timestamp, templateName and templateId. Use documint_templates_list to find the template ID; the data keys must match the template's field tokens. Set preview true to generate a preview document.
Inputs
dataobjectrequired- Merge data whose keys match the template's field tokens; nested objects and arrays fill nested fields and repeat loops. Example: {"customer_name": "Acme Inc.", "invoice_number": "INV-1001", "items": [{"description": "Consulting", "amount": 1200}]}
template_idstringrequired- ID of the template to merge, from documint_templates_list. Example: 64f1c2a9e4b0a1b2c3d4e5f6.
activeboolean- Set to true to merge the template's active version, as in Documint's API examples. Example: true.
previewboolean- Set to true to create a preview document instead of a final one. Example: true.
documint_template_updateUpdate a template's name, or deactivate or trash it.WriteUpdate Template
Update a template's name, or deactivate or trash it. Returns the updated template. Use is_trashed true to move a template to the trash instead of documint_template_delete.
- Idempotent
Inputs
template_idstringrequired- ID of the template to update, from documint_templates_list. Example: 64f1c2a9e4b0a1b2c3d4e5f6.
is_activeboolean- Set to false to deactivate the template. Example: true.
is_trashedboolean- Set to true to move the template to the trash. Example: false.
namestring- New template name. Example: Invoice v2.
documint_template_deletePermanently delete a template.DestructiveDelete Template
Permanently delete a template. Returns a confirmation. This cannot be undone. To keep the template recoverable, use documint_template_update with is_trashed or is_active instead.
- Idempotent
Inputs
template_idstringrequired- ID of the template to delete, from documint_templates_list. Example: 64f1c2a9e4b0a1b2c3d4e5f6.
No tools match.