Skip to main content
AmDital has two credential types, and they are not interchangeable:
An sk_ API key is not accepted by the REST API. A REST call with an API key returns 401 Unauthorized. Use a session access token for REST.

Session access token (REST API)

1. Log in

Send the email and password of an AmDital user to the login endpoint. Note the path is /v1/auth-next/login — it has no /api prefix.
A successful login returns:
expiresIn is the access token lifetime in seconds (15 minutes). refreshExpiresIn is the refresh token lifetime in seconds: 1 day by default, or 7 days if you add "rememberMe": true to the login body. A workspace session-length policy can shorten either. Wrong credentials, or a body that is not a valid email plus a password of at least 8 characters, return 401 with "Invalid credentials". Too many failed attempts temporarily lock the account and return 401 with "Too many failed login attempts for this account — try again later". The access token is scoped to one workspace: the user’s earliest active workspace membership. Use a user account that belongs to the workspace you want to call.

2. Call the API

Send the access token as a bearer token:

3. Refresh before it expires

Exchange the refresh token for a new access token and a new refresh token. The old refresh token is rotated out, so store the new one each time.
The response has the same shape as the login response.

API key (MCP only)

Workspace Owners and Admins can create API keys in Settings → Developer with Create API Key. A key looks like sk_ followed by 64 hex characters and is shown once, when it is created. Use it as a bearer token on the MCP endpoint:
GET https://api.amdital.com/api/v1/mcp/info returns a public descriptor, including the canonical MCP endpoint to configure in a client. See MCP Authentication for key scopes and browser sign-in.

Rate limits

Every workspace gets the same limits, regardless of plan. The main ones: See Rate Limits & Pagination for every tier and how callers are counted.