Skip to main content
GET
https://win.oneshotagent.com
/
v1
/
tools
/
inbox
curl -X GET "https://win.oneshotagent.com/v1/tools/inbox?include_body=true&limit=10" \
  -H "X-Agent-ID: <your_agent_uuid>"
{
  "emails": [
    {
      "id": "email_123",
      "from": "[email protected]",
      "subject": "Re: Your inquiry",
      "body": "Thanks for reaching out!",
      "received_at": "2025-12-28T12:00:00Z",
      "thread_id": "thread_abc",
      "attachments": [
        {
          "filename": "document.pdf",
          "content_type": "application/pdf",
          "size": 102400,
          "content": "JVBERi0xLjQK..."
        }
      ]
    }
  ],
  "count": 1,
  "has_more": false,
  "agent_id": "agent_xyz"
}

Authentication

Requires X-Agent-ID header with your agent UUID.

Query Parameters

since
string
ISO 8601 timestamp to filter emails received after this time
limit
number
default:"50"
Maximum number of emails to return (max: 100)
include_body
boolean
default:"false"
Whether to include email body and attachments

Response

emails
array
Array of inbound email objects
count
number
Number of emails returned
has_more
boolean
Whether there are more emails available
curl -X GET "https://win.oneshotagent.com/v1/tools/inbox?include_body=true&limit=10" \
  -H "X-Agent-ID: <your_agent_uuid>"
{
  "emails": [
    {
      "id": "email_123",
      "from": "[email protected]",
      "subject": "Re: Your inquiry",
      "body": "Thanks for reaching out!",
      "received_at": "2025-12-28T12:00:00Z",
      "thread_id": "thread_abc",
      "attachments": [
        {
          "filename": "document.pdf",
          "content_type": "application/pdf",
          "size": 102400,
          "content": "JVBERi0xLjQK..."
        }
      ]
    }
  ],
  "count": 1,
  "has_more": false,
  "agent_id": "agent_xyz"
}

Notes

  • Only essential fields are returned (no verbose headers or metadata)
  • Use since parameter for efficient polling
  • Attachments are base64-encoded for easy processing
  • Thread tracking via thread_id for conversation context