Reference

Authentication reference

Every tool invocation requires two parameters. The server resolves them in this order:

  1. Values passed directly in the tool call (highest priority)
  2. ZENSKAR_ORGANIZATION environment variable
  3. ZENSKAR_AUTH_TOKEN environment variable

Token format detection is automatic:

Token formatHeader sent
Looks like a JWT (eyJ...)Authorization: Bearer <token>
Any other formatx-api-key: <token>

No credentials are stored or logged by the server.


Tool reference (103 operations)

Customers, Contacts & Addresses

Customers

ToolDescription
listCustomersList customers with search, filtering, and pagination
getCustomerByIdGet a single customer by ID
createCustomerCreate a customer with address and tax information
updateCustomerPartially update customer details

Contacts

ToolDescription
listContactsList contacts with pagination
getContactByIdGet a single contact by ID
createContactCreate a contact for a customer
updateContactUpdate a contact's details

Customer Addresses

ToolDescription
listCustomerAddressesList addresses for a customer
createCustomerAddressAdd an address to a customer
updateCustomerAddressUpdate an existing customer address

Payment Methods

ToolDescription
listPaymentMethodsList payment methods for a customer
attachPaymentMethodAttach a payment method to a customer

Contracts

ToolDescription
listContractsList contracts; filter by status, customer, and dates
getContractByIdGet a contract with phases, pricings, and customer details
createContractCreate a contract with phases and pricing
updateContractUpdate contract terms, status, pricing, or renewal policy
deleteContractDelete a draft contract
getContractAmendmentsGet the amendment history for a contract
createContractPhaseAdd a phase to a contract (add-ons, expansions)
createContractPhasePricingAdd pricing to a contract phase
expireContractExpire an active contract
createContractPromptCreate a contract prompt
extractContractFromRawExtract structured contract data from raw text using AI

Invoices & Credit Notes

Invoices

ToolDescription
listInvoicesList invoices; filter by customer, status, and dates
getInvoiceByIdGet an invoice by ID
getInvoiceByExternalIdGet an invoice by external ID
getInvoiceGenerationStatusCheck the status of an async invoice generation job
downloadInvoiceDownload invoice data in JSON format
getInvoiceContractJsonActualsGet contract actuals associated with an invoice
getInvoicePaymentsGet successful payments mapped to an invoice
getInvoicePaymentsByIdGet successful payments for a specific invoice ID
getInvoicePaymentsWithoutRefundsGet original payment records, excluding refund rows
getInvoiceLineItemsGet line items and pricing details for an invoice
getInvoiceSummaryGet a summary view of an invoice
getAllInvoiceTagsGet all available invoice tags
generateInvoicePaymentLinkGenerate a hosted payment link for an invoice
payInvoiceInitiate payment for an invoice
approveInvoiceApprove an invoice for billing
voidInvoiceVoid an approved, unpaid invoice
generateInvoiceGenerate an invoice for a contract and date range
createInvoiceCreditNoteCreate a credit note against an invoice
createInvoiceChargeAuto-charge an invoice via the configured payment gateway

Credit Notes

ToolDescription
listCreditNotesList credit notes with pagination
getCreditNoteByIdGet a credit note by ID

Payments

ToolDescription
listAllPaymentsList all payments with filtering, sorting, and refund records
getPaymentByIdGet a payment by ID
createPaymentRecord a manual payment against an invoice
updatePaymentUpdate a payment's invoice allocations (payment_parts)
deleteManualPaymentDelete a manual payment
editManualPaymentEdit a manual payment's amount or payment method
refundPaymentRefund a payment in full or partially

Products, Plans & Quotes

Products

ToolDescription
listProductsList products in the catalog
getProductByIdGet a product by ID
createProductCreate a product
updateProductUpdate a product's details
getProductPricingsGet all pricing configurations for a product
createProductPricingCreate a new pricing configuration for a product

Plans (Templates)

ToolDescription
listPlansList plan templates
getPlanByIdGet a plan by ID, including phases and pricing
createPlanCreate a plan template
addProductsToPlanAdd products to an existing plan
previewPlanEstimatePreview estimated billing for a plan configuration

Quotes

ToolDescription
createQuoteCreate a quote or proposal
previewQuoteEstimatePreview estimated billing for a quote
getQuoteByIdGet a quote by ID
acceptQuoteAccept a quote, converting it to a contract

Accounting

ToolDescription
getChartOfAccountsGet the full chart of accounts
listAccountsList GL accounts with filtering
createAccountCreate a GL account
listJournalEntriesList journal entries with filtering
createJournalEntryCreate a manual journal entry
getJournalEntryGet a journal entry by ID with all its lines
listJournalLinesList journal lines across all entries
getBalanceSheetGet the balance sheet report
getIncomeStatementGet the income statement (P&L)
getAccountBalanceGet the balance for a specific GL account
recogniseRevenueTrigger revenue recognition up to a specified date

Metrics, Events & Other

Billable Metrics (Aggregates)

ToolDescription
listAggregatesList billable metrics with filtering
getAggregateSchemasShow schemas for billable metrics
getAggregateEstimatesGet estimates for a billable metric
getAggregateByIdGet a billable metric by ID
getAggregateLogsGet logs for a billable metric

Usage Events (Raw Metrics)

ToolDescription
listRawMetricsList usage events with filtering
createRawMetricCreate a usage event schema
getRawMetricByIdGet a usage event by ID
getRawMetricLogsGet recent event rows for a usage event
getRawMetricBySlugGet a usage event by API slug
ingestRawMetricEventIngest a usage event into the system

Custom Attributes & Tax

ToolDescription
listCustomAttributesList custom attribute definitions
createCustomAttributeCreate a custom attribute definition
listTaxCategoriesList tax categories
createTaxCategoryCreate a tax category

Business Entities

ToolDescription
listBusinessEntitiesList business entities
getBusinessEntityByIdGet a business entity by ID
createBusinessEntityCreate a business entity
updateBusinessEntityUpdate a business entity

Jobs & Utilities

ToolDescription
listJobsList async jobs (invoice generation, revenue recognition, etc.)
getJobByIdGet a job by ID to check its current status
createEntitlementCreate an entitlement
getCustomerPortalConfigurationGet the customer portal configuration
getCurrentDateTimeGet the current date and time in multiple formats