Skip to main content
POST

Overview

The message/send method is the primary way to communicate with A2A agents synchronously. Send a message and receive a complete response in a single HTTP request.
Synchronous Communication: This method blocks until the agent provides a complete response. For streaming responses, use message/stream instead.

Request

Headers

string
required
Must be application/json
string
required
Your API key for authentication

Path Parameters

string
required
Unique identifier of the target agent

Body Parameters

string
required
JSON-RPC version, must be "2.0"
string
required
Unique identifier for this request (for response correlation)
string
required
Must be "message/send"
object
required
Message parameters object

Response

Success Response

string
JSON-RPC version, always "2.0"
object
Result object containing the agent’s response
string
Request ID (matches the request ID)

Error Response

string
JSON-RPC version, always "2.0"
object
Error information
string
Request ID (matches the request ID)

Examples

Multi-turn Conversation Example

File Upload Example

Best Practices

  • Always use UUID v4 for messageId fields
  • Keep request IDs unique for proper correlation
  • Store contextId from responses for multi-turn conversations
  • Use Base64 encoding without data URL prefix
  • Specify correct MIME types for proper handling
  • Keep files under 5MB for optimal performance
  • Always check for error field in responses
  • Implement retry logic for transient errors (5xx codes)
  • Validate JSON-RPC format before sending requests