{"id":23763851,"url":"https://github.com/tomashubelbauer/fastmail","last_synced_at":"2026-02-25T17:35:39.828Z","repository":{"id":107986104,"uuid":"542467571","full_name":"TomasHubelbauer/fastmail","owner":"TomasHubelbauer","description":"My exploration of the Fastmail API","archived":false,"fork":false,"pushed_at":"2022-09-28T16:17:02.000Z","size":11,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-01T16:42:19.956Z","etag":null,"topics":["api-token","email","fastmail","fastmail-api","sieve"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomasHubelbauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-28T07:41:55.000Z","updated_at":"2025-01-20T03:34:25.000Z","dependencies_parsed_at":"2023-05-15T00:15:21.565Z","dependency_job_id":null,"html_url":"https://github.com/TomasHubelbauer/fastmail","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TomasHubelbauer/fastmail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Ffastmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Ffastmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Ffastmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Ffastmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomasHubelbauer","download_url":"https://codeload.github.com/TomasHubelbauer/fastmail/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Ffastmail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281314650,"owners_count":26480021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-token","email","fastmail","fastmail-api","sieve"],"created_at":"2024-12-31T22:13:42.589Z","updated_at":"2025-10-27T18:03:53.419Z","avatar_url":"https://github.com/TomasHubelbauer.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fastmail\n\nLet's take a look at the Fastmail API tokens!\n\nhttps://www.fastmail.com/developer/integrating-with-fastmail\n\nWe can use the examples Fastmail have provided in their JMAP-Samples repository:\n\nhttps://github.com/fastmail/JMAP-Samples/tree/main/javascript\n\nThe samples include a `hello-world` sample which creates an email draft and a\n`top-ten` sample, which lists the top of the inbox.\n\nThe samples use the `fetch` API natively available in the Node 18+. Run like so:\n\n```bash\nJMAP_USERNAME=tomas@hubelbauer.net JMAP_TOKEN=fmu1-… node hello-world/top-ten\n```\n\n`JMAP_USERNAME` is the email address.\n\n`JMAP_TOKEN` is the token from https://www.fastmail.com/settings/security/tokens\n\nIf you omit either of `JMAP_USERNAME` or `JMAP_TOKEN`, the script will notify\nyou.\n\n## Locked Down Tokens\n\nAs of current, I don't see a way to limit a token to a subset of the inbox.\nThis is a crucial feature in order to avoid leaking my inbox on token leak.\nThat's a concern when using the token on a 3rd party infrastructure, like CI/CD.\n\nI emailed jmapsupport@fastmail.com and suggested several options of introducing\nlocked down tokens including associating tokens with folders, patterns (would\noperate on email data and metadata), aliases etc.\nLater on I found out about Sieve, a filtering and actioning programming language\nsupported by Fastmail for automated email management.\nI have updated my suggestion to say that associating a piece of Sieve code to a\ntoken seems like a preferrable solution.\n\nInformation about Sieve:\nhttps://www.fastmail.help/hc/en-us/articles/1500000280481-Sieve-scripts\n\nSieve playground:\nhttps://www.fastmail.com/cgi-bin/sievetest.pl\n\nFastmail support told me nothing like this is on the roadmap yet and most of my\nsuggestions aren't likely to be on the roadmap ever, but they did suggest I\ncould create a new user and share a folder with them, then I could create a PAT\nfor that user only and see only the emails they have in the shared folder.\n\n- [ ] Buy a new Fastmail user and share a folder with them and verify this\n\n## Webhooks\n\nIn the same conversation where I asked Fastmail about locked down tokens, I have\nalso inquired about the possibility of adding webhooks which fire when new email\nis received.\nThis would introduce on option of having automations react to new email instead\nof poll for new email.\nSimilarly to the locked down tokens, associating Sieve code with the webhook\nseems like the best way to specify what email it should apply to.\n\nFastmail support told me they might add something akin to webhooks to the Rules\nfeature on the site. Sieve even used to support something like that, but it was\nremoved.\n\nUntil something like this is added, I will probably stick with polling the user.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Ffastmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomashubelbauer%2Ffastmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Ffastmail/lists"}