Tags: mailgun/mailgun-go
Tags
DE-1538 Add endpoint for Running Inbox Placement Test (#487) https://documentation.mailgun.com/docs/inboxready/api-reference/optimize/inboxready/inbox-placement/post-v4-inbox-tests#/docs/inboxready/api-reference/optimize/inboxready/inbox-placement/get-v4-inbox-sharing-public--shareid-
Add missing event fields from Mailgun API (#471) ## Summary Adds missing fields from the Mailgun Events API that are returned in responses but not captured by the current structs. In particular, `last-message` will contain the actual error when the failure reason is "old", and `recipient-provider` enables analyzing delivery rates by email provider. **Note:** These fields are not yet in Mailgun's official API docs but are present in API responses. ## Changes - **DeliveryStatus**: `last-code`, `last-message`, `bounce-type`, `first-delivery-attempt-seconds` - **Storage**: `region`, `env` - **Generic**: `log-level` - **Accepted**: `recipient-provider`, `api-key-id` - **Delivered/Failed**: `recipient-provider`, `primary-dkim` All new fields are marked as optional (`omitempty`) since I could not be certain they're always returned. ## Evidence Example `failed` event: ```json { "event": "failed", "log-level": "error", "recipient-provider": "Other", "primary-dkim": "pdk1._domainkey.email.example.com", "delivery-status": { "code": 602, "last-code": 616, "bounce-type": "soft", "last-message": "unable to connect to MX servers: ...", "attempt-no": 25 }, "storage": { "key": "...", "env": "production", "region": "europe-west1", "url": "..." } } ``` ## Checks - [x] `go test ./...` passes - [x] `go fmt` applied ## Update Addressed review feedback: - Removed `omitempty` from all new fields (only used for unmarshalling) - Removed `recipient-provider` from `Accepted` --------- Co-authored-by: Vilen Topchii <32271530+vtopc@users.noreply.github.com>
PreviousNext