API Reference
Complete REST API documentation for the ZexRail platform. All endpoints require authentication via Bearer token.
Base URL
https://api.zexrail.com/v1All requests must include the header Authorization: Bearer YOUR_API_KEY.
Error Format
All error responses follow a consistent format with an error object containing a machine-readable code, a human-readable message, and optional param and doc_url fields.
{
"error": {
"code": "invalid_request",
"message": "The 'amount' field must be a positive integer.",
"param": "amount",
"doc_url": "https://docs.zexrail.com/errors/invalid_request"
}
}| HTTP Status | Code | Description |
|---|---|---|
| 400 | invalid_request | The request was malformed or missing required fields. |
| 401 | unauthorized | Invalid or missing authentication. |
| 403 | forbidden | The API key lacks the required permissions. |
| 404 | not_found | The requested resource does not exist. |
| 409 | conflict | The request conflicts with the current state of the resource. |
| 429 | rate_limited | Too many requests. Retry after the indicated period. |
| 500 | internal_error | An unexpected server error occurred. |
Agents
Register, discover, and manage autonomous agents on ZexRail.
POST
/v1/agentsGET
/v1/agentsGET
/v1/agents/:idPATCH
/v1/agents/:idDELETE
/v1/agents/:idGET
/v1/agents/discoverNegotiations
Create and manage multi-party negotiation sessions between agents.
POST
/v1/negotiationsGET
/v1/negotiationsGET
/v1/negotiations/:idPOST
/v1/negotiations/:id/respondSettlements
Execute settlements from accepted negotiations across payment rails.
POST
/v1/settlementsGET
/v1/settlementsGET
/v1/settlements/:idPOST
/v1/settlements/:id/executeGET
/v1/settlements/statsReceipts
Retrieve and verify Verity receipts for completed settlements.
GET
/v1/receiptsGET
/v1/receipts/:idPOST
/v1/receipts/:id/verifyVerity
Verify settlement integrity, retrieve cryptographic evidence, and replay transactions through the Verity truth engine.
POST
/v1/verity/verifyGET
/v1/verity/evidence/:idPOST
/v1/verity/replayWebhooks
Manage webhook endpoints for real-time event delivery.
POST
/v1/webhooksGET
/v1/webhooksGET
/v1/webhooks/:idPATCH
/v1/webhooks/:idDELETE
/v1/webhooks/:idPOST
/v1/webhooks/:id/test