GET
/v1/me/mail/labelsLabels belong to the environment, not to a person: everybody who can open a
mailbox sees the same set. Use the ids, such as lbl_p6m3x8b2k9q4w7td, to filter
the message list and to
label a conversation.
Request
curl https://api.proppertrading.com/v1/me/mail/labels \
-H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f"
Response
{
"data": [
{ "id": "lbl_p6m3x8b2k9q4w7td", "object": "mail_label", "name": "Payouts", "color": "blue" }
],
"meta": { "request_id": "req_01kz4bkr1aj1gv63d8fv3133ey" }
}
color is a name rather than a hex value: the palette is fixed so a label looks
the same in every client. The current set is gray, red, orange, amber,
emerald, cyan, blue, violet and pink.
Errors
| Status | Code | Meaning |
|---|---|---|
| 403 | insufficient_scope | This device does not hold mail:read |
| 403 | mailbox_not_permitted | The account may not open a mailbox at all |