Call it
curl https://api.peume.com/v1/call/get-a-hosted-link-to-connect-any-mailbox \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"redirect_url": "your redirect url",
"email": "your email"
}
}'const res = await fetch("https://api.peume.com/v1/call/get-a-hosted-link-to-connect-any-mailbox", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"redirect_url": "your redirect url",
"email": "your email"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/get-a-hosted-link-to-connect-any-mailbox",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"redirect_url": "your redirect url",
"email": "your email"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: get-a-hosted-link-to-connect-any-mailbox.
Parameters
redirect_urlstringWhere the page sends the user afterwards, with status, accountId, platform and email (or status=error and error).
emailstringPrefills the address and skips the first screen.
namestringDisplay name for sent mail; the page asks for it when absent.
reconnectAccountIdstringAn IMAP, Google or Microsoft account on this profile to reconnect; its accountId stays the same. IMAP asks only for the new password. Google and Microsoft open that provider's sign-in with the address as the hint and the held areas asked again. Other platforms answer 400, unknown ids 404.
