import { createClient } from "@mailsai/sdk";
const client = createClient(); // reads MAILS_API_KEY
const result = await client.reputation.get();
console.log(result);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.get_reputation()
print(result)curl 'https://api.mails.ai/v1/reputation' \
-H "Authorization: Bearer $MAILS_API_KEY"mails reputation
mails reputation --agent-id hello{
"name": "mails_get_reputation",
"arguments": { "agent": "hello" }
}{
"workspace_id": "wsk_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"reputation": 0,
"agents_count": 0,
"last_computed_at": "<last_computed_at>"
}200 Workspace aggregate or per-agent reputation.
401 Missing or invalid API key.
403 The API key lacks the required scope
(insufficient_scope), or the token belongs to an
app connected by sign-in and this operation is
closed to connected apps
(connected_app_not_allowed).
404 Resource not found in this workspace, or the agent
a send names is archived (agent_archived).
409 Conflict — duplicate resource, an in-progress
idempotent request, a draft or scheduled message
that started sending while it was being changed, or
a thread deleted for good while one of its messages
is being sent (duplicate_resource); or an agent
name more than one agent has (agent_name_conflict:
use the agent's id); or a status change on an
archived agent, since archiving cannot be undone
(agent_archived).
500 Internal server error.Get reputation
Workspace-wide reputation when called without
agent_id, or per-agent stats when an agent id/name is supplied.import { createClient } from "@mailsai/sdk";
const client = createClient(); // reads MAILS_API_KEY
const result = await client.reputation.get();
console.log(result);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.get_reputation()
print(result)curl 'https://api.mails.ai/v1/reputation' \
-H "Authorization: Bearer $MAILS_API_KEY"mails reputation
mails reputation --agent-id hello{
"name": "mails_get_reputation",
"arguments": { "agent": "hello" }
}{
"workspace_id": "wsk_01JZX8K3M9Q4P7VN2YB6RTDC0E",
"reputation": 0,
"agents_count": 0,
"last_computed_at": "<last_computed_at>"
}200 Workspace aggregate or per-agent reputation.
401 Missing or invalid API key.
403 The API key lacks the required scope
(insufficient_scope), or the token belongs to an
app connected by sign-in and this operation is
closed to connected apps
(connected_app_not_allowed).
404 Resource not found in this workspace, or the agent
a send names is archived (agent_archived).
409 Conflict — duplicate resource, an in-progress
idempotent request, a draft or scheduled message
that started sending while it was being changed, or
a thread deleted for good while one of its messages
is being sent (duplicate_resource); or an agent
name more than one agent has (agent_name_conflict:
use the agent's id); or a status change on an
archived agent, since archiving cannot be undone
(agent_archived).
500 Internal server error.Was this page helpful?