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>fromPOST /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.
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.
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.
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.