Developers
Build on Ambr
REST API, A2A JSON-RPC, and MCP integration for AI agent contract management.
/v1/contractsCreate a new Ricardian Contract from a template. Returns a draft that both parties must sign.
const response = await fetch('https://getamber.dev/api/v1/contracts', {
method: 'POST',
headers: {
'X-API-Key': '<API_KEY>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
template: 'c1-api-access',
parameters: {
buyer_name: 'Acme Analytics Ltd.',
buyer_agent_id: '0x7a3b...9f2e',
seller_name: 'DataCo Inc.',
api_endpoint: 'https://api.dataco.io/v1',
pricing_model: 'per-call',
price_per_call: 0.002,
currency: 'USDC', // also supports USDbC, DAI, ETH, WETH, cbETH, cbBTC
sla_uptime_percent: 99.9,
governing_law: 'Singapore',
},
principal_declaration: {
agent_id: '0x7a3b...9f2e',
principal_name: 'Acme Analytics Ltd.',
principal_type: 'company',
},
}),
});
// response.status → 'draft'
// response.sign_url → '/api/v1/contracts/amb-2026-0001/sign'/v1/contracts/:id/signSign a contract with an ECDSA wallet signature. Both parties must sign to activate.
const response = await fetch(
'https://getamber.dev/api/v1/contracts/amb-2026-0001/sign',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
wallet_address: '0x7a3b...9f2e',
signature: '0x1234...abcd',
message: 'I agree to the terms of contract with hash: <sha256_hash>',
}),
}
);
// First sig: draft → pending_signature
// Second sig: pending_signature → active/v1/contracts/:idQuery contract status, metadata, and amendment chain. Full text requires API key or share token.
const contract = await fetch(
'https://getamber.dev/api/v1/contracts/amb-2026-0001',
{ headers: { 'X-API-Key': '<API_KEY>' } }
).then(r => r.json());
// contract.status → 'draft' | 'handshake' | 'pending_signature' | 'active' | 'amended'
// contract.sha256_hash → 'a1b2c3...'
// contract.amendment_chain → [{ hash, parent_hash, type }]/v1/contracts/:id/handshakeSubmit a handshake response — accept, reject, or request changes to a draft contract. Includes visibility preference.
const response = await fetch(
'https://getamber.dev/api/v1/contracts/amb-2026-0001/handshake',
{
method: 'POST',
headers: {
'X-API-Key': '<API_KEY>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'accept', // 'accept' | 'reject' | 'request_changes'
visibility: 'parties_only', // 'public' | 'parties_only' | 'private'
message: 'Terms accepted. Proceeding to signature.',
}),
}
);
// action: accept → draft → pending_signature
// action: request_changes → remains draft with change request attached/v1/contracts/:id/wallet-authVerify wallet ownership for contract access. Returns a signed challenge for authenticated reads.
const response = await fetch(
'https://getamber.dev/api/v1/contracts/amb-2026-0001/wallet-auth',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
wallet_address: '0x7a3b...9f2e',
signature: '0xabcd...1234',
message: 'Authenticate wallet for contract amb-2026-0001',
}),
}
);
// response.access_token → short-lived JWT for contract reads/v1/dashboard/wallet-authDashboard login via wallet signature. Returns a session token for the Ambr dashboard.
const response = await fetch(
'https://getamber.dev/api/v1/dashboard/wallet-auth',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
wallet_address: '0x7a3b...9f2e',
signature: '0xabcd...1234',
message: 'Sign in to Ambr Dashboard',
}),
}
);
// response.session_token → use in Authorization header for dashboard API/v1/keysActivate an API key with on-chain payment verification. Requires a Base L2 transaction hash.
const response = await fetch(
'https://getamber.dev/api/v1/keys',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
wallet_address: '0x7a3b...9f2e',
tx_hash: '0x9876...fedc',
chain: 'base',
}),
}
);
// response.api_key → 'ambr_live_...'
// response.tier → 'developer' | 'startup' | 'scale' | 'enterprise'Contract Lifecycle
Contracts are created as drafts. The counterparty reviews and submits a handshake — accepting, rejecting, or requesting changes. Once accepted, the first ECDSA wallet signature moves the contract to pending_signature. When the second party signs, the contract becomes active. Both signatures are cryptographically verified — no API key needed to sign, just a valid wallet.
MCP Integration
Add Ambr to your AI agent with one config block. Works with Claude Code, Cursor, and any MCP-compatible client. Your agent gets 6 tools: list templates, create contracts, get/verify contracts, check status, and agent handshake.
Claude Code — settings.json
{
"mcpServers": {
"ambr": {
"type": "url",
"url": "https://getamber.dev/api/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}Cursor — .cursor/mcp.json
{
"mcpServers": {
"ambr": {
"url": "https://getamber.dev/api/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}Get your API key at /activate. Tools that modify state (create contract, agent handshake) require a valid key. Read-only tools (list templates, verify hash) work without authentication.
Integrations
Supported Stack
Production integrations powering Ambr's contract infrastructure.
x402 V2
LiveHTTP-native micropayments on Base L2. Multi-token: USDC, USDbC, DAI, ETH, WETH, cbETH, cbBTC.
A2A Agent Card
LiveJSON-RPC discovery at getamber.dev/.well-known/agent.json. Agents find and interact with Ambr automatically.
MCP Server
LiveModel Context Protocol integration. Add Ambr to Claude, Cursor, or any MCP-compatible agent.
Base L2
LivecNFT minting, SHA-256 hash storage, and counterparty-gated transfers on Base mainnet.
Stripe Payments
LiveCard payments for API key activation. Starter, Builder, and Enterprise tiers.
ZK Identity
LiveZero-knowledge identity verification via Groth16/BN128 zk-SNARKs powered by the Demos Network. Prove entity status without revealing identity.
Start Building
Free developer access — 25 contracts, no payment required. Full REST API, A2A discovery, and MCP integration.