1. Raíz
DUFREI API
  • Raíz
    • Health Check
      GET
    • Initialize SSE Stream
      GET
    • List Financial Documents
      GET
    • List Shipments
      GET
    • Send MCP JSON-RPC Message
      POST
  • Schemas
    • ErrorResponse
    • FinancialDocument
    • CanceledRecord
    • TripDocument
    • PaymentRecord
    • MexicanAddress
    • ShipmentLeg
  1. Raíz

Send MCP JSON-RPC Message

POST
/messages
Sends a JSON-RPC 2.0 message to the MCP server for AI agent tool invocation.
Used in conjunction with the /sse endpoint for bidirectional MCP communication.

Solicitud

Autorización
API Key
Agregar parámetro en header
x-api-key
Ejemplo:
x-api-key: ********************
or
Parámetros del Body application/jsonRequerido

Ejemplos

Respuestas

🟢202
Message accepted for processing
Esta respuesta no tiene un body.
🟠400BadRequest
🟠401Unauthorized
🟠403Forbidden
🟠429TooManyRequests
🔴500InternalServerError
Solicitud Ejemplo de Solicitud
Shell
JavaScript
Java
Swift
curl --location 'https://api.dufrei.com/messages' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "getFinancialDocs",
    "params": {},
    "id": "req-001"
}'
Respuesta Ejemplo de Respuesta
400 - Éxito
{"error":{"code":400,"message":"Invalid query parameter","details":["'limit' must be an integer between 1 and 100"]}}
Modificado en 2026-02-24 05:17:23
Anterior
List Shipments
Siguiente
ErrorResponse
Built with