feat: add App API deliverability methods — ESP suppressions & reporting webhooks#243
Merged
Conversation
…ng webhooks (CDP-6276) Batch 12 (stacked on Batch 11). Adds 5 ESP email-suppression methods and 5 reporting-webhook methods to APIClient. Contracts verified against the backend, not the OpenAPI spec: - Suppression categories are blocks/bounces/spam_reports/invalid_emails; email is a path segment (URL-encoded). getSuppressions is offset-based; getDomainSuppressions is cursor-based (start). create returns a body, delete returns 204. - Reporting webhooks use integer ids; the create body's URL field is 'endpoint'; DELETE returns 204. Models the standard webhook type. Includes unit tests (100% coverage), live round-trip coverage, and docs.
karngyan
approved these changes
Jul 15, 2026
… identities, messages (#244)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Yet another set of the App API backfill following #242 which adds 5 ESP email-suppression methods and 5 reporting-webhook methods to
APIClient:searchSuppressionGET /v1/esp/search_suppression/{email}getSuppressionsGET /v1/esp/suppression/{type}getDomainSuppressionsGET /v1/esp/domains/{domain}/suppression/{type}createSuppressionPOST /v1/esp/suppression/{type}/{email}deleteSuppressionDELETE /v1/esp/suppression/{type}/{email}(204)listReportingWebhooksGET /v1/reporting_webhookscreateReportingWebhookPOST /v1/reporting_webhooksgetReportingWebhookGET /v1/reporting_webhooks/{id}updateReportingWebhookPUT /v1/reporting_webhooks/{id}deleteReportingWebhookDELETE /v1/reporting_webhooks/{id}(204)Notes
GET /v1/reporting_webhooks/{id}/errorsendpoint (JS-webhook debugging) that the issue didn't scope; happy to add agetReportingWebhookErrorsin a follow-up if useful.Assisted by AI 🤖
Note
Medium Risk
Large additive surface area with write paths (suppressions, webhooks, snippets, imports, metadata) that can affect deliverability and workspace data; behavior is thin HTTP wrappers with consistent validation.
Overview
Continues the App API client backfill on
APIClientwith a large set of new typed methods, matching the existing request/validation style (MissingParamError,buildQueryString, URL encoding).Deliverability: ESP suppression search/list (global offset and per-domain cursor pagination), create/delete suppressions; full CRUD for reporting webhooks.
Content & operations: Snippet list/create/upsert/delete; sender identity list/get/used-by; workspace-wide message list/get/archived content with rich filters.
Data & account: CSV import create/status; batch attribute/event metadata updates;
listWorkspacesandgetIpAddresses.docs/app.mddocuments all of the above. Unit tests intest/api.tsassert paths, query strings, and validation;test/integration/live.tsadds optional live coverage (includingCIO_TEST_IMPORT_CSV_URLfor imports).Reviewed by Cursor Bugbot for commit d4b9893. Bugbot is set up for automated code reviews on this repo. Configure here.