Send a Message

Send a message to a Fetch Hive agent via the API.

Send a message to an agent

post

Send a message to an agent

Authorizations
Body
user_idstringOptional
messagestringRequired
agentstringRequired
chatstringRequired
streamingbooleanRequired
Responses
200

Successful response

application/json
post
POST /v1/agent/invoke HTTP/1.1
Host: api.fetchhive.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 187

{
  "user_id": "text",
  "message": "text",
  "agent": "text",
  "chat": "text",
  "streaming": true,
  "history": {
    "enabled": true,
    "depth": 1
  },
  "mcp": {
    "enabled": true,
    "tools": [
      {
        "type": "google_search",
        "depth": 10
      }
    ]
  }
}
{
  "content": "text",
  "thinking_content": "text",
  "duration": 1,
  "model": "text",
  "usage": {
    "input_tokens": {
      "total_tokens": 1,
      "cached_tokens": 1
    },
    "output_tokens": {
      "total_tokens": 1,
      "reasoning_tokens": 1
    },
    "total_tokens": 1
  },
  "tool_responses": [
    {
      "tool_id": "text",
      "tool_type": "text",
      "tool_input": "text",
      "tool_observation": "text",
      "tool_status": "text"
    }
  ]
}

Last updated

Was this helpful?