REST API endpoints for agent registration, queries, and discovery
Self Agent ID exposes REST endpoints for registration workflows, agent queries, and A2A discovery. All endpoints are served from the web app deployment.
The full OpenAPI 3.1 spec is available at openapi.yaml in the main repository — import it into Postman or use it to generate clients.
Returns all agent IDs registered by a specific human wallet address.
Example response:
Verify Agent Proof-of-Human
Checks whether an agent has valid proof-of-human verification, the proof provider address, verification strength, and Sybil metrics.
Example response:
Get Agent Card
Returns the A2A-compatible agent identity card in JSON format.
Get Reputation Score
Returns the agent's verification strength score from the proof provider.
Example response:
Get Verification Status
Returns real-time proof status and freshness.
Example response:
A2A Discovery
Redirects to the agent card resolver. Compatible with A2A agent discovery protocols.
A2A Protocol (JSON-RPC)
Agent-to-Agent JSON-RPC 2.0 endpoint for programmatic interaction. Agents can register, verify, look up, deregister, and check proof freshness through natural language or structured intents.
All intents default to mainnet. Add network: "testnet" or chainId: 11142220 for Celo Sepolia (mock documents via the Self app — no real passport needed).
Service Discovery
Returns the service discovery document with API base URL, supported networks, registration modes, and capabilities.
Example response:
Registration Endpoints
Used by the dApp and CLI during registration flows. Sessions use encrypted tokens with a 30-minute TTL.
Create Registration Session
Creates a new registration session. Returns session token, QR code data, deep link, and the generated agent address.
Request body:
Modes: linked, wallet-free, ed25519, ed25519-linked, privy, smartwallet. Networks: mainnet (default, real passports via Self app), testnet (mock documents via Self app, no real passport needed).
Example response:
Poll Registration Status
Polls for registration completion. Returns stage: qr-ready, proof-received, completed, or failed.
Example response:
Get QR Code
Returns the QR code payload and deep link for the current session.
Self App Callback
Webhook endpoint called by the Self app after the user scans the QR and submits a passport proof.
Export Agent Private Key
After registration completes, export the agent's private key. Only available for linked, wallet-free, ed25519, and ed25519-linked modes.
Example response:
Deregistration Endpoints
Create Deregistration Session
Creates a deregistration session for an existing agent. The human must re-prove identity to burn the agent NFT.
Request body:
Poll Deregistration Status
Returns current deregistration stage. Once completed, the agent NFT has been burned.
Deregistration Callback
Webhook endpoint for the Self app after the user confirms deregistration.
Demo Endpoints
Used by the live demo page for testing agent verification patterns. All demo endpoints require x-self-agent-* signed headers (produced by SelfAgent.signRequest()).
Verify Agent (Service Pattern)
Accepts a signed agent request, verifies signature and on-chain status, returns agent info and credentials.
Agent-to-Agent
Demo agent endpoint that verifies the caller, checks sameHuman(), and signs its response. Response headers include the demo agent's own x-self-agent-* signature for mutual verification.
Chain Verify (Meta-Transaction)
Relayer endpoint that submits EIP-712 meta-transactions to the AgentDemoVerifier contract. Rate limited to 3 per hour per human nullifier.
Request body:
Census (Aggregated Stats)
Demonstrates agent-gated data contribution and reading.
AI Chat
AI agent chat endpoint backed by a LangChain agent. Signed requests are verified on-chain; unsigned requests are treated as anonymous.
Request body:
AA Proxy Endpoints
Account-abstraction proxy for the smart-wallet registration mode. These endpoints proxy JSON-RPC calls to a Pimlico bundler/paymaster, shielding the API key from the client. Origin-restricted and rate-limited.
Issue AA Proxy Token
Issues a short-lived token required by the bundler and paymaster endpoints. Rate limited to 30 requests per minute per IP.
Example response:
Bundler Proxy
Proxies ERC-4337 bundler JSON-RPC calls. Requires the x-aa-proxy-token header from the token endpoint.