Skip to content

chore: add Bruno collection for Postman Email API - #2402

Open
jia1 wants to merge 1 commit into
stagingfrom
add-bruno-collection
Open

jia1 wants to merge 1 commit into
stagingfrom
add-bruno-collection

Conversation

@jia1

@jia1 jia1 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Problem

There's no shared, version-controlled request collection for the Postman Email API, so trying an endpoint means rebuilding requests by hand or passing around personal Insomnia exports.

Solution

  • Bruno collection at bruno/postman-email/: 39 requests covering auth (OTP), transactional email, campaigns, the email campaign lifecycle, email settings, API keys and attachments. Built from the route validators on staging, including the one.gov.sg changes.
  • Local, Staging and Production environments point at the api- hosts. apiKey is a Bruno secret variable, so key values never land in .bru files. Every other value is an @example.com address or a placeholder.
  • README lists the requests that send real email and the routes left out and why: SES callback, unsubscribe, protected messages, the S3 PUT for CSV uploads, one.gov.sg login, and SMS/Telegram/GovSG.
  • Checked with bru run against a local echo server: each request's method, path, query string, auth header, cookie and multipart body went out as expected. Not run against a real backend yet.

@jia1
jia1 requested review from a team and shoobhidoobi October 8, 2026 05:14
@seancze
seancze requested a balanced review from Copilot October 8, 2026 11:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The template request currently allows Bruno to interpolate Postman template placeholders before sending them.

1 open finding
What changed in this PR

Adds a version-controlled Bruno collection covering the Postman Email API.

Changes:

  • Adds 39 API requests across authentication, campaigns, email, settings, API keys, and attachments.
  • Adds local, staging, and production environments with secret API-key handling.
  • Documents setup, email-sending operations, and excluded routes.
File Description
Transactional email/​Send email.bru Sends transactional email.
Transactional email/​Send email with attachment.bru Sends multipart email.
Transactional email/​List emails.bru Lists transactional emails.
Transactional email/​Get email by ID.bru Retrieves one email.
Transactional email/​folder.bru Defines the folder.
Settings/​Verify custom from address.bru Verifies a sender address.
Settings/​List custom from addresses.bru Lists sender addresses.
Settings/​Get user settings.bru Retrieves settings.
Settings/​folder.bru Documents session authentication.
README.md Documents collection usage.
Ping.bru Adds the health check.
fixtures/​sample.txt Provides an attachment fixture.
environments/​Staging.bru Defines staging variables.
environments/​Production.bru Defines production variables.
environments/​Local.bru Defines local variables.
Email campaign/​Start protected upload.bru Starts multipart upload.
Email campaign/​Start CSV upload.bru Starts CSV upload.
Email campaign/​Send test email.bru Sends a campaign test.
Email campaign/​Send campaign.bru Sends or schedules a campaign.
Email campaign/​Save template.bru Saves the email template.
Email campaign/​Retry campaign.bru Retries a campaign.
Email campaign/​Refresh stats.bru Refreshes statistics.
Email campaign/​Preview first message.bru Previews a message.
Email campaign/​Get stats.bru Retrieves statistics.
Email campaign/​Get CSV upload status.bru Checks CSV processing.
Email campaign/​Get campaign details.bru Retrieves email campaign details.
Email campaign/​folder.bru Documents campaign variables.
Email campaign/​Export delivered recipients.bru Exports delivered recipients.
Email campaign/​Duplicate campaign.bru Duplicates a campaign.
Email campaign/​Delete CSV upload error.bru Clears upload errors.
Email campaign/​Complete protected upload.bru Completes multipart upload.
Email campaign/​Complete CSV upload.bru Completes CSV upload.
collection.bru Configures inherited bearer authentication.
Campaigns/​Update campaign.bru Updates campaign metadata.
Campaigns/​List campaigns.bru Lists campaigns.
Campaigns/​folder.bru Defines the folder.
Campaigns/​Delete campaign.bru Deletes a campaign.
Campaigns/​Create email campaign.bru Creates an email campaign.
Campaigns/​Cancel scheduled campaign.bru Cancels scheduled sending.
bruno.json Defines the Bruno collection.
Auth/​Verify OTP and log in.bru Establishes a session.
Auth/​Request OTP.bru Requests an OTP.
Auth/​Log out.bru Ends the session.
Auth/​Get user info.bru Retrieves session user data.
Auth/​folder.bru Defines the folder.
Attachments/​Upload campaign embed.bru Uploads an embedded attachment.
Attachments/​Get campaign embed.bru Retrieves an embedded attachment.
Attachments/​folder.bru Documents session authentication.
API keys/​Update API key.bru Updates notification contacts.
API keys/​List API keys.bru Lists API keys.
API keys/​folder.bru Documents session authentication.
API keys/​Delete API key.bru Deletes an API key.
API keys/​Create API key.bru Creates an API key.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment on lines +15 to +16
"subject": "Hello {{name}}",
"body": "<p>Dear {{name}},</p>",
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jia1
jia1 force-pushed the add-bruno-collection branch from af2ebb2 to a2f453a Compare October 9, 2026 03:51
@jia1
jia1 deployed to staging October 9, 2026 03:52 — with GitHub Actions Active
@jia1
jia1 deployed to staging October 9, 2026 03:53 — with GitHub Actions Active
@jia1
jia1 deployed to staging October 9, 2026 03:53 — with GitHub Actions Active
@jia1
jia1 deployed to staging October 9, 2026 03:55 — with GitHub Actions Active
@jia1
jia1 deployed to staging October 9, 2026 03:56 — with GitHub Actions Active
@jia1
jia1 deployed to staging October 9, 2026 03:56 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants