Skip to main content
AmDital does not publish a client SDK package. Call the REST API with any HTTP client, or generate a typed client from the OpenAPI spec with a tool such as OpenAPI Generator. Both examples below read the login email and password from environment variables AMDITAL_EMAIL and AMDITAL_PASSWORD, log in, and list leads. See Authentication for token lifetime and refresh.

TypeScript / JavaScript

Python

Two-factor challenge

If the user has two-factor authentication on, the login response has "mfaRequired": true and a 5-minute pending accessToken that every route rejects with 401. Before listing leads, exchange it with a 6-digit code at POST /v1/auth-next/mfa/complete-login. It returns { "verified": true, "accessToken", "refreshToken", "refreshExpiresIn" }, or 200 with { "verified": false } for a wrong code. Use /v1/auth-next/mfa/recovery/complete-login for a backup code. Full contract: API Reference.

MCP server descriptor

For AI agents, AmDital runs an MCP server. Its public descriptor needs no authentication:
endpoint is the URL to configure in an MCP client. A GET on the MCP endpoint itself returns 405 — MCP requests are POST. See What is MCP and the MCP tool reference.