Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Email

Get an email

One email with its words. The mail of a teammate needs agents:read too, and has every code and link masked. Owners and admins reveal a code or a link in the app.

get/api/v1/emails/{id}

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 emails get
MCP tooltroopy_get_email
Rate limit120 calls in 60 seconds, for each key

Path parameters

id*string

The id of an email. c- is an email of a campaign or a reply to it. d- is an email that a person wrote, or an answer to it. t- is the mail of a teammate

Response

200 · application/json
data*object
20 properties
id*string

The id of an email. c- is an email of a campaign or a reply to it. d- is an email that a person wrote, or an answer to it. t- is the mail of a teammate

kind*enum<string>

campaignreplydirectteammate

status*enum<string>

failed: an email of a person that did not go. unknown: one that possibly went, so Troopy does not send it again

receivedsentscheduleddraftfailedunknown

box*object | null

The mailbox, or the address of the teammate, that it came to or went from. Null for a draft with no mailbox yet

2 properties
id*string

The id of a box. m- is a mailbox of the business. t- is the own address of a teammate

address*string
party*object

Who it is from, for a received email. Who it is to, for the rest

2 properties
name*string | null
email*string
subject*string
preview*string

The start of its words, at most 160 characters

at*string

When it came or went. For a scheduled email or a draft, when it is due

campaign*object | null
2 properties
id*string

A 24-character id

name*string
teammate*object | null
2 properties
handle*string
name*string
spam*boolean
read*boolean

False for a received email that no person opened. True for every other email

labels*array<string>

The labels that people put on it

sort*enum<string> | null

For a reply: what it says. Null until someone sorts it, and for every other email

interestedquestionnot_nownot_interestedout_of_officeunsubscribewrong_person

bodystring

Only for one email: its words. The mail of a teammate has every code and link masked

maskedobject

Only for one email of a teammate: how many codes and links are masked in its words

2 properties
codes*integer
links*integer
errorstring

Only for one email of a person: what the mail server or a delivery report said, when not every address got the email

recipientsarray<string>

Only for an email of a person to more than one address: every address that it went to

attachmentsarray<object>

The files that went with an email of a person: their names and sizes. Troopy does not keep the files

3 properties
name*string
type*string
size*integer

In bytes

threadarray<object>

Only for one email: every email between the business and this address, the oldest first, with its words

19 properties
id*string

The id of an email. c- is an email of a campaign or a reply to it. d- is an email that a person wrote, or an answer to it. t- is the mail of a teammate

kind*enum<string>

campaignreplydirectteammate

status*enum<string>

failed: an email of a person that did not go. unknown: one that possibly went, so Troopy does not send it again

receivedsentscheduleddraftfailedunknown

box*object | null

The mailbox, or the address of the teammate, that it came to or went from. Null for a draft with no mailbox yet

2 properties
id*string

The id of a box. m- is a mailbox of the business. t- is the own address of a teammate

address*string
party*object

Who it is from, for a received email. Who it is to, for the rest

2 properties
name*string | null
email*string
subject*string
preview*string

The start of its words, at most 160 characters

at*string

When it came or went. For a scheduled email or a draft, when it is due

campaign*object | null
2 properties
id*string

A 24-character id

name*string
teammate*object | null
2 properties
handle*string
name*string
spam*boolean
read*boolean

False for a received email that no person opened. True for every other email

labels*array<string>

The labels that people put on it

sort*enum<string> | null

For a reply: what it says. Null until someone sorts it, and for every other email

interestedquestionnot_nownot_interestedout_of_officeunsubscribewrong_person

bodystring

Only for one email: its words. The mail of a teammate has every code and link masked

maskedobject

Only for one email of a teammate: how many codes and links are masked in its words

2 properties
codes*integer
links*integer
errorstring

Only for one email of a person: what the mail server or a delivery report said, when not every address got the email

recipientsarray<string>

Only for an email of a person to more than one address: every address that it went to

attachmentsarray<object>

The files that went with an email of a person: their names and sizes. Troopy does not keep the files

3 properties
name*string
type*string
size*integer

In bytes

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.
404 not_foundCheck the path and any id in it. Every operation is listed in /api/v1/openapi.json.
429 rate_limitedWait the number of seconds in Retry-After, then retry.