curl -X GET "https://win.oneshotagent.com/v1/tools/sms/inbox/msg_abc123" \
-H "X-Agent-ID: 0xYourWalletAddress"
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
const message = await agent.smsInboxGet("msg_abc123");
console.log(`From: ${message.from}`);
console.log(`Body: ${message.body}`);
{
"id": "msg_abc123",
"from": "+14155551234",
"to": "+14151234567",
"body": "Yes, I'd like to confirm my appointment for Tuesday at 2pm",
"num_media": 0,
"media_urls": null,
"thread_id": "msg_outbound_xyz",
"related_outbound_id": "msg_outbound_xyz",
"received_at": "2024-01-15T10:30:00Z",
"created_at": "2024-01-15T10:30:00Z"
}
{
"error": "Message not found"
}
SMS
Read SMS
Get a specific inbound SMS message by ID
GET
/
v1
/
tools
/
sms
/
inbox
/
{messageId}
curl -X GET "https://win.oneshotagent.com/v1/tools/sms/inbox/msg_abc123" \
-H "X-Agent-ID: 0xYourWalletAddress"
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
const message = await agent.smsInboxGet("msg_abc123");
console.log(`From: ${message.from}`);
console.log(`Body: ${message.body}`);
{
"id": "msg_abc123",
"from": "+14155551234",
"to": "+14151234567",
"body": "Yes, I'd like to confirm my appointment for Tuesday at 2pm",
"num_media": 0,
"media_urls": null,
"thread_id": "msg_outbound_xyz",
"related_outbound_id": "msg_outbound_xyz",
"received_at": "2024-01-15T10:30:00Z",
"created_at": "2024-01-15T10:30:00Z"
}
{
"error": "Message not found"
}
Overview
Returns one inbound SMS message by ID, with sender, body, media, and the outbound message it replies to.Authentication
Requires theX-Agent-ID header with your wallet address.
Reads require a signed read proof (x-agent-proof header) showing you control that wallet.
Path Parameters
string
required
Message ID
Response
string
Message ID
string
Sender phone number
string
Your agent’s phone number
string
Message content
number
Number of media attachments
string[]
URLs to media attachments
string
ID of the related outbound message
string
ID of the outbound message this replies to
string
ISO receive timestamp
curl -X GET "https://win.oneshotagent.com/v1/tools/sms/inbox/msg_abc123" \
-H "X-Agent-ID: 0xYourWalletAddress"
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
const message = await agent.smsInboxGet("msg_abc123");
console.log(`From: ${message.from}`);
console.log(`Body: ${message.body}`);
{
"id": "msg_abc123",
"from": "+14155551234",
"to": "+14151234567",
"body": "Yes, I'd like to confirm my appointment for Tuesday at 2pm",
"num_media": 0,
"media_urls": null,
"thread_id": "msg_outbound_xyz",
"related_outbound_id": "msg_outbound_xyz",
"received_at": "2024-01-15T10:30:00Z",
"created_at": "2024-01-15T10:30:00Z"
}
{
"error": "Message not found"
}
Notes
- Returns only your agent’s messages
- Free (no payment required)