Skip to main content
The AmDital REST API is described by an OpenAPI 3 specification. It is generated by booting the real NestJS application and reading its registered routes, then adding request and response schemas from each module’s Zod validation schemas. An automated test boots the API and fails if a route is missing from the spec or a spec path has no real route. As of 4 October 2026, the published spec lists 266 paths and 508 operations, grouped under 37 tags.

Download the OpenAPI spec

https://www.amdital.com/openapi.json — import it into Postman, Insomnia, or any OpenAPI-compatible tool.

Base URL and authentication

  • Base URL: https://api.amdital.com
  • Most routes require Authorization: Bearer <accessToken> from POST /v1/auth-next/login. See Authentication.
  • Routes are workspace-scoped: the workspace comes from the access token, not from the URL or body.

Path conventions

Most resource routes follow this pattern: Some routes differ — for example, authentication lives under /v1/auth-next/* and health checks under /health. The spec is the source of truth for every path and parameter.

Multi-factor login (mfaRequired)

If the user has an authenticator app (TOTP) enrolled, POST /v1/auth-next/login still returns accessToken and refreshToken, but the access token is MFA-pending: it lives for 5 minutes and every API route except the two complete-login routes below rejects it. Users without a second factor are unaffected and get the normal 15-minute token.
Check mfaRequired on every login response. When it is true, expiresIn is 300 and any call other than the two below returns 401 with "Multi-factor authentication required". Complete the challenge within the 5 minutes. Refreshing a pending session with POST /v1/auth-next/refresh returns the same pending shape until the challenge is completed. If a workspace requires two-factor authentication and the user has not enrolled yet, the response also carries "mfaEnrollRequired": true and the user must enroll in the app instead of entering a code.

POST /v1/auth-next/mfa/complete-login

Exchange the pending token plus a 6-digit authenticator code for a full token pair. Send the pending access token as the bearer token and the login refreshToken in the body.
Success returns 200. The new refreshToken replaces the one you sent, so store it:

POST /v1/auth-next/mfa/recovery/complete-login

Same exchange with a backup (recovery) code instead of an authenticator code. The code is a string of 1 to 64 characters. It consumes the backup code and does not turn off two-factor authentication.
The success body is the same as mfa/complete-login.

Errors

Both complete-login routes share one per-account limit with POST /v1/auth-next/mfa/verify: 5 codes per 60 seconds, and a 15-minute lock after 10 consecutive failures. A recovery code is not a way around the limit.

Endpoints worth knowing

GET /health

Public service health check.

POST /api/v1/mcp

The MCP streamable-HTTP endpoint. JSON-RPC 2.0 initialize, tools/list, and tools/call are all sent here as POST. GET /api/v1/mcp/info returns a public descriptor; GET /api/v1/mcp returns 405. See the MCP tool reference.

POST /api/v1/webhooks

Register a webhook endpoint. See Webhooks Setup. See Product Modules for what each module covers.