Mailboxes API reference

Connect a Gmail, Microsoft or IMAP and SMTP mailbox, read and change it, run a check and disconnect it. 12 operations.

For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.

#Operations

Authenticate as described in Authentication. Every operation below is generated from the OpenAPI document.

Method and pathScopeWhat it does
GET /v1/mailboxesreadList connected mailboxes
POST /v1/mailboxeswriteConnect an IMAP/SMTP mailbox
POST /v1/mailboxes/gmail/connectwriteStart connecting a Gmail mailbox
GET /v1/mailboxes/gmail/callbackpublicGmail OAuth callback
POST /v1/mailboxes/gmail/completewriteFinish connecting a Gmail mailbox
POST /v1/mailboxes/microsoft/connectwriteStart connecting a Microsoft 365 mailbox
GET /v1/mailboxes/microsoft/callbackpublicMicrosoft 365 OAuth callback
POST /v1/mailboxes/microsoft/completewriteFinish connecting a Microsoft 365 mailbox
GET /v1/mailboxes/{id}readGet a mailbox
PATCH /v1/mailboxes/{id}writeChange a mailbox
DELETE /v1/mailboxes/{id}writeDisconnect and delete a mailbox
POST /v1/mailboxes/{id}/checkwriteCheck a mailbox connection and its domain authentication

#GET /v1/mailboxes

The mailboxes in this account, oldest first, one page at a time, with status, daily limit, ramp setting and health. Pass next_cursor as cursor for the next page. Credentials are never returned.

Scope: read. A read key and a write key both work. Success: HTTP 200.

Query parameters

FieldTypeRequiredDescription
limitintegernoItems per page, 1 to 100 (default 20). 1 to 100
cursorstringnonext_cursor from the previous page. 0 to 500 characters

Response

FieldTypeRequiredDescription
dataarray of objectyesNo further constraints.
data[].idstringyesNo further constraints.
data[].provider"gmail" or "microsoft_graph" or "imap_smtp"yesNo further constraints.
data[].addressstringyesNo further constraints.
data[].display_namestring or nullyesNo further constraints.
data[].status"connected" or "disconnected" or "error"yesNo further constraints.
data[].daily_limitintegeryesNo further constraints.
data[].ramp_enabledbooleanyesNo further constraints.
data[].ramp_started_atstring (date-time) or nullyesISO 8601 time in UTC
data[].healthobjectyesNo further constraints.
data[].health.last_checked_atstring (date-time) or nullyesISO 8601 time in UTC
data[].health.consecutive_failuresintegeryesNo further constraints.
data[].health.last_errorstring or nullyesNo further constraints.
data[].created_atstring (date-time)yesISO 8601 time in UTC
data[].updated_atstring (date-time)yesISO 8601 time in UTC
next_cursorstring or nullyesNo further constraints.
Response example, HTTP 200
{
  "data": [
    {
      "id": "id_8f3a2c1d",
      "provider": "gmail",
      "address": "abc123",
      "display_name": "Example",
      "status": "connected",
      "daily_limit": 1,
      "ramp_enabled": true,
      "ramp_started_at": "2026-10-17T12:00:00.000Z",
      "health": {
        "last_checked_at": "2026-10-17T12:00:00.000Z",
        "consecutive_failures": 1,
        "last_error": "abc123"
      },
      "created_at": "2026-10-17T12:00:00.000Z",
      "updated_at": "2026-10-17T12:00:00.000Z"
    }
  ],
  "next_cursor": "abc123"
}

Errors

invalid_input, unauthorized, rate_limited, internal_error. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl "https://api.coldagentai.com/v1/mailboxes" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes`, {
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#POST /v1/mailboxes

Connects any mailbox that offers IMAP and SMTP. The connection is verified against the mail server first and nothing is stored if it fails. The credentials are encrypted at rest and never returned. Counts toward the plan IMAP mailbox cap. Gmail and Microsoft 365 use their own connect endpoints.

Scope: write. A read key gets 403 forbidden. Success: HTTP 201.

Request body

Send JSON with Content-Type: application/json. The body is required.

FieldTypeRequiredDescription
addressstringyes0 to 320 characters.
display_namestring or nullno0 to 200 characters.
daily_limitintegerno0 to 2000.
ramp_enabledbooleannoNo further constraints.
imapobjectyesNo further constraints.
imap.hoststringyes1 to 253 characters.
imap.portintegeryes1 to 65535.
imap.securebooleanyestrue for TLS from the first byte (465, 993); false requires STARTTLS
imap.userstringyes1 to 320 characters.
imap.passstringyes1 to 1024 characters.
smtpobjectyesNo further constraints.
smtp.hoststringyes1 to 253 characters.
smtp.portintegeryes1 to 65535.
smtp.securebooleanyestrue for TLS from the first byte (465, 993); false requires STARTTLS
smtp.userstringyes1 to 320 characters.
smtp.passstringyes1 to 1024 characters.
Request example
{
  "address": "abc123",
  "imap": {
    "host": "abc123",
    "port": 1,
    "secure": true,
    "user": "abc123",
    "pass": "abc123"
  },
  "smtp": {
    "host": "abc123",
    "port": 1,
    "secure": true,
    "user": "abc123",
    "pass": "abc123"
  }
}

Response

FieldTypeRequiredDescription
idstringyesNo further constraints.
provider"gmail" or "microsoft_graph" or "imap_smtp"yesNo further constraints.
addressstringyesNo further constraints.
display_namestring or nullyesNo further constraints.
status"connected" or "disconnected" or "error"yesNo further constraints.
daily_limitintegeryesNo further constraints.
ramp_enabledbooleanyesNo further constraints.
ramp_started_atstring (date-time) or nullyesISO 8601 time in UTC
healthobjectyesNo further constraints.
health.last_checked_atstring (date-time) or nullyesISO 8601 time in UTC
health.consecutive_failuresintegeryesNo further constraints.
health.last_errorstring or nullyesNo further constraints.
created_atstring (date-time)yesISO 8601 time in UTC
updated_atstring (date-time)yesISO 8601 time in UTC
Response example, HTTP 201
{
  "id": "id_8f3a2c1d",
  "provider": "gmail",
  "address": "abc123",
  "display_name": "Example",
  "status": "connected",
  "daily_limit": 1,
  "ramp_enabled": true,
  "ramp_started_at": "2026-10-17T12:00:00.000Z",
  "health": {
    "last_checked_at": "2026-10-17T12:00:00.000Z",
    "consecutive_failures": 1,
    "last_error": "abc123"
  },
  "created_at": "2026-10-17T12:00:00.000Z",
  "updated_at": "2026-10-17T12:00:00.000Z"
}

Errors

invalid_input, unauthorized, forbidden, payload_too_large, rate_limited, internal_error, provider_unavailable. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X POST "https://api.coldagentai.com/v1/mailboxes" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "address": "abc123",
  "imap": {
    "host": "abc123",
    "port": 1,
    "secure": true,
    "user": "abc123",
    "pass": "abc123"
  },
  "smtp": {
    "host": "abc123",
    "port": 1,
    "secure": true,
    "user": "abc123",
    "pass": "abc123"
  }
}'
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes`, {
  method: 'POST',
  body: JSON.stringify({
    "address": "abc123",
    "imap": {
      "host": "abc123",
      "port": 1,
      "secure": true,
      "user": "abc123",
      "pass": "abc123"
    },
    "smtp": {
      "host": "abc123",
      "port": 1,
      "secure": true,
      "user": "abc123",
      "pass": "abc123"
    }
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#POST /v1/mailboxes/gmail/connect

Returns the Gmail consent URL for the mailbox owner to open and approve. After approval the provider redirects to a page on this API that shows a code and a state: the owner gives both back to you, and you finish with POST /v1/mailboxes/gmail/complete using this account's key within 10 minutes. Gmail connects up to 100 distinct Google accounts, counted across all Meralume Labs products; beyond that this answers 503. Connect over IMAP/SMTP instead.

Scope: write. A read key gets 403 forbidden. Success: HTTP 200.

Request body

Send JSON with Content-Type: application/json. The body is optional.

FieldTypeRequiredDescription
login_hintstringno0 to 320 characters.
Request example
{
  "login_hint": "abc123"
}

Response

FieldTypeRequiredDescription
authorization_urlstringyesOpen this in a browser signed in to the mailbox owner.
expires_atstring (date-time)yesThe link stops working after this time; start again.
Response example, HTTP 200
{
  "authorization_url": "abc123",
  "expires_at": "2026-10-17T12:00:00.000Z"
}

Errors

invalid_input, unauthorized, forbidden, payload_too_large, rate_limited, internal_error, provider_unavailable. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X POST "https://api.coldagentai.com/v1/mailboxes/gmail/connect" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "login_hint": "abc123"
}'
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/gmail/connect`, {
  method: 'POST',
  body: JSON.stringify({
    "login_hint": "abc123"
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#GET /v1/mailboxes/gmail/callback

Where Gmail sends the browser after the person approves. Not called by API clients. Shows the authorization code and the state for the person to give to whoever asked them to connect the mailbox, and stores nothing: the mailbox is stored only when that code and state reach POST /v1/mailboxes/gmail/complete with the key of the account that started the connection.

Scope: public. No API key is needed. Success: HTTP 200.

Query parameters

FieldTypeRequiredDescription
codestringno0 to 4096 characters
statestringno0 to 4096 characters
errorstringno0 to 200 characters

Response

HTTP 200 with a text/html body, not JSON.

Errors

invalid_input, internal_error. Every error uses the single format.

Rate limits

Counted per client address, not per key. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl "https://api.coldagentai.com/v1/mailboxes/gmail/callback"
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/gmail/callback`);
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.text();

#POST /v1/mailboxes/gmail/complete

Takes the code and state the mailbox owner got on the approval page, exchanges the code and stores the mailbox in this account. The state must come from a connect request made with this account's key, be used once, and be under 10 minutes old; any other state answers 400 and exchanges nothing. Connecting an address that is already connected replaces its stored credentials.

Scope: write. A read key gets 403 forbidden. Success: HTTP 200.

Request body

Send JSON with Content-Type: application/json. The body is required.

FieldTypeRequiredDescription
codestringyes1 to 4096 characters.
statestringyes1 to 4096 characters.
Request example
{
  "code": "abc123",
  "state": "abc123"
}

Response

FieldTypeRequiredDescription
idstringyesNo further constraints.
provider"gmail" or "microsoft_graph" or "imap_smtp"yesNo further constraints.
addressstringyesNo further constraints.
display_namestring or nullyesNo further constraints.
status"connected" or "disconnected" or "error"yesNo further constraints.
daily_limitintegeryesNo further constraints.
ramp_enabledbooleanyesNo further constraints.
ramp_started_atstring (date-time) or nullyesISO 8601 time in UTC
healthobjectyesNo further constraints.
health.last_checked_atstring (date-time) or nullyesISO 8601 time in UTC
health.consecutive_failuresintegeryesNo further constraints.
health.last_errorstring or nullyesNo further constraints.
created_atstring (date-time)yesISO 8601 time in UTC
updated_atstring (date-time)yesISO 8601 time in UTC
Response example, HTTP 200
{
  "id": "id_8f3a2c1d",
  "provider": "gmail",
  "address": "abc123",
  "display_name": "Example",
  "status": "connected",
  "daily_limit": 1,
  "ramp_enabled": true,
  "ramp_started_at": "2026-10-17T12:00:00.000Z",
  "health": {
    "last_checked_at": "2026-10-17T12:00:00.000Z",
    "consecutive_failures": 1,
    "last_error": "abc123"
  },
  "created_at": "2026-10-17T12:00:00.000Z",
  "updated_at": "2026-10-17T12:00:00.000Z"
}

Errors

invalid_input, unauthorized, forbidden, payload_too_large, rate_limited, internal_error, provider_unavailable. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X POST "https://api.coldagentai.com/v1/mailboxes/gmail/complete" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "abc123",
  "state": "abc123"
}'
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/gmail/complete`, {
  method: 'POST',
  body: JSON.stringify({
    "code": "abc123",
    "state": "abc123"
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#POST /v1/mailboxes/microsoft/connect

Returns the Microsoft 365 consent URL for the mailbox owner to open and approve. After approval the provider redirects to a page on this API that shows a code and a state: the owner gives both back to you, and you finish with POST /v1/mailboxes/microsoft/complete using this account's key within 10 minutes. Needs a Microsoft Entra app registration on the server; without one this answers 503 naming credentials.

Scope: write. A read key gets 403 forbidden. Success: HTTP 200.

Request body

Send JSON with Content-Type: application/json. The body is optional.

FieldTypeRequiredDescription
login_hintstringno0 to 320 characters.
Request example
{
  "login_hint": "abc123"
}

Response

FieldTypeRequiredDescription
authorization_urlstringyesOpen this in a browser signed in to the mailbox owner.
expires_atstring (date-time)yesThe link stops working after this time; start again.
Response example, HTTP 200
{
  "authorization_url": "abc123",
  "expires_at": "2026-10-17T12:00:00.000Z"
}

Errors

invalid_input, unauthorized, forbidden, payload_too_large, rate_limited, internal_error, provider_unavailable. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X POST "https://api.coldagentai.com/v1/mailboxes/microsoft/connect" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "login_hint": "abc123"
}'
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/microsoft/connect`, {
  method: 'POST',
  body: JSON.stringify({
    "login_hint": "abc123"
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#GET /v1/mailboxes/microsoft/callback

Where Microsoft 365 sends the browser after the person approves. Not called by API clients. Shows the authorization code and the state for the person to give to whoever asked them to connect the mailbox, and stores nothing: the mailbox is stored only when that code and state reach POST /v1/mailboxes/microsoft/complete with the key of the account that started the connection.

Scope: public. No API key is needed. Success: HTTP 200.

Query parameters

FieldTypeRequiredDescription
codestringno0 to 4096 characters
statestringno0 to 4096 characters
errorstringno0 to 200 characters

Response

HTTP 200 with a text/html body, not JSON.

Errors

invalid_input, internal_error. Every error uses the single format.

Rate limits

Counted per client address, not per key. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl "https://api.coldagentai.com/v1/mailboxes/microsoft/callback"
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/microsoft/callback`);
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.text();

#POST /v1/mailboxes/microsoft/complete

Takes the code and state the mailbox owner got on the approval page, exchanges the code and stores the mailbox in this account. The state must come from a connect request made with this account's key, be used once, and be under 10 minutes old; any other state answers 400 and exchanges nothing. Connecting an address that is already connected replaces its stored credentials.

Scope: write. A read key gets 403 forbidden. Success: HTTP 200.

Request body

Send JSON with Content-Type: application/json. The body is required.

FieldTypeRequiredDescription
codestringyes1 to 4096 characters.
statestringyes1 to 4096 characters.
Request example
{
  "code": "abc123",
  "state": "abc123"
}

Response

FieldTypeRequiredDescription
idstringyesNo further constraints.
provider"gmail" or "microsoft_graph" or "imap_smtp"yesNo further constraints.
addressstringyesNo further constraints.
display_namestring or nullyesNo further constraints.
status"connected" or "disconnected" or "error"yesNo further constraints.
daily_limitintegeryesNo further constraints.
ramp_enabledbooleanyesNo further constraints.
ramp_started_atstring (date-time) or nullyesISO 8601 time in UTC
healthobjectyesNo further constraints.
health.last_checked_atstring (date-time) or nullyesISO 8601 time in UTC
health.consecutive_failuresintegeryesNo further constraints.
health.last_errorstring or nullyesNo further constraints.
created_atstring (date-time)yesISO 8601 time in UTC
updated_atstring (date-time)yesISO 8601 time in UTC
Response example, HTTP 200
{
  "id": "id_8f3a2c1d",
  "provider": "gmail",
  "address": "abc123",
  "display_name": "Example",
  "status": "connected",
  "daily_limit": 1,
  "ramp_enabled": true,
  "ramp_started_at": "2026-10-17T12:00:00.000Z",
  "health": {
    "last_checked_at": "2026-10-17T12:00:00.000Z",
    "consecutive_failures": 1,
    "last_error": "abc123"
  },
  "created_at": "2026-10-17T12:00:00.000Z",
  "updated_at": "2026-10-17T12:00:00.000Z"
}

Errors

invalid_input, unauthorized, forbidden, payload_too_large, rate_limited, internal_error, provider_unavailable. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X POST "https://api.coldagentai.com/v1/mailboxes/microsoft/complete" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "abc123",
  "state": "abc123"
}'
JavaScript (fetch)
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/microsoft/complete`, {
  method: 'POST',
  body: JSON.stringify({
    "code": "abc123",
    "state": "abc123"
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#GET /v1/mailboxes/{id}

One mailbox with its status, limits and health.

Scope: read. A read key and a write key both work. Success: HTTP 200.

Path parameters

FieldTypeRequiredDescription
idstringyesat least 1 characters

Response

FieldTypeRequiredDescription
idstringyesNo further constraints.
provider"gmail" or "microsoft_graph" or "imap_smtp"yesNo further constraints.
addressstringyesNo further constraints.
display_namestring or nullyesNo further constraints.
status"connected" or "disconnected" or "error"yesNo further constraints.
daily_limitintegeryesNo further constraints.
ramp_enabledbooleanyesNo further constraints.
ramp_started_atstring (date-time) or nullyesISO 8601 time in UTC
healthobjectyesNo further constraints.
health.last_checked_atstring (date-time) or nullyesISO 8601 time in UTC
health.consecutive_failuresintegeryesNo further constraints.
health.last_errorstring or nullyesNo further constraints.
created_atstring (date-time)yesISO 8601 time in UTC
updated_atstring (date-time)yesISO 8601 time in UTC
Response example, HTTP 200
{
  "id": "id_8f3a2c1d",
  "provider": "gmail",
  "address": "abc123",
  "display_name": "Example",
  "status": "connected",
  "daily_limit": 1,
  "ramp_enabled": true,
  "ramp_started_at": "2026-10-17T12:00:00.000Z",
  "health": {
    "last_checked_at": "2026-10-17T12:00:00.000Z",
    "consecutive_failures": 1,
    "last_error": "abc123"
  },
  "created_at": "2026-10-17T12:00:00.000Z",
  "updated_at": "2026-10-17T12:00:00.000Z"
}

Errors

invalid_input, unauthorized, unknown_product, rate_limited, internal_error. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl "https://api.coldagentai.com/v1/mailboxes/$MAILBOX_ID" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/${id}`, {
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#PATCH /v1/mailboxes/{id}

Changes the display name, the daily send limit (0 to 2000) or the volume ramp. Turning the ramp on starts it now: 5 emails a day in week 1, 5 more each week, holding at 50 a day. The ramp only limits our own sending and is off by default.

Scope: write. A read key gets 403 forbidden. Success: HTTP 200.

Path parameters

FieldTypeRequiredDescription
idstringyesat least 1 characters

Request body

Send JSON with Content-Type: application/json. The body is required.

FieldTypeRequiredDescription
display_namestring or nullno0 to 200 characters.
daily_limitintegerno0 to 2000.
ramp_enabledbooleannoNo further constraints.
Request example
{
  "display_name": "Example",
  "daily_limit": 1,
  "ramp_enabled": true
}

Response

FieldTypeRequiredDescription
idstringyesNo further constraints.
provider"gmail" or "microsoft_graph" or "imap_smtp"yesNo further constraints.
addressstringyesNo further constraints.
display_namestring or nullyesNo further constraints.
status"connected" or "disconnected" or "error"yesNo further constraints.
daily_limitintegeryesNo further constraints.
ramp_enabledbooleanyesNo further constraints.
ramp_started_atstring (date-time) or nullyesISO 8601 time in UTC
healthobjectyesNo further constraints.
health.last_checked_atstring (date-time) or nullyesISO 8601 time in UTC
health.consecutive_failuresintegeryesNo further constraints.
health.last_errorstring or nullyesNo further constraints.
created_atstring (date-time)yesISO 8601 time in UTC
updated_atstring (date-time)yesISO 8601 time in UTC
Response example, HTTP 200
{
  "id": "id_8f3a2c1d",
  "provider": "gmail",
  "address": "abc123",
  "display_name": "Example",
  "status": "connected",
  "daily_limit": 1,
  "ramp_enabled": true,
  "ramp_started_at": "2026-10-17T12:00:00.000Z",
  "health": {
    "last_checked_at": "2026-10-17T12:00:00.000Z",
    "consecutive_failures": 1,
    "last_error": "abc123"
  },
  "created_at": "2026-10-17T12:00:00.000Z",
  "updated_at": "2026-10-17T12:00:00.000Z"
}

Errors

invalid_input, unauthorized, forbidden, unknown_product, payload_too_large, rate_limited, internal_error. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X PATCH "https://api.coldagentai.com/v1/mailboxes/$MAILBOX_ID" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "display_name": "Example",
  "daily_limit": 1,
  "ramp_enabled": true
}'
JavaScript (fetch)
const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/${id}`, {
  method: 'PATCH',
  body: JSON.stringify({
    "display_name": "Example",
    "daily_limit": 1,
    "ramp_enabled": true
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#DELETE /v1/mailboxes/{id}

Removes the mailbox and its stored credentials. Campaigns that rotated across it stop using it.

Scope: write. A read key gets 403 forbidden. Success: HTTP 200.

Path parameters

FieldTypeRequiredDescription
idstringyesat least 1 characters

Response

FieldTypeRequiredDescription
idstringyesNo further constraints.
deletedtrueyesNo further constraints.
Response example, HTTP 200
{
  "id": "id_8f3a2c1d",
  "deleted": true
}

Errors

invalid_input, unauthorized, forbidden, unknown_product, rate_limited, internal_error. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X DELETE "https://api.coldagentai.com/v1/mailboxes/$MAILBOX_ID" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY"
JavaScript (fetch)
const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/${id}`, {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}` },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();

#POST /v1/mailboxes/{id}/check

Proves the stored credentials still work (without sending anything) and checks SPF, DKIM and DMARC for the mailbox domain. DKIM selectors cannot be listed in DNS, so common ones are tried unless you pass your own. A passing check on a disconnected mailbox reconnects it.

Scope: write. A read key gets 403 forbidden. Success: HTTP 200.

Path parameters

FieldTypeRequiredDescription
idstringyesat least 1 characters

Request body

Send JSON with Content-Type: application/json. The body is optional.

FieldTypeRequiredDescription
dkim_selectorsarray of stringno0 to 10 items.
Request example
{
  "dkim_selectors": [
    "abc123"
  ]
}

Response

FieldTypeRequiredDescription
mailboxobjectyesNo further constraints.
mailbox.idstringyesNo further constraints.
mailbox.provider"gmail" or "microsoft_graph" or "imap_smtp"yesNo further constraints.
mailbox.addressstringyesNo further constraints.
mailbox.display_namestring or nullyesNo further constraints.
mailbox.status"connected" or "disconnected" or "error"yesNo further constraints.
mailbox.daily_limitintegeryesNo further constraints.
mailbox.ramp_enabledbooleanyesNo further constraints.
mailbox.ramp_started_atstring (date-time) or nullyesISO 8601 time in UTC
mailbox.healthobjectyesNo further constraints.
mailbox.health.last_checked_atstring (date-time) or nullyesISO 8601 time in UTC
mailbox.health.consecutive_failuresintegeryesNo further constraints.
mailbox.health.last_errorstring or nullyesNo further constraints.
mailbox.created_atstring (date-time)yesISO 8601 time in UTC
mailbox.updated_atstring (date-time)yesISO 8601 time in UTC
connectivityobjectyesNo further constraints.
connectivity.status"ok"yesNo further constraints.
dnsobject or nullyesNull when the lookup could not run; see dns_error.
dns.domainstringyesNo further constraints.
dns.overall"pass" or "warn" or "fail" or "missing" or "unknown"yesNo further constraints.
dns.spfobjectyesNo further constraints.
dns.spf.verdict"pass" or "warn" or "fail" or "missing" or "unknown"yesNo further constraints.
dns.spf.recordstring or nullyesNo further constraints.
dns.spf.lookup_countintegeryesDNS-querying terms counted across includes; the limit is lookup_limit.
dns.spf.lookup_limitintegeryesNo further constraints.
dns.spf.issuesarray of objectyesNo further constraints.
dns.spf.issues[].severity"fail" or "warn" or "info"yesNo further constraints.
dns.spf.issues[].codestringyesNo further constraints.
dns.spf.issues[].messagestringyesNo further constraints.
dns.spf.issues[].fixstringyesWhat to change, in plain words.
dns.dkimobjectyesNo further constraints.
dns.dkim.verdict"pass" or "warn" or "fail" or "missing" or "unknown"yesNo further constraints.
dns.dkim.selectors_triedarray of stringyesNo further constraints.
dns.dkim.keysarray of objectyesNo further constraints.
dns.dkim.keys[].selectorstringyesNo further constraints.
dns.dkim.keys[].key_bitsinteger or nullyesNo further constraints.
dns.dkim.keys[].validbooleanyesNo further constraints.
dns.dkim.issuesarray of objectyesNo further constraints.
dns.dkim.issues[].severity"fail" or "warn" or "info"yesNo further constraints.
dns.dkim.issues[].codestringyesNo further constraints.
dns.dkim.issues[].messagestringyesNo further constraints.
dns.dkim.issues[].fixstringyesWhat to change, in plain words.
dns.dmarcobjectyesNo further constraints.
dns.dmarc.verdict"pass" or "warn" or "fail" or "missing" or "unknown"yesNo further constraints.
dns.dmarc.recordstring or nullyesNo further constraints.
dns.dmarc.policystring or nullyesNo further constraints.
dns.dmarc.issuesarray of objectyesNo further constraints.
dns.dmarc.issues[].severity"fail" or "warn" or "info"yesNo further constraints.
dns.dmarc.issues[].codestringyesNo further constraints.
dns.dmarc.issues[].messagestringyesNo further constraints.
dns.dmarc.issues[].fixstringyesWhat to change, in plain words.
dns_errorstring or nullyesNo further constraints.
Response example, HTTP 200
{
  "mailbox": {
    "id": "id_8f3a2c1d",
    "provider": "gmail",
    "address": "abc123",
    "display_name": "Example",
    "status": "connected",
    "daily_limit": 1,
    "ramp_enabled": true,
    "ramp_started_at": "2026-10-17T12:00:00.000Z",
    "health": {
      "last_checked_at": "2026-10-17T12:00:00.000Z",
      "consecutive_failures": 1,
      "last_error": "abc123"
    },
    "created_at": "2026-10-17T12:00:00.000Z",
    "updated_at": "2026-10-17T12:00:00.000Z"
  },
  "connectivity": {
    "status": "ok"
  },
  "dns": {
    "domain": "example.com",
    "overall": "pass",
    "spf": {
      "verdict": "pass",
      "record": "abc123",
      "lookup_count": 1,
      "lookup_limit": 1,
      "issues": [
        {
          "severity": "fail",
          "code": "abc123",
          "message": "abc123",
          "fix": "abc123"
        }
      ]
    },
    "dkim": {
      "verdict": "pass",
      "selectors_tried": [
        "abc123"
      ],
      "keys": [
        {
          "selector": "abc123",
          "key_bits": null,
          "valid": true
        }
      ],
      "issues": [
        {
          "severity": "fail",
          "code": "abc123",
          "message": "abc123",
          "fix": "abc123"
        }
      ]
    },
    "dmarc": {
      "verdict": "pass",
      "record": "abc123",
      "policy": "abc123",
      "issues": [
        {
          "severity": "fail",
          "code": "abc123",
          "message": "abc123",
          "fix": "abc123"
        }
      ]
    }
  },
  "dns_error": "abc123"
}

Errors

invalid_input, unauthorized, forbidden, unknown_product, payload_too_large, rate_limited, internal_error, provider_unavailable. Every error uses the single format.

Rate limits

Counted per key: 200 requests per 10 seconds. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit the answer is 429 rate_limited with Retry-After. See Rate limits.

Examples

cURL
curl -X POST "https://api.coldagentai.com/v1/mailboxes/$MAILBOX_ID/check" \
  -H "Authorization: Bearer $COLDAGENTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "dkim_selectors": [
    "abc123"
  ]
}'
JavaScript (fetch)
const id = 'id_8f3a2c1d';
const res = await fetch(`https://api.coldagentai.com/v1/mailboxes/${id}/check`, {
  method: 'POST',
  body: JSON.stringify({
    "dkim_selectors": [
      "abc123"
    ]
  }),
  headers: { Authorization: `Bearer ${process.env.COLDAGENTAI_API_KEY}`, 'Content-Type': 'application/json' },
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
const data = await res.json();
Mailboxes