Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Authorize

Start the OAuth 2.0 authorization code flow. Redirects the user to the consent page.
No authentication required. This is a public endpoint.
Request example
# Redirect the user's browser to this URL open "https://api.v2.dealmachine.com/v1/oauth/authorize?\ client_id=dm_cid_abc123&\ redirect_uri=http://localhost:3000/callback&\ response_type=code&\ scope=account:read&\ state=random_state_string"

Query Parameters

ParameterTypeRequiredDescription
client_idstringYesYour application's client ID (dm_cid_xxx)
redirect_uristringYesMust match a registered redirect URI
response_typestringYesMust be code
scopestringYesSpace-separated scopes (e.g., account:read)
statestringRecommendedRandom string to prevent CSRF attacks
code_challengestringNo*PKCE challenge (base64url-encoded SHA-256 hash)
code_challenge_methodstringNo*S256 or plain
* Required for public (non-confidential) clients.

Available Scopes

ScopeDescription
account:readView account information

PKCE Support

For public clients, PKCE (Proof Key for Code Exchange) is required:
import crypto from 'crypto'; // Generate code verifier const codeVerifier = crypto.randomBytes(32).toString('base64url'); // Generate code challenge (S256) const codeChallenge = crypto .createHash('sha256') .update(codeVerifier) .digest('base64url'); // Include in authorize request const params = new URLSearchParams({ client_id: 'dm_cid_abc123', redirect_uri: 'http://localhost:3000/callback', response_type: 'code', scope: 'account:read', code_challenge: codeChallenge, code_challenge_method: 'S256', });
Save the codeVerifier - you'll need it when exchanging the authorization code for tokens.