Skip to content

SDK Bug: messages.list/threads.list fails with inboxId parameter #25

Description

@ttomiczek

Environment:

agentmail SDK v0.4.0
Node.js v22.22.0
Steps to reproduce:

const { AgentMailClient } = require('agentmail');
const client = new AgentMailClient({ apiKey: 'YOUR_KEY' });

// This fails
client.inboxes.messages.list({ inboxId: 'your-inbox@agentmail.to' })
// OR
client.inboxes.threads.list({ inboxId: 'your-inbox@agentmail.to' })
Expected: Return messages/threads for the specified inbox

Actual:

Error: JsonError: Expected string. Received object.
Workaround: Use org-level client.threads.list() (no inboxId) - works but returns all threads

Additional notes:

client.inboxes.list() works fine
client.inboxes.get({ inboxId: '...' }) works fine
The error occurs in the SDK's request serialization, likely passing the wrong type for the inboxId parameter

--

Prepared by my AI - sadky Silas has no github yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions