Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Email

Connect a mailbox

Connects a mailbox on the business's own domain to send outreach from, with an app password (Google Workspace, Zoho and Fastmail; Microsoft 365 connects by signing in, in the app). Troopy finds its provider from the domain's MX records, signs in to send and to read before keeping anything, checks the domain's SPF, DKIM and DMARC, and seals the password, which never comes back out. Connecting an address again puts it back to work with the new password. Owners and admins only.

post/api/v1/mailboxes

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy mailboxes connect
MCP toolNone. Call it over REST or with the CLI.
Rate limit10 calls in 60 seconds, for each key
RetriesSend an Idempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.

Body

application/json
address*string

At least 3 characters · At most 254 characters

password*string

An app password made for Troopy, never the account's own password. From the CLI, pass @- to read it from standard input

At least 1 characters · At most 200 characters

namestring

The From name people see

At most 80 characters

signaturestring

At most 1000 characters

Response

201 · application/json
data*object
15 properties
id*string

A 24-character id

address*string
name*string

The From name people see

signature*string
provider*enum<string>

googlemicrosoftzohozoho_euzoho_infastmail

providerName*string
status*enum<string>

activepauseddisconnected

why*string | null

Why it isn't active

dailyCap*integer

The most it sends a day, once ramped up

gapMinutes*integer

Minutes between its sends, at least

readAll*boolean

Read all: Troopy keeps every new mail of its inbox for 30 days, and everyone in the workspace reads it. For a shared address.

dns*object | null

Its domain's SPF, DKIM and DMARC as last checked: a campaign needs SPF or DKIM

4 properties
spf*enum<string>

pass: one SPF record naming its provider; other: one that doesn't name it directly; many: more than one

passothermissingmany

dkim*enum<string>

found at its provider's usual selector; unknown: not there

foundunknown

dmarc*object | null
1 properties
policy*string
checkedAt*string

ISO 8601 date and time

test*object | null

Its last test send

4 properties
to*string

The teammate's inbox it went to

sentAt*string

ISO 8601 date and time

receivedAt*string | null
verdicts*object | null

What the receiving side said: pass, fail or gray each

4 properties
spf*string | null
dkim*string | null
dmarc*string | null
spam*string | null
createdBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
createdAt*string

ISO 8601 date and time

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
409 conflictThis Idempotency-Key was used for a different request, or that request is still running. Use a new key for a new request.
429 rate_limitedWait the number of seconds in Retry-After, then retry.