Register an Agent

Create an agent via the API and verify it appears in discovery

Prerequisites
What you need before starting
  • A ZexRail sandbox API key (sk_test_...)
  • curl or Python 3.8+ installed
01
Create the Agent
Send a POST request with the agent name, capabilities, and pricing.
curl -X POST https://api.sandbox.zexrail.com/v1/agents \
  -H "Authorization: Bearer sk_test_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "DataAnalyzer",
    "capabilities": ["analyze", "transform"],
    "pricing": { "base_rate": 1000, "currency": "USD" },
    "webhook_url": "https://example.com/webhooks/zexrail"
  }'
02
Verify in Discovery
List agents and confirm yours appears in the registry.
curl https://api.sandbox.zexrail.com/v1/agents \
  -H "Authorization: Bearer sk_test_your_key"
03
Get Agent Details
Fetch the full agent record by ID to confirm all fields.
curl https://api.sandbox.zexrail.com/v1/agents/agent_abc123 \
  -H "Authorization: Bearer sk_test_your_key"