feat: add App API content & sender utility methods — snippets, sender identities, messages#244
Merged
Conversation
… identities, messages (CDP-6277)
Batch 13 (stacked on Batch 12). Adds 4 snippet, 3 sender-identity, and 3
message-log methods to APIClient.
Contracts verified against the backend, not the OpenAPI spec:
- Snippets are keyed by name (create + upsert both take { name, value };
delete is by name in the path; DELETE returns 204).
- Sender identities use integer ids; list supports start/limit/sort/hidden;
used_by returns campaign + newsletter usage.
- Messages are the workspace-wide delivery log: list supports the full
filter set (channel, metric, drafts, resource-id scopes, time window,
associations, tracked responses); a single message id is a delivery id
string, with optional archived_message/associations expansions plus a
dedicated archived_message endpoint.
Includes unit tests (100% coverage), live round-trip/read coverage, and docs.
karngyan
approved these changes
Jul 15, 2026
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.
Another set of the App API backfill which follows #243 and adds 4 snippet, 3 sender-identity, and 3 message-log methods to
APIClient:getSnippetsGET /v1/snippetscreateSnippetPOST /v1/snippetsupdateSnippetPUT /v1/snippets(upsert)deleteSnippetDELETE /v1/snippets/{name}(204)getSenderIdentitiesGET /v1/sender_identitiesgetSenderIdentityGET /v1/sender_identities/{id}getSenderIdentityUsedByGET /v1/sender_identities/{id}/used_bygetMessagesGET /v1/messagesgetMessageGET /v1/messages/{id}getArchivedMessageGET /v1/messages/{id}/archived_messageAssisted by AI 🤖
Note
Medium Risk
createImportcan start bulk profile/data loads from a remote CSV; otherwise changes are additive HTTP wrappers with standard validation and no core transport changes.Overview
Extends
APIClientwith another App API backfill slice: snippets (list/create/upsert/delete), sender identities (list, get, used-by), and workspace-wide message lookups (getMessages,getMessage,getArchivedMessage) with typed option objects and the sameMissingParamError/buildQueryStringpatterns as existing methods.The diff also adds CSV imports (
createImportposts{ import: … },getImport), data index batch metadata updates (batchUpdateAttributes,batchUpdateEvents), pluslistWorkspacesandgetIpAddresses.docs/app.mddocuments the new sections (content & sender utilities, imports/data index/workspace info).test/api.tsadds stubbed URL/query/body tests;test/integration/live.tsadds smoke round-trips (optionalCIO_TEST_IMPORT_CSV_URLfor imports).Reviewed by Cursor Bugbot for commit 83bc764. Bugbot is set up for automated code reviews on this repo. Configure here.